DIY Garden irrigation controller – Part III

Intro

We are happy to introduce the completed DIY Garden irrigation controller. It was a long time ago since we started to work on this project. Looking at the timestamps its really shocking how much time passed. Anyhow now it is completed and ready to server it’s purpose and will help us to grow amazing vegetables. We also need to admit that this is only the ‘brain’ of the hardware so the electric wiring and fuses still need to be installed. For that we will have a separate entry. Now let’s jump into the hardware details! Also if You are interested in the previous entries please check out : part II

 Quick recap

DIY Garden irrigation controller contains the following main parts:

  • Wemos pro mini
  • Arduino Uno
  • Relay board
  • Power supply
  • DC-DC converter

As a quick recap – we need the Wemos pro mini for the communication with the Wifi network and also for uploading the data for cloud so we can monitor the system via the internet. Arduino Uno is needed because we needed a lots of pins for relays and also for detecting water level in our water tank.

Explanation

For our well we needed to add a bit more complex shutdown procedure as the pump is old and grumpy. It means if you disconnect it under load [when it is pumping water] it sends back a huge voltage spike to the grid which is not good, also if you pull it from the plug it will create a huge spark… For this reason we added a flow sensor to monitor when the well runs out of water the pump stops on its own. We can get 100L in every 3 minutes then for ~10 minutes we do not have enough water in the well. This is the time window when we can shut down the pump. Everything else it’s quit straightforward. We also have a gray water tank which we use to water the grass which has a submerged pump in it,  we trigger it during dawn. Have a motorized ball valve for starting the irrigation and one extra option for switching on a lamp.

Code is available here : github link