Hi All,
Now focused on a simple water level sensor to send an alert when the water level in my little hydroponic setup drops.
I've found this recommendation for how to wire a float sensor to the Pi:
This calls for wiring in a 10k Ohm resistor between one leg of the sensor connected to GPIO4 and GND, other leg to 3.3V.
I have two questions - does this wiring look proper? Is this correct way to wire this up?
Second - how to make an entry for this in the Hardware Settings tab to monitor the sensor and send an email when state changes? Simple on/off or off/on trigger...
Thanks again - really enjoying working with this during 'stay-at-home'. Rand
Hi There,
for the actuator connected to the pump, (pump to be blocked when closed) I suggest the following configuration. Assuming the sensor is connected from GPIO to GND:
In the hardwareSetting table:
In the "interrupt page" under the actuator that will drive the pump:
NOTE: when the GPIO pin is closed to GND, the actuator will be set to zero and the blocking period will start immediately. When the circuit is opened again, you have to wait around 1 minute to get the blocking state removed.
For more info I just wrote an article on hot to configure the interrupts. Feedbacks are welcome.
More on interrupts setting.
Regards,
Angelo
Thanks Angelo for your time. I have two types of float switches:
Side Mount (what I was planning to have for pump)
https://www.bc-robotics.com/shop/float-switch-side-mount/
I was trying to have it either way, but preferably open when full, and closed when empty. (to be able to install it lower as possible.)
And this classic one
https://www.bc-robotics.com/shop/float-switch/
I'm not sure how to mount this one yet, to keep it waterproof, but would be used for mail.
I believe they work totally same.
Saying all that, would make more sense probably to switch the switches over and have lower 2. and higher on the side of the bucket 1. :)
Thanks, Zee.
Hi There,
First of all, we need to clarify the behaviour of the floating switch. Is it close circuit when in water and open circuit when out of the water?
Then we can set the blocking conditions to avoid the pump to start without water.
For the mail alert we will see later.
Hi There,
Yes, you can use the "almost" same type of setting and connection as in the video.
Connection is even simpler, just connect one of the GPIO PIN to the sensor and the other end to the ground.
This is because the SW can set the GPIO PIN to pull up status, which mean the PIN will be at 3.3v (using an internal 10K resistor).
If your target is to send an email, this is supported by the SW. You have to make the setting both in the Hardware page and in the interrupt page.
I think the rains sensor works in the opposite way of the level sensor as the rain sensor is normally closed. I suppose the level sensor is normally open (so the setting should be on "first edge").
Anyway if setting is not clear, just post here, I'll try my best to explain.
Update, I believe I can use this YouTube instructional video that Hydrosys4 put together describing how to wire up a rain sensor. Very similar read-state type.
https://www.youtube.com/watch?v=E51YKMrrR7o
Circuit source: https://www.circuito.io/app?components=9443,200000,561143