Water level inidicator using 74LS00 need help

Audioguru

Joined Dec 20, 2007
11,248
An old fashioned 74LS00 needs an input current much higher than water can provide unless it is salty water.
The 74LS00 has a 4mA output current when low to light an LED dimly but its output high current is too low to light an LED (as you found).

To make the output drive an LED when it goes low then the anode of the LED must be connected to +5V and its current limiting resistor connects to the output of the gate. Connect both inputs to one probe and connect the other probe to +5V.
Make the surface area of each probe high by making them long. Space them close together in the water and add salt to make the water conductive.
 

Thread Starter

amir129

Joined Mar 12, 2012
12
Hi,

I bought 4011 CMOS ic and it seems to be partially working when probes dipped into the water. However I noticed few things. When I dipped probe in the water the LED turns off but when I take the probe out of water it takes few second for LED to turn back on. I am not using any pull up or pull down resistors. also out of four gates some LED don't turn on until I touch the input points. I think that has to do with the pull up or pull down resistors.

Can anyone help me draw a circuit diagram using 4011 chip using all the pull up/pull down resistors I need and where to connect. The diagram would really help.

Thanks everyone for helping me out. I think I'm very close to finishing this.
 

MrChips

Joined Oct 2, 2009
30,711
Did you try the circuit with the 74LS00?

You can try the 4011 QUAD NAND GATES but note that the pinout is different from the 74LS00.

You cannot get enough current from a CMOS gate to drive and LED. You can either use an NPN transistor or you can use the 74LS00 as shown in the circuit.

For a CMOS gate, use a 1M-ohm or 470K-ohm pullup resistor (or any similar value) between +5V and the water sensor wire.
 

Thread Starter

amir129

Joined Mar 12, 2012
12
hi MrChips,

I didn't try the circuit. The reason is that we have to use 4 leds. With one gates output going to the other gates input would complicate the circuit. This is for the school project for Grade 4. It would be hard for my son to understand. Which is why i want to avoid capacitors/transistors. The resistors is easier to explain and he understands that.

I did try 4011 QUAD NAND GATES chip and it was partially working as in my email. The odd thing is that when both input are touched to the ground the LED turns off. If they are not touched the LED stays on. I thought NAND should be reverse. so if both inputs (0 - 0) connected to ground the output should be (1) which should turn on the LED. ...
i'll try pullup resistors tonight and let you know.
 

MrChips

Joined Oct 2, 2009
30,711
Firstly, you said that you have to use a 74XX series chip. You didn't say why.
Now you say that you have to use 4 LEDs. You still don't say why. It would be best to state clearly so that we understand your limitations or restrictions.

Here is a circuit for the 4011 CMOS NAND GATE.





Note that pinouts are:

1, 2 - inputs, 3-output
5, 6 - inputs, 4 - output
8, 9 - inputs, 10 - output
12, 13 - inputs, 11 - output
 

Thread Starter

amir129

Joined Mar 12, 2012
12
hi MrChips,

Apologies for not providing detailed requirements. Being new to electronics I didn't know about CMOS chips. I found few examples of NAND gates that were all using 74XX I.C. Didn't know CMOS does the same thing. I thought with CMOS you would have to put lot of capacitors and transistors.

Thanks for the diagram. Being a software professional I am finding this very interesting.

Just one question. see attached image. Is this correct? is this how i will attached probe in the water?
 

Attachments

Audioguru

Joined Dec 20, 2007
11,248
If the power supply voltage for the 4011 gate is only 5V then its output current into the LED will be only 1.25mA to 2.5mA (very dim LED) without the current-limiting resistor.
If the power supply is 9V then the LED current is 8mA to 16mA and a current-limiting resistor might be needed.
 

MrChips

Joined Oct 2, 2009
30,711
I agree. I didn't think that a CMOS gate has enough source/sink capability to light an LED. The specs for MC14011BCP at 5V gives source or sink = 2.4mA min/4.2mA typ. I tested this on a breadboard and the LED is ok with 220-ohm resistor, drawing 3.4mA at 2.5V Voh.
 

Thread Starter

amir129

Joined Mar 12, 2012
12
Hi MrChips,

I built the circuit with all four gates and it is working fine. Even with 1meter wire the LEDs were turning on and off properly when the water is filled.

One question. Why the 1M resistor is used between +5V and the input gates? Input of the gates and ground are already used for probe which should give the input gate LOW (0).

Again, thanks everyone for their input. I will upload the pictures once the project is completed.

Thanks,
 

Audioguru

Joined Dec 20, 2007
11,248
The 1M resistor makes the gate input high (when there is no water) then the output is low and turns off the LEDs.

Without the 1M resistor then the Cmos input floats high or low or all over the place. The LED might flicker when there is no water. An old fashioned TTL gate input floats high.
 

Thread Starter

amir129

Joined Mar 12, 2012
12
How 1M resistor will make the gate input high when we are limiting the current coming from +5V to the input of the gates.

Isn't +5V considered as High and Ground (0v) as LOW?
 

Audioguru

Joined Dec 20, 2007
11,248
The 1M resistor connects the inputs of the gate to +5V when there is no water. The water connects the inputs of the gate to 0V.

The inputs of Cmos draw no current, that is why a resistor value as high as 1M can be used.
 
Top