irrigation controller - (rechargeable) battery powered

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
obod0002c
Normal user
Posts: 119
Joined: 10 Aug 2019, 20:31

irrigation controller - (rechargeable) battery powered

#1 Post by obod0002c » 02 Jul 2020, 10:01

As I'm a bit concerned about this, maybe one of you has already a solution to my problem:

I've been using my Raspberry to control a small irrigation system for garden and plants.
However, I'm a bit scared, that, if my raspberry hangs, breaks, doesn't do what it's supposed to do, the water flow will continue until I'm back home again.
As I'm working with magnetic valves, a power failure will 'just' hurt the plant but not cause flooding nor wasting vital resources (as the valves will automatically close themselves).

So I thought of a nice ESP making sure the water-tap will definitely be closed again.

Maybe one of you has already done such a project and can help?
Maybe by modifying an existing (timer or hand-operated) water controller?

My current 'solution' was to fire up the mains adapter used for the magnetic valves by a wifi socket with a build in timer.

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: irrigation controller - (rechargeable) battery powered

#2 Post by TD-er » 02 Jul 2020, 10:27

What you actually want is something that's being used in lots of embedded systems and called a watchdog.
So you can make some circuit, which will automatically go to a defined state after a while, unless the timer is reset.

So you can look for some counter or timer circuit, which doesn't run on software.
The signal of this circuit can be either used directly or via an AND port with the controller output signal to trigger your valve.

To make sure it is kept "on", you must then with regular intervals send out something to reset the timer in this watchdog circuit.
This can be as simple as sending a short pulse, but some watchdog chips also communicate via I2C.

This seems to me the safest way to make sure the valves will be closed even when the microcontroller or the pi crashes, hangs or dies.

Just one of the first hits on Google for "watchdog schematic" gave this simple 555-based circuit: https://easyeda.com/lynxlabeling/Watchd ... 6a250625e9

A Pi may crash or hang, but so does any ESP-based solution.

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests