Reason behind time delay for LEDs(Water level indicator)

Thread Starter

rafiec14

Joined Dec 14, 2019
71
The CD4049 would be a better choice but you should use higher value resistors, like 100k or more to ground, and then to prevent electrostatic or environmental discharge put another 100k between the input of the CD4049 and its input, to protect the input protection diodes on the CD4049.
Kindly mention changes to the circuit -1644364356967.png
 

DickCappels

Joined Aug 21, 2008
10,661
You will probably have less of a problem with the dimming LEDs if you also make the resistors to ground 100k.

Also put 100k in series with pins 3,5,7,9, and 11 for protection of the IC.

I think the CD4049B version will be able to drive the LEDs better than the non-B version.

With a 12 volt power supply you are very close to what the CD4049B can sink to drive the LEDs, at some point you might want to change the resistors pulling up the anodes of the LEDs to 2K or higher. If everything is fine with 1k, no problem.
 

sghioto

Joined Dec 31, 2017
8,634
The 4049 has a higher current rating and can readily supply 10ma for the LEDs.
As far as adding the caps I would install them directly from the input pins to ground creating a high pass filter with the 10K resistor and change the pull down resistors to 100K.
1644420509241.png
 

Tonyr1084

Joined Sep 24, 2015
9,744
Using SuperBright LED's you can drop the current way down to somewhere around 2 to 5mA and have plenty of brightness even in daylight conditions. Also, the addition of Q1 for the buzzer is definitely recommended as the 4049 can not provide sufficient current to drive the buzzer on its own. A good addition.
 

ThePanMan

Joined Mar 13, 2020
921
Kindly mention changes to the circuit -View attachment 260191
Using recommendations from others is a good idea. Change the 10K to at least 1MEGΩ as in post #43 along with the caps should do perfectly. We haven't discussed what LED's you're using, so we're pretty much guessing at the correct current for them. If I were building this, for the LED's I'd use my White SuperBright LED's with a forward voltage of 2.9Vf. With a 9V battery I'd use 5mA current. Meaning the resistor would be (9V - 2.9Vf) ÷ 0.005 = 1.22KΩ. Since I don't have that in stock I'd use the nearest standard size I have, leaning toward the higher side. I'm away from my stock room, but if I had to I would use a 1KΩ insures with a 330Ω resistor which would give me 5.2mA. OR if I used a 470Ω instead of the 330 I'd have 4.6mA. If that proves to be too bright you can extend the life of the battery by dropping the current to 2mA. That case a 3.3KΩ resistor would give me 1.8mA. Close enough to call it 2mA. I'd have to go to my lab and test out that value, but I suspect it's a pretty good representation of what we're suggesting. Having five LED's lit at once you're drawing 10mA. That's going to run your 9V battery down rather quickly. A better option would be a power supply such as a wall wart. The 4049 won't work under 6V (I believe) so you'd have to find one either at 9V or at 12V. Or buy a variable supply, one that can give you the desired voltage. I recall seeing at Radio Shack a wall wart with a switch on the exterior that you could select several different voltages. Again, I'm away from my stock room. The point is - there's options. Batteries will be OK as long as you have to push a button to test the water level. But then in that case you shouldn't need the buzzer. Another energy drain. And that's going to be the key - how fast you drain your batteries.
 

Thread Starter

rafiec14

Joined Dec 14, 2019
71
Thanks for all your concerns and recommendations.
I'm using 5mm 546 oval Blue LEDs whose forward voltage is 2.1v and forward current is 30mA. Here are images of the circuit.
20220125_124251.jpg

20220125_124022.jpg

I would change the circuit and test it, then I will give the result here.
 

AnalogKid

Joined Aug 1, 2013
12,143
1. Each input of the ULN2003 already has two pull-down resistors in series, shunted by two diodes (transistor base-emitter junctions). The combined value is approx. 10 K, and the apparent value decreases with increasing input voltage as the diodes start to conduct. Adding an external pull-down resistor to each input should make the problem worse.

2. Each input of the ULN2003 has an input resistor in series with a darlington stage. The resistor value is 2.7 K. This resistor forms a voltage divider with the two shunt resistors in (1). Adding an additional input series resistor, especially one so large as 47K, increases the attenuation of the voltage divider by 460%. This increases the input current needed to activate an output by the same 460%. This should make the problem worse.

I suggest taking the original circuit, eliminating the 47 K input resistors and any external pull-down resistors, and connecting the ULN2003 inputs directly to the five probes. It is crude, and oxidation will be a problem, but this should determine if this circuit approach is salvageable.

ak
 

Thread Starter

rafiec14

Joined Dec 14, 2019
71
You mean to say that I shall remove the 47K resistors from the circuit? Any other changes to be done? How to prevent oxidation ?
 

AnalogKid

Joined Aug 1, 2013
12,143
[QUOTE="rafiec14, post: 1708205, member: 669362"Any other changes to be done? How to prevent oxidation ?[/QUOTE]
Interestingly enough, it might not be all that difficult. The ULN2003 has diodes at the inputs to prevent damage by a reverse connection (input voltage below GND). So *maybe* the only change would be to drive the "common probe" with a square wave instead of DC. The 2003 input stage will half-wave rectify the input which will make the LEDs dimmer. You can correct for this by reducing the value of the current limiting resistors.

You can make an oscillator by adding a 555 to the project, or maybe by using the two unused sections of the ULN2003. Either way, you'll need a coupling capacitor to level-shift the output so it goes both above and below GND.

ak
 
Last edited:

LowQCab

Joined Nov 6, 2012
5,101
A Sample & Hold arrangement could reduce the "On-Time" by many orders of magnitude.
But I don't think the Thread-Starter is experienced enough, nor inclined to, take-on more complexity..
.
.
 

Thread Starter

rafiec14

Joined Dec 14, 2019
71
1. Each input of the ULN2003 already has two pull-down resistors in series, shunted by two diodes (transistor base-emitter junctions). The combined value is approx. 10 K, and the apparent value decreases with increasing input voltage as the diodes start to conduct. Adding an external pull-down resistor to each input should make the problem worse.

2. Each input of the ULN2003 has an input resistor in series with a darlington stage. The resistor value is 2.7 K. This resistor forms a voltage divider with the two shunt resistors in (1). Adding an additional input series resistor, especially one so large as 47K, increases the attenuation of the voltage divider by 460%. This increases the input current needed to activate an output by the same 460%. This should make the problem worse.

I suggest taking the original circuit, eliminating the 47 K input resistors and any external pull-down resistors, and connecting the ULN2003 inputs directly to the five probes. It is crude, and oxidation will be a problem, but this should determine if this circuit approach is salvageable.

ak
Are there any changes to be done in circuit below using CD4049?
Level Sensor FLAT .png
 
Top