Water Level Sensor Circuit using uln2004

Thread Starter

sniccus

Joined Jan 4, 2022
2
Hi All, I’m building the water level sensor as per this diagram
https://forum.allaboutcircuits.com/attachments/uln2004-water-level-indicator-jpg.71611/

My circuit differs only in the output where the LED is in series with a 5vdc SPDT pc board relay. The LED operates nice with 3.7v and exactly 5v appears across the coil.

My problem is, on my breadboard, I needed 80k or less resistance to trip the IC but my sight-glass with brass couplings at intervals for sensor levels provide around 100k. At a little over 100k the IC started to conduct, the LED was glowing but no enough to pull my relay.

I need to keep sensor current as low as possible to minimise electrolysis. Any suggestions on circuit alteration to allow triggering with at least 100k input in series with 12v + to the IC ?
 

sghioto

Joined Dec 31, 2017
3,061
The problem with the ULN series in this application is the low value of the internal resistors in the base to emitter junctions, typically 10K. Best bet is probably using individual mosfets like a 2N7000 as drivers or better this mosfet driver array: https://www.mouser.com/datasheet/2/408/TBD62084AFWG_datasheet_en_20160511-769649.pdf
What 5 volt relay module are you using? The typical ones I see used draw 75 ma at 5 volts is that in series with the LED?
 
Last edited:

MisterBill2

Joined Jan 23, 2018
11,619
The simplest way would be to bypass the 47K series resistors and do directly into the IC. Also, you can try using a positive electrode in the water that has more surface area.
 

blue_coder

Joined May 7, 2016
36
What 5 volt relay module are you using? The typical ones I see used draw 75 ma at 5 volts is that in series with the LED?
If the relay in in series with the led, unless you have a very unusual relay it won't be able to get enough current to switch. Could you use 12V relays (or 5V with 90 ohm power resistors?) and move the leds with current limiting resistors to the output side of the relays? Also, 3.7V across almost all leds would fry them, you need higher value current limiting resistors.
 

MisterBill2

Joined Jan 23, 2018
11,619
If the relay in in series with the led, unless you have a very unusual relay it won't be able to get enough current to switch. Could you use 12V relays (or 5V with 90 ohm power resistors?) and move the leds with current limiting resistors to the output side of the relays? Also, 3.7V across almost all leds would fry them, you need higher value current limiting resistors.
The brighter types of LEDs DO have a much higher forward voltage, but they are not the small indicator devices that we have had since 1970.
 

Rich2

Joined Mar 3, 2014
241
These types of sensor never work for long. My van had a simpler arrangement of a momentary switch and moving coil meter giving a variable current depending on water level. It worked for about a year then constantly needed calibration. Eventually when I removed the stainless steel rods, one of them was coated with electrolysis (anode?)..

Anyway that was a momentary current so one that's powered up all the time will probably only last a few hours. I replaced the system with a float switch at 25% up the side of the tank and that has been great.
 

MisterBill2

Joined Jan 23, 2018
11,619
If the relay is wired in place of the buzzer as shown on the diagram, then it is in parallel with the LED and resistor and it will function very well. Series and parallel can be confused by those not experienced in circuit analysis.
And the comment about the electrolysis products fouling the electrodes is certainly valid, although it depends a whole lot on the mineral content of the water and the pH level as well.
 
Top