ERrigator

What is eRrigator

eRrigator is what it sounds like. It's an internet connected irrigation controller. HW costs are less than $40 and probably could be pushed down to about $30. It supports up to 6 stations, but more can be added easily if need be. Programming is different than most irrigation controllers. It allows for multiple programs to be set for each station separately from the others. This means that programming it does not require artificial linkage between different stations.

The unit has its own Real Time Clock (RTC) and stores the programming and configuration on FLASH memory. This means that even without internet connection, it will execute the schedule as planned.

Tools Used

  • Controller + WiF: NodeMCU
  • Platform: Arduino
  • DevTools: PlatformIO

Controlling the Unit

  • Control of unit, from programming, to turning on a station for a few minutes: Free Azure Tier allows up to 10 websites with traffic limits
  • Messaging to "inform" the unit of a new control command: MQTT hosted on
  • On unit LCD of 20x4 showing status + watering events. No data entry or menu control buttons

Step 1: Electrical Design

The heart of this design is the NodeMCU, which connects to your WiFi network and received command through a combination of MQTT and simple Web Service hosted on Azure. The NodeMCU controller is used to control the relay shield which connects the solenoids on the irrigation valves. That's it, the rest is mostly either power or fanfare in the form of an LCD display.

One point I need to stress, I am lazy. So I used relay shield, but since all I got was this contact relay, I need to add Varistor on each station. This prevents EMI issues as well as protects the relay contacts.

The power for the solenoids should be ~24VAC, hence the use of the VAC/VAC wall wart. This is feeding the relay ports which connect to the valves for the watering stations.

That same power is rectified using the diode bridge and capacitor to create a very unstable DC which is fed to the DC/DC converter. The DC converter is adjusted to output 5VDC to power the electronics. Obviously there is a simple On/Off switch.

RTC and LCD are connected to the NodeMCU through I2C interface and provide time functionality and display unit status.

There is also 1 button, used mostly for scrolling the display. Turning the unit on, while pressing the scroll button, performs hard reset, which allows for unit initial configuration.

Cost to Build

Total HW cost is estimated at about less than $39US, and can be further pushed down, see breakdown:

  • Project Box: $7
  • NodeMCU: $3
  • RTC: $0.6
  • Diode Bridge: $0.5
  • 470uF 35V Capacitor: $0.2
  • Momentary Push Button: $0.4
  • On/Off switch: $0.4
  • LIR2032 Rechargeable Coin Battery: $1
  • DC/DC Converter: $0.7
  • 8 Ch. Relay Shield: $6
  • PCB + Misc.: $2
  • LCD 20x4 + I2C I/F: $6
  • 120VAC/25.5VAC Wall Wart: $10
  • Varistor x 6: $0.6

Step 2: Conguration Vs. Settings Vs. Programming

Configuration: the parameters required to allow the unit connect to your WiFi and identify itself to the eRrigator web site.
Settings: Creating some meaningful setup, for example: Naming the unit if you have multiple ones, giving a name for each station, what TimeZone your eRrigator is at, etc.

Programs: Set watering times and duration.

Step 3: Initial Configuring of ERrigator

Well, a bit tricky problem?, not really. NodeMCU can act as both a station connecting to another access point as well as an access point.

  1. Go to the web site and create a new unit. This would provide you with a unique unit ID.
  2. Turn on eRrigator, while at the same time pressing the scroll/hard reset button. eRrigator goes into config. mode.
  3. Connect you PC or mobile device to the new WiFi network with SSID: eRrigatorSoftAP.
  4. See Video - Follow the instructions on the display (you may need to scroll). Specifically, find what is the eRrigator server IP address and point your browser to that address.
  5. Fill out the form (see screen capture) with your Network name, Password and the unit name you got from step 1.
  6. Submit the form.
  7. Switch you PC or mobile device to your normal network
  8. Goto: http://YourVeryOwnErrigatorWebSite.azurewebsites.net
  9. Start with settings and programming the unit

Reconfiguring?

Simply retrieve your unit ID from the web site

Repeat step 2-9 above

Step 4: Settings for Your ERrigator

Step 5: Your ERrigator Status

The Home page shows the Unit status (see first snapshot).

It give the the time of the unit that was last communicated to the Web application, as well as the status. It also provides the value for the counters used to schedule watering cycles that are not daily.

The top of all pages give last comm. information as well as status of the unit. If all is green, good for you, if not, well...

Step 6: Setting Up Your Stations

Step 7: Programming Watering Cycles

Step 8: Additional Functions of the Unit

The page showing under Unit Control allows for numerous options to manually control the unit.

  1. Disable/Enable - Simple, disable or enable the unit. Unit is now functioning more as a decorative ornament than anything else.
  2. Auto Enable/Timed Disable (not implemented yet) - Disable the unit and allow it to enable automatically after some pre-determined time. For example, you're having a party and wish to avoid your guests cursing their idiot host when the sprinklers turn on. However you know you will forget to enable the unit. Set it to auto-enable after 1 day and that's it.
  3. Set time/date - Simply push latest update of time and date, to reset the RTC drift. no real need for this as the RTC knows to update every 24Hours, so the drift is no more than 2-3 seconds.
  4. Turn off - Turn off all stations, until the next scheduled event.
  5. Turn on station for .
  6. Set precipitation factor - The eRrigator allows you to reduce watering time by certain percentage for every unit of precipitation.

Step 9: Restting the Unit From Afar

Under Admin->Reset

You can use this form to reset the unit in 5 different ways:

1. Counters Reset - only the multi day programs counters.

2. Low Level Reset - only reset the unit, nothing else.

3. Medium Level Reset - Reset the unit, the counters.

4. High Level Reset - Reset the unit, counters, remove programs from memory, remove stations info from memory.

5. Hard Reset - As the High Level reset, only it also removes the configuration, see step 3 for details on how to configure the unit now that you totally broke it.

Step 10: Re-Configuring the Unit From Your Browser

Under Admin->Config.

If you want to switch the unit to another WiFi, simply select the network, add password and remember to copy/paste the unit ID. Submit, voi-la, it's done.

Step 11: Over the Air - FW Upgrade

Under Admin -> FW Upgrade

THIS IS HIGHLY RISKY - YOU CAN EASILY BRICK THE UNIT!!!

If you do brick the unit, you need to physically connect the NodeMCU micro-USB to your PC and upload a working version.

Upload the binary file of the release you want, enter some release notes info and submit.

The unit will be programmed over the air and once done, will reset. The DB is updated to reflect the new release in the list under the form.

Be advised, if the unit is not bricked, you can revert to early release by selecting it.

Be afraid, be very afraid!

Step 12: Arduino Code for Your ERrigator

Working on making it presentable...

Step 13: C# Code to Run Your WebSite

Working on making it presentable...

Share

    Recommendations

    • Make it Glow Contest 2018

      Make it Glow Contest 2018
    • Toys Contest

      Toys Contest
    • PCB Contest

      PCB Contest

    Discussions

    0
    None
    DIY Hacks and How Tos

    4 minutes ago

    Great first Instructable. Very detailed and well written. Thanks for sharing.