It's a matter of balancing how much current the 4000 series CMOS IC's can source or sink, keeping in mind the current it takes to light the LEDs, along with what voltage is required to operate the logic portion of the circuit.Picked up some "red" LEDs @ Radio Shack.
Data states = 2.6v @ 28ma.
In 12v ckt = 12v-2.6v = 9.4v @ 28ma = 335 ohm limiting resistor = 330 ohm.
Using 2.2k resistors = 9.4v/2200 = 4.27ma.
Why do I want to use a 2.2K resistor ?
-----------------------------------------
Re-set up circuit with "AND" gates using 2.2K resistors on LEDs.
#1 - #1 LED lights
#2 - #1 & 2 LEDs light
#3 - #1 & 2 & 3 LEDs light
#4 - #1 & 2 & 3 & 4 LEDs light
#5 - All off
---------------------------------
MY GOD ! ! ! ! ! ! ! !
---------------------------------
Replaced 2.2K resistors with 100 ohm resistors
#1 - #1 LED lights
#2 - #2 LED lights (#1 goes out)
#3 - #2 & 3 LEDs light
#4 - #4 LED lights (others go out)
#5 - All off
-----------------------------------
Conclusion =
2.2K resistors indeed accomplished the task !
Red LEDs seemed about the same brightness.
Inquiry =
Please explain how/why you came up with the values of 2.2K ??
--------------------------------
Even 2.2k Ohms was pushing it. With Vdd=12v, sourcing 4mA will cause the IC's output to drop a volt or two according to the datasheet.
My goal was to make as few changes as possible to enable your circuit to function. The intensity of the LEDs was not a big concern; just that you could tell whether they were on or off.
So, after looking at Motorola's datasheet for the 4017, I decided that 4.5mA was about the most current it could source with a 12v supply without losing (dropping) too much voltage across the IC's internal circuitry. You also have diodes in the output path of the ICs, which will have about a 0.6v drop across them.
I assumed you were using LEDs that had a Vf of 2v.
So, what resistance was required to get the current down below 4.5mA?
Rlimit >= (Vsource - (VfLED+Vfdiode)) / 4.5mA
Rlimit >= (12v - (2v+0.6v)) / 0.0045 A
Rlimit >= 9.4 / 0.0045 = 2,088 Ohms.
The closest standard value of resistance >= 2,088 is 2.2k Ohms.
Then you replaced the 2.2k resistors with 100 Ohm resistors. I would not be surprised to find that those ICs are now fried, as you have subjected them to current far beyond what they were rated for.
Keep this in mind while you're experimenting: very few 4000 series CMOS IC's will survive if you subject them to high load currents. For typical logic circuits, they will last much longer if you keep the load currents below 2mA.
Last edited: