Detect voltage changes

Hi,

I have a watering system control (Hunter X Core) and I need to activate a pump when the watering starts. The control system has a wire that change 5v to 24v when the system is actived. I want to control this voltage change and then, activate a wifi switch that powered the pump. The problem is that I cant find any hardware that detects this voltage change.
Can anyone help me?

Thanks

Like the ADC on the ESP8266 can you not proto a voltage divider circuit ?
and make it to sence 24 volts.
That way when it’s 5 volts it won’t be high enough to show up ?

https://learn.sparkfun.com/tutorials/voltage-dividers

https://www.allaboutcircuits.com/tools/voltage-divider-calculator/

1 Like

The ESP is a good plan. You dont even need to use the ADC. An 18K Ohm resistor in series with a 2K resistor will drop 24V to 2.4V and 5V to 0.5V i.e. right in the LVTTL logic level sweet spot of the ESP, so you can use a digital GPIO pin. Wire one end of the the 18K to your signal the other to the 2K resistor. The other end of the 2K goes to ground. The junction of the two resistors is your LVTTL signal out to the ESP.

Or if you already have a wifi switch and assuming the 24V/5V signal has enough current, a 24V relay will most likely de-energise when the signal switches to 5V giving you nice voltage free contacts you can use.

1 Like

Here’s the voltage divider circuit. The diodes and 3.3V connection aren’t necessary but will protect the ESP if there are voltage spikes induced on the line. Probably wise if the connections are longer than a couple of meters outside and you live in a lightning prone area. Otherwise leave them out.

1 Like

Thank you very much.

I have read about ESP8266 and I thing that is a very good idea. I think that is a good time to start with this kind of projects :D.

And… I think that this can be begin of a new project. I think that I can do a new wifi controller and remove the old one. I’m going to study a little.

Thanks!!!

I’ve discovered that the 24v/5v input is vac. Could ESP8266 read ac power? Or… I have to convert vac to vdc?

Thanks

Yes you would, this can be accomplished with a small bridge rectifier and a smoothing capacitor. Alternatively you could use a 24VAC relay.

1 Like