IoT: In the Cloud

Enter Your Project for a chance to win an Arduino MKR WAN 1300 Kit with a Compatable Lora Gateway or an MKR 1400 GSM with a Shield Combo + a $100 shopping cart!

Back to The Project14 homepage

Project14 Home
Monthly Themes
Monthly Theme Poll

 

For my IoT: In the Cloud project I am going to design and build an electronic replacement for my electromechanical Rain Bird RC-4Bi irrigation controller.

 

Functionally, sprinkler controllers are pretty straightforward.  They basically control the schedule and duration of watering by switching an AC voltage to open the sprinkler's solenoid controlled valve.  Controllers normally control a master input valve and multiple zone valves.  In my case, I don't have a master valve and have 4 zone control valves.  The electromechanical timing assembly is quite a complex mechanism.  It has three wheels to set the day, the hour and the zone durations.  I'll be using a microcontroller and the cloud interface to do the timing and scheduling and I'll use 4 relays to switch the zone valve voltages.  The valve solenoids that I am using are rated at 24VAC with 0.41A inrush current and 0.14A holding current.  The existing transformer is rated at 24VAC/60Hz @ 1.25A.  I operate the zones sequentially to manage the water pressure so most common relays will easily handle the power.  I'll include the existing 1.5A fuse to protect the transformer.

 

Relay Module

4 Ch Relay Module

https://www.amazon.com/SainSmart-101-70-101-4-Channel-Relay-Module/dp/B0057OC5O8/ref=pd_sim_107_3/138-3958649-9697036?_encoding=UTF8&pd_rd_i=B0057OC5O8&pd_rd_r=3957246e-4989-11e9-bf30-a9c66916e9f7&pd_rd_w=q0Tfq&pd_rd_wg=pggGD&pf_rd_p=90485860-83e9-4fd9-b838-b28a9b7fda30&pf_rd_r=7824H4DPTDEJW9QC1QWV&psc=1&refRID=7824H4DPTDEJW9QC1QWV#

 

5V 4 Channel Relay Module

Contact rating 250VAC@10A

Coil nominal current 71mA

Optocoupler input current 2-3mA

 

 

Microcontroller/SBC

The control requirements are pretty simple - 4 GPIO to drive the optocoupler inputs.  The user interface requires more thought - i.e. the information display and data input.  And there's the choice of communication (WiFi, Bluetooth, Ethernet) and Cloud support.  I'd like to use a processor that I already have and I don't want to run an Ethernet connection, so that narrows it down to 4 choices: ESP8266, ESP32, RPi0W, and Arduino MKR1010.  I'd like the option of communicating with a mobile device using BLE, so that eliminates the ESP8266.  Once I look at the user interface and cloud platform trade-offs I'll be able to make a selection.

 

 

Cloud Platform

I've used myDevices Cayenne with the ESP8266 and I've used Atmosphere IoT with the NXP Rapid IoT.  I like Atmosphere because the BLE integration and mobile app development is easy but it is probably the most difficult to add new device types.  I am also interested in trying the Arduino IoT Cloud.  Too many choices.  If I go with the RPi0W, then I'd probably use Cayenne.  Otherwise, I might try all 3 and see which works out the best (fastest development time is probably the metric).

 

 

User Interface

I'm leaning toward using a TFT LCD with touch screen interface.  That would save having to interface a keypad or buttons for input.  If I use one with a SPI interface it will save on the number of GPIO pins required.  That will probably limit me to a 4" display width (based on price and availability) but I think that should be fine.  I could opt for an HDMI screen if I use the RPi0W.

 

 

Time to sleep on it and hope for inspiration.  I think I'll give the Arduino IoT Cloud a try tomorrow.