I want to connect to my ESP2866 a Water Level Sensor switch to turn off/disable water pump, when water tank is empty.
I am thinking in:
1, physically connect the switch between the water pump's + positive wire - if there is no water the pump cannot start.
But in this case I don't get any notification to refill the tank.
2, Connect somehow the switch to the ESP itself. But how do I do this and configure in ESP Easy?
3, use the two at the same time, if there is a problem with ESP the water pump still turns off if no water.
Water Level Sensor switch
Moderators: grovkillen, Stuntteam, TD-er
Re: Water Level Sensor switch
Hello,
there should be several solutions.
IV you're using a low voltage pump (12..24 V or similiar) i'd do a simple trick:
Connect the switch in the "+" wire of the pump.
Then connect the junction between pump and switch to the ESP.
So pump switches of even if the ESP is down and you get the signal for the ESP.
But be aware: It needs additional circuitry for the ESP!
The ESP can not take the voltage of the pump directly, it will fry the chip at once.
Even more, a pump generates voltage spikes so the ESP should be protected against that.
It might be reasonable to isolate the pump circuit from the ESP circuit, for example with an optocoupler.
Don't worry, it's no rocket science
If you can give me the data of the pump (Voltage? AC? DC?) i'll make a schematic for it.
Regards
Shardan
there should be several solutions.
IV you're using a low voltage pump (12..24 V or similiar) i'd do a simple trick:
Connect the switch in the "+" wire of the pump.
Then connect the junction between pump and switch to the ESP.
So pump switches of even if the ESP is down and you get the signal for the ESP.
But be aware: It needs additional circuitry for the ESP!
The ESP can not take the voltage of the pump directly, it will fry the chip at once.
Even more, a pump generates voltage spikes so the ESP should be protected against that.
It might be reasonable to isolate the pump circuit from the ESP circuit, for example with an optocoupler.
Don't worry, it's no rocket science
If you can give me the data of the pump (Voltage? AC? DC?) i'll make a schematic for it.
Regards
Shardan
Regards
Shardan
Shardan
-
- Normal user
- Posts: 51
- Joined: 15 Sep 2016, 00:20
Re: Water Level Sensor switch
Hi Shardan,
it's a simple DC 12V water pump.
Yeah, I think I am going this way: connect the switch between the + positive wire of the pump (case 1).
But it still would be great to sense the switch status (open-closed) with ESP (and send notification). What do you think, it is possible?
it's a simple DC 12V water pump.
Yeah, I think I am going this way: connect the switch between the + positive wire of the pump (case 1).
But it still would be great to sense the switch status (open-closed) with ESP (and send notification). What do you think, it is possible?
Re: Water Level Sensor switch
Hello Adrian,
yep it is.
The solution is simple, it keeps the pump switched directly even if the ESP is offline for whatever reason.
I've drawn a small circuit for this:
This circuit detects if the pump has power or not. It has a complete electrical isolation between pump and the ESP.
The Zener diode D1 and the capacitor C1 secure the circuit against voltage spikes from the motor coils.
The opto coupler U1 (PC817, EL817, PC817.. all same) isolates the pump from the ESP.
There is no electrical connection between the pump circuit and the ESP - even ground is NOT connected to eachother.
Please use different power supplies for ESP and pump, as the pump generates noise on the 12V power line. This usually gives unpredictable behaviour of the ESP.
The output pin gives a logical "low" if the pump is running, "high" if it is stopped.
The opto coupler works like a switch, so ESPEasy can simply be configured for a switch:
Settings in the "Device" tab of ESPEasy:
Device: Switch Input
Name: <givew a name of your choice>
Delay: can be 0 or a low value 1..3
IDX: a value 1...250 with ESPeasy R1xx, with ESPEasy 2.0.0 (ESPEasy Mega) it's only needed for domoticz)
1st GPIO: The GPIO the output of the circuit is connected to
PullUp: check
Inversed: check (As the opto gives "low" if the pump is running)
Switch Type: Switch
Switch Button Type: Normal Switch
Send Boot State: check (Sends the actual state if ESP is rebooted)
Send data to Controller 1: check (usefull if you want to use a homecontrol someday)
Enabled: check (of course, it would not work if not enabled )
Value Name 1: A name of your choice, "Pump" or whatever.
These settings are taken from "ESPEasy Mega", the R1xx versions are similiar.
The electronic parts are standard parts, the next electronic dealer should have them on stock.
Together with a prototype board it should be around 5€.
BTW it is possible to place this circuit and the ESP itself away from the pump if necessary.
Use a standard speaker cable or such, some meters of distance should work.
Regards
Shardan
yep it is.
The solution is simple, it keeps the pump switched directly even if the ESP is offline for whatever reason.
I've drawn a small circuit for this:
This circuit detects if the pump has power or not. It has a complete electrical isolation between pump and the ESP.
The Zener diode D1 and the capacitor C1 secure the circuit against voltage spikes from the motor coils.
The opto coupler U1 (PC817, EL817, PC817.. all same) isolates the pump from the ESP.
There is no electrical connection between the pump circuit and the ESP - even ground is NOT connected to eachother.
Please use different power supplies for ESP and pump, as the pump generates noise on the 12V power line. This usually gives unpredictable behaviour of the ESP.
The output pin gives a logical "low" if the pump is running, "high" if it is stopped.
The opto coupler works like a switch, so ESPEasy can simply be configured for a switch:
Settings in the "Device" tab of ESPEasy:
Device: Switch Input
Name: <givew a name of your choice>
Delay: can be 0 or a low value 1..3
IDX: a value 1...250 with ESPeasy R1xx, with ESPEasy 2.0.0 (ESPEasy Mega) it's only needed for domoticz)
1st GPIO: The GPIO the output of the circuit is connected to
PullUp: check
Inversed: check (As the opto gives "low" if the pump is running)
Switch Type: Switch
Switch Button Type: Normal Switch
Send Boot State: check (Sends the actual state if ESP is rebooted)
Send data to Controller 1: check (usefull if you want to use a homecontrol someday)
Enabled: check (of course, it would not work if not enabled )
Value Name 1: A name of your choice, "Pump" or whatever.
These settings are taken from "ESPEasy Mega", the R1xx versions are similiar.
The electronic parts are standard parts, the next electronic dealer should have them on stock.
Together with a prototype board it should be around 5€.
BTW it is possible to place this circuit and the ESP itself away from the pump if necessary.
Use a standard speaker cable or such, some meters of distance should work.
Regards
Shardan
Regards
Shardan
Shardan
-
- Normal user
- Posts: 51
- Joined: 15 Sep 2016, 00:20
Re: Water Level Sensor switch
This answer is more than I would expect, thank you very much. I ordered the parts from eBay, can't wait to receive them and start build this project.
Who is online
Users browsing this forum: No registered users and 3 guests