element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • 'Choose another store...'
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Going Green
  • Challenges & Projects
  • Project14
  • Going Green
  • More
  • Cancel
Going Green
Blog IOT Irrigation valve
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Going Green requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: idanre1
  • Date Created: 20 Jul 2017 9:33 AM Date Created
  • Views 1431 views
  • Likes 10 likes
  • Comments 3 comments
  • bluetooth
  • ardintermediate
  • db410c
  • gogreench
  • iot_projects
  • arduino_projects
  • iot_design
  • conservation_projects
  • mixewaterch
  • iot
  • irrigation
Related
Recommended

IOT Irrigation valve

idanre1
idanre1
20 Jul 2017

Hi

I must mention project14 is awesome!

It gets me started doing project I have always wanted to do, but didn't find the time.

For some reason because it is done in a community way, I find myself more stimulated doing nice projects image

 

In my garden, I have a dummy irrigation system. I have two timer electric valves, one for the flowers and one for the trees which require different watering times.

They both work every day for particular time and don't know to adjust themselves to the weather.

 

I always wanted to do the following project:

  • Shut down the water on a rainy day
  • Extra feed on the summer heat
  • Do it automatically using the weather forecast
    • Today I just open/close the master valve manually

 

I am living in a remote place in my country, everybody around me are farmers.

Shipping electrical components to my address can take more than 2 months (e.g. TIP120 took 2.5months to arrive)

Luckily buying agricultural equipment is a piece of cake.

 

My neighbor is working in one of these companies called www.bermad.com.

They profession this equipment and I have access to their datasheets using the website.

image

 

These two solenoids have enough electric specifications to understand how to operate them.

I place to use H-Bridge "SparkFun Motor Driver - Dual TB6612FNG (1A)" https://www.sparkfun.com/products/9457

I know others may like the LN298 flavors H-bridge but I this this one is better in power dissipation and efficiency.

 

From the factory, I ordered the DC solenoid with valve on it - http://www.bermad.com/product/210-ls-2w-m-2/

Will update more after receiving the piece next week.

 

Update 1

First this to do is describe in high level the design.

image

 

The arch goes like this:

I happen to be the proud owner of dragonboard 410C https://www.96boards.org/product/dragonboard410c/

Its Qualcomm's Raspberry pie solution.

I quite like it, since it can do heavy lifting and comes with 4 cores and 1GB RAM.

I will use it to do the IOT part (web server, cron, etc...)

The arduino will do the real time processing (en/dis the solenoid).

 

  • Main valve will be in the garden, I have there 3 wire cable towards the roof (in the walls).
  • The arduino will be on the roof and using a motor driver will pulse on/off the valve.
    • Arduino will use the electricity cable to signal the motor (cable is not occupied in current moment)
  • Motor driver is TB6612FNG http://https://www.sparkfun.com/products/9457 which can go up to 15V (more than enough)
  • Arduino will have a BT module to receive orders when to on/off
  • DB410c will do IOT and have integrated BT/WIFI.

 

Design details

Arduino sketch template

The following sketch have communication implementation, I didn't have the time to also turn on/off motor driver.

Also, adding motor logic is straight forward in the ON/OFF elsif

Arduino code in github: https://github.com/idanre1/iot_irrigation/blob/master/water_control.ino

 

I also did the db410c script (perl) to sample weather from the internet and communicate it to arduino.

  • $url can control hometown
  • $cache is for debug

 

IOT side template code

Perl code in github: https://github.com/idanre1/iot_irrigation/blob/master/iot_wrapper.pl

 

I hope my next update will be when I will receive the valve.

 

Update 2: Receiving the valve

Hi

Yesterday I have received the valve, till now I have prepared all of the SW for both the Dragonboard and the Arduino (will update github sometime).

Again, the Dragonboard will run perl to forecast weather, send command to the Arduino using it's internal BT module.

Arduino will be armed with BT module to SW serial port, and a motor driver in-order to turn the valve both ways

 

Breadboard Video

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

This is the circuit

image

 

This is where I plan to put the smart valve (see video for more details)

image

 

This is the main valve

image

These are the pipe connections:

image

 

 

Next stage

I have left to solder it all in a nice way, store it in a water resistant box and put it in the roof.

I plan to send the signal to the solenoid from the roof, it means ~9-12V over about 8 meter cable.

I hope the added resistance of the cable (this is a regular 220V cable, so resistance is not negligible...) will not mess the signal too much and things will go easy.

 

Update 3: Assembly

I have wired the valve to the water pipe and to the electricity cable, Hooked up the arduino and motor driver on the roof and managed to communicate the arduino using the BT from the db410c.

db410c is running Debian linux so I can SSH the db410c using any wireless device around the house.

Below is the video of the assembly

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Schematics

image

GND is shared by all modules

VCC is currently 5V

VMOT is 13.5V

 

Final notes

I have been trying to create the power supply to the arduino from the same wall-wart.

I had an excelent discussion about it Power arduino using lm338k.

Thanks gecoz, peteroakes and jw0752 who helped me understand how to make a descent power delivery to the module.

Eventually I found a 9V nominal wall-wart around the house that will suite my solenoid needs better (Thanks again Peter and Fabio for your help)

 

The power circuit looks like that (Arduino is actually the VCC line you will see in the next photo):

image

Final Photos

You can see I drawed two lines with a marker to better find the power lines.

Vm is where the 9V is connected directly to the motor driver power to change the solenoid state.

I put a 100uF directly to vM and 1uF directly to VCC just for making sure...

There is also a zenner 3v6 and a resistor between arduino TX and BT RX for reducing the 5V from the arduino to the 3v BT module.

On the arduino RX and BT TX I didn't put anything because 3V is considered V_h in the arduino - so signal integrity is kept.

image

image

 

Here you can see eveything composed in the box

image

(eventually I used a different wall-wart, not shown in picture)

Also you can see I made a tiny hole for the BT module to pop out, or nothing will pass in the air.

I will put transparent plastic cover to prevent flying bugs to come in, but still the BT connection will last.

The box also come with nice places to put screws, I used it to screw things in a tidy way.

 

Everything from behind

image

 

I think that concludes the project.

I had a great time, and also learned allot, especially on power delivery.

And I don't have to bother every day turn on/off the irrigation system image

 

Regards

Idan

  • Sign in to reply

Top Comments

  • jw0752
    jw0752 over 6 years ago +1
    Hi Idan, Thanks for the great post and inspiring project. John
  • sanketbojewar12
    sanketbojewar12 over 6 years ago +1
    Superbly done mate. Appreciated.
  • sanketbojewar12
    sanketbojewar12 over 6 years ago

    Superbly done mate.

    Appreciated.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • gecoz
    gecoz over 6 years ago

    Hi Idan,

    Thanks for sharing this project. Nicely done!

    Fabio.

     

    P.S: Thanks for the mention, much appreciated.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jw0752
    jw0752 over 6 years ago

    Hi Idan,

    Thanks for the great post and inspiring project.

    John

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube