Hello everyone,
I have a Raspberry Pi connected to a float sensor and relay. The relay turns on my sump pump when the water level increases and trips the float. I also record to micro SD when the float is triggered, and pump start and stop.
It's been working flawelessly for 3 years but recently we had some thunderstorms and power outages. My Pi SD card got a bit messed up and the system failed to boot successfully resulting in some light flooding - fortunately I caught it early enough and was able to dry everything out but still resulted in water damage to a few items.
So I'd like to have an buzzer alarm that is default on and when the Pi boots successfully, turn off the buzzer using a GPIO.
I researched depletion gate P- / N- channel mosfets, but both require negative voltage from my research - though some sites say positive on the gate for P- depletion.
Others have suggested relays, though I'd like to avoid power usage as this will be always on.
I have found this circuit: https://www.falstad.com/circuit/circuitjs.html?cct=$+1+5.0E-6+10.20027730826997+50+5.0+50 s+272+272+272+304+0+1+true r+272+160+272+240+0+10000.0 t+320+240+368+240+0+1+0.5933312765882728+0.6383911194200412+100.0 r+448+192+400+192+0+1000.0 g+368+320+368+336+0 R+208+144+176+144+0+0+40.0+12.0+0.0+0.0+0.5 w+208+144+272+144+0 w+272+144+272+160+0 w+368+192+368+224+0 w+368+256+368+320+0 w+272+240+272+272+0 w+320+240+272+240+0 w+272+304+272+320+0 w+272+320+368+320+0 c+368+144+368+192+0+2.0E-9+11.954940157168231 w+432+144+368+144+0 w+272+144+368+144+0 162+464+144+464+192+1+2.1024259+1.0+0.0+0.0 w+432+144+464+144+0 x+341+121+400+127+0+24+Piezo x+442+122+488+128+0+24+LED w+464+192+448+192+0 w+400+192+368+192+0
which seems to fit the bill - I could use a N-channel enhancement mosfet for the switch with the gate on a GPIO.
Wondering if there is a simpler solution with lower power usage?
My other alternatives are switch to an ESP8266 as its simplier and less prone to power loss corruption and also use a UPS based on an 18650 for the Pi / ESP8266 or a full on AC UPS.
In the meantime, I rebuilt my Pi and switched to overlay filesystem which is read-only but I lose the ability to log the state of the float and pump.
I have a Raspberry Pi connected to a float sensor and relay. The relay turns on my sump pump when the water level increases and trips the float. I also record to micro SD when the float is triggered, and pump start and stop.
It's been working flawelessly for 3 years but recently we had some thunderstorms and power outages. My Pi SD card got a bit messed up and the system failed to boot successfully resulting in some light flooding - fortunately I caught it early enough and was able to dry everything out but still resulted in water damage to a few items.
So I'd like to have an buzzer alarm that is default on and when the Pi boots successfully, turn off the buzzer using a GPIO.
I researched depletion gate P- / N- channel mosfets, but both require negative voltage from my research - though some sites say positive on the gate for P- depletion.
Others have suggested relays, though I'd like to avoid power usage as this will be always on.
I have found this circuit: https://www.falstad.com/circuit/circuitjs.html?cct=$+1+5.0E-6+10.20027730826997+50+5.0+50 s+272+272+272+304+0+1+true r+272+160+272+240+0+10000.0 t+320+240+368+240+0+1+0.5933312765882728+0.6383911194200412+100.0 r+448+192+400+192+0+1000.0 g+368+320+368+336+0 R+208+144+176+144+0+0+40.0+12.0+0.0+0.0+0.5 w+208+144+272+144+0 w+272+144+272+160+0 w+368+192+368+224+0 w+368+256+368+320+0 w+272+240+272+272+0 w+320+240+272+240+0 w+272+304+272+320+0 w+272+320+368+320+0 c+368+144+368+192+0+2.0E-9+11.954940157168231 w+432+144+368+144+0 w+272+144+368+144+0 162+464+144+464+192+1+2.1024259+1.0+0.0+0.0 w+432+144+464+144+0 x+341+121+400+127+0+24+Piezo x+442+122+488+128+0+24+LED w+464+192+448+192+0 w+400+192+368+192+0
which seems to fit the bill - I could use a N-channel enhancement mosfet for the switch with the gate on a GPIO.
Wondering if there is a simpler solution with lower power usage?
My other alternatives are switch to an ESP8266 as its simplier and less prone to power loss corruption and also use a UPS based on an 18650 for the Pi / ESP8266 or a full on AC UPS.
In the meantime, I rebuilt my Pi and switched to overlay filesystem which is read-only but I lose the ability to log the state of the float and pump.