News:

Let's find out together what makes a PIC Tick!

Main Menu

Looking for a curcit for a simple water level alarm

Started by towlerg, Mar 20, 2021, 10:55 AM

Previous topic - Next topic

towlerg

I want an indication that a bilge pump has failed. Either fresh water or salt, possible oil contamination. My boat is in a harbour so just a flashing light visible thro glass is fine. Most likley reason for pump fail is flat 12v battery, so separate supply (a couple of AAA batteries?) is necessary.

top204

Depending on the current used by the motor, you can always monitor the current used by it. If the current is too low, the motor is not working, if it is too high, the motor has jammed. You can also monitor the Voltage going to the motor, and signal a low battery. A simple voltage divider will work for that. You can then use the Voltage measured in the simple calculation required for Current from Voltage across Resistance and get close to an actual current value.

If the motor does not use many Amps, a large series resistor with a very low Ohmage (0.1 Ohm) or (0.001 Ohm) will do, leading to a Op-Amp, non-inverting amplifier, to amplify the voltage across the resistor to the ADC. This will give the current reading. Make sure the resistor is heavily heatsinked.

If the motor is high Amperage, there are devices available that do the same job as the resistor/op-amp, but can manage larger DC currents.

m.kaviani

simply use a mercury switch installed inside a plastic bulb with a few meters of wire. connect it to an ON-delay timer. adjust the level.
now when the level is high the switch is closed. when level is going down switch will open.
ON-delay timer will use to denounce the sea wave.

rick.curl

If you just want to sense the presence of water, it is important to use AC on the sensing probe to avoid corrosion. Here is a circuit I have used:  image_2021-03-20_065547.png
Have the pic generate a PWM signal, maybe around 1 to 10 Khz and feed it into the PWM connection on the drawing.  Then, set up either an A/D input or comparator to look at the signal coming out of the circuit.  If it's high, there's no water, and if it's low water is detected. 
I hope this helps.

-Rick

towlerg

Thanks all

@top204 Its an automatic bilge pump, so unless it fails for other than the most likely ie flat battery, there won't be any current to measure.
@m.kaviani yes I could use a float switch but if the water level rises above the switch it'll probably short out. I guess I could play with a float on an arm.
@rick.curl although corrosion isn't an issue, the probes will be clear of the water till the pump fails, it makes sense if the circuit is that simple. Are the diodes you used critical or will any diode work? 

top204

If the tank is, relatively, clean. You can use a simple ultrasonic sensor at the top of the tank to measure the water level. They can be made waterproof, just look at the sensors used for reverse parking sensors on cars.

One of the outdoor sensors could be used in your own Time Of Flight circuit and firmware.

rick.curl

Quote from: towlerg on Mar 21, 2021, 09:58 AM@rick.curl although corrosion isn't an issue, the probes will be clear of the water till the pump fails, it makes sense if the circuit is that simple. Are the diodes you used critical or will any diode work? 
The reason I mention corrosion is that if you flow DC to the probe so you can detect resistance, that direct current will cause corrosion.  Lots of it.  Using AC causes an equal amount of positive and negative current flowing, so they cancel each other out.

Any silicon diode will work. The circuit is very non-critical.

-Rick

towlerg

@rick.curl Thanks again for info, I'll probably go with your circuit. BTW I understand why using AC is a good idea but actually in this case hopefully the probes will never touch the water.