Decade counter 4017!!!

Thread Starter

Thao Vu

Joined Apr 27, 2017
19
I'd like to ask about the functionality of the Diodes 1N4148 in this case. What is its purpose?
I presume when Q0 = high, Q1 = low, current flows through the diode 1N4148 and return back to pin Q1. So it is creating a short circuit.
and so on.
What is the technical purpose for these diode?

Thank you.

Fig.-2-Circuit-diagram-3.jpg
 

dendad

Joined Feb 20, 2016
4,368
Yes, it is odd. There should be diodes on each output. Also, the transistors are best to have a B-E resistor.
It looks like the designer wanted to run at half the speed by ORing the pairs of outputs together.
Why not run the 555 at the required speed, and then hook one transistor per first 5 outputs and connect output 6 to the reset?
 

Thread Starter

Thao Vu

Joined Apr 27, 2017
19
Yes, it is odd. There should be diodes on each output. Also, the transistors are best to have a B-E resistor.
It looks like the designer wanted to run at half the speed by ORing the pairs of outputs together.
Why not run the 555 at the required speed, and then hook one transistor per first 5 outputs and connect output 6 to the reset?
I can understand if the designer used diodes on each output. but in this case, I am confusing if Q0= high, Q1= low, then the circuit is short by low output.
I am curious if the IC 4017 will have both Q0 and Q1 output high simultaneously.
 

Thread Starter

Thao Vu

Joined Apr 27, 2017
19
This is my simulation. I am observing that Q0 = high and Q1 = high simultaneously.
I will prefer to use diode at each output.

4017 Q0 &Q1.png
 

WBahn

Joined Mar 31, 2012
29,489
I'd like to ask about the functionality of the Diodes 1N4148 in this case. What is its purpose?
I presume when Q0 = high, Q1 = low, current flows through the diode 1N4148 and return back to pin Q1. So it is creating a short circuit.
and so on.
What is the technical purpose for these diode?

Thank you.

View attachment 291694
Where did this schematic come from?

It has other issues, as well. Namely LEDs in parallel and output current needs that significantly exceed the spec'ed capabilities of the part.
 

Thread Starter

Thao Vu

Joined Apr 27, 2017
19
Where did this schematic come from?

It has other issues, as well. Namely LEDs in parallel and output current needs that significantly exceed the spec'ed capabilities of the part.
I copied this schematic from other electronic forum with learning purposes.
 

Jerry-Hat-Trick

Joined Aug 31, 2022
445
Better to connect reset pin 15 to Q5 and just use Q0 to Q4 to drive the five transistors, ditch the diodes and halve the frequency of the 555 for the same (intended) result. Ideally, split the parallel LED chains to have their own resistor for each pair of series LEDs
 

Ian0

Joined Aug 7, 2020
8,939
If you were to reduce it to 3 LEDs per channel, you could connect them in series directly to the 4017 outputs, and eliminate all the diodes, all the transistors and all the resistors except R1 and R2.
(Three white LEDs on a 9V supply might be a bit dim)
 

AnalogKid

Joined Aug 1, 2013
10,777
As above, this schematic has...issues. Please post a link to the source of the schematic. I'd like to see what they have to say about it.

ak
 

ElectricSpidey

Joined Dec 2, 2017
2,628
If you absolutely needed to OR the outputs of the 4017 (for whatever reason) it would be better to use a couple of load drivers, that would eliminate the base resistors and the diodes. (and any "pull" resistors which aren't really needed anyway)

The only thing I can think of for this configuration is the designer doesn't know how to use the reset pin.
 
Last edited:

Audioguru again

Joined Oct 21, 2019
6,435
The complicated circuit was designed by somebody who did not read the datasheet for the CD4017.
I have many LED chasers with a CD4017 directly driving LEDs and powered from a 9V battery. No transistors. no diodes and no resistors. MY LEDs are 2.0V red ones with two in series making 4V and 3.3V white, blue and modern green LEDs.

1) Only one output goes high at a time and all the other outputs are low.
2) The maximum allowed power from each output is 100mW.
3) The Texas Instruments datasheet has a graph showing supply voltages and typical active high output voltages vs output current.

Here is the graph showing the CD4017 powered from 10V and directly driving a white, blue or moderns green 3.5V LED. The typical current is 17mA. The output of the CD4017 heats with (10V - 3.5V) x 17mA= 110.5mA which is too hot.
But powered from 9V the power is less at 15.5mA and 5.5V which heats with 85.3mW. If the LED is 3.0V then the typical current with a 9V supply is 18mA and the heating is 108mW which is a little too high so the 3.0V for the LED should be higher.

Each output of the CD4017 is active for only a moment so there is no continuous heating and the IC is fine.
 

Attachments

WBahn

Joined Mar 31, 2012
29,489
I copied this schematic from other electronic forum with learning purposes.
So that's a good lesson -- while there are useful schematics and good posts out there, there's also a lot of junk. So you are doing the right thing by trying to understand why the schematic you found is the way it is.
 

AnalogKid

Joined Aug 1, 2013
10,777
Somebody can't count...I only see 17 LEDs. (on the BB)
That's the prototype, and the least of the problems. Note that the 1N4148 diodes are there.

I know I'm getting old, but what's with all of the small images. The schematic opens into something large enough to read, but the prototype image is not good.

ak
 

Thread Starter

Thao Vu

Joined Apr 27, 2017
19
I found Working Description of this circuit in that forum. It is saying that 2 consecutive outputs will drive the transistor.

"
Working
As mentioned earlier, the 555 timer IC works in astable multivibrator mode. Based on the above-mentioned components, the frequency of the output pulse is around 12Hz.

The output of the 555 timer is supplied as a clock input to the 4017 decade counter. This 12Hz frequency can be changed by changing the timing components R1, R2, and C2. In place of R2, you can use a pot to vary the output frequency.

Whenever there is a low to high transition on the clock signal, that is, on the rising edge, the output of the counter is incremented by 1. You cannot change the flash rate in this project as the astable multivibrator built around IC1 generates a fixed frequency.

IC2’s five outputs Q0, Q2, Q4, Q6, and Q8 are connected to the anodes of respective 1N4148 diodes D1 through D5. The remaining five outputs Q1, Q3, Q5, Q7, and Q9 are connected to the cathodes of respective 1N4148 diodes.

So, two consecutive outputs drive individual transistors T1 through T5. The bases of all these five transistors are connected to the outputs of 4017 to drive various color LEDs.

Here, we have used all ten outputs of 4017 to flash the LEDs. Outputs Q0 and Q1 control the red LEDs, outputs Q2 and Q3 control the green LEDs, outputs Q4 and Q5 control the blue LEDs, outputs Q6 and Q7 control the white LEDs, and outputs Q8 and Q9 control the yellow LEDs.

The four red LEDs are driven by transistor T1 when outputs Q0 and Q1 of IC2 go high. Likewise, the four green LEDs are driven by transistor T2 when outputs Q2 and Q3 of IC2 go high. This goes on for the blue, white, and yellow LEDs driven by transistors T3, T4, and T5, respectively.

The working of the circuit is simple. As soon as the power is switched on, the 5-color flasher starts flashing. First of all the four red LEDs glow, then the four green LED glow, followed by the four blue, white, and yellow LEDs. Thereafter the cycle repeats endlessly.

An actual-size, single-side PCB layout for the 5-color flasher is shown in Fig. 3 and its component layout is in Fig. 4. After assembling the circuit on PCB, enclose it in a suitable box. Fix all the 20 LEDs in a pattern of your liking, like a star or a circle."
 

WBahn

Joined Mar 31, 2012
29,489
A description of the desired behavior found on the Internet somewhere doesn't mean that that's how it will actually work and definitely doesn't make up for poor design.

Connecting two outputs to opposite ends of a diode and having one output be HI and the other LO results in one of two situations. When connected as shown by Q0 and Q1 in the diagram, when Q0 is LO and Q1 is HI, the diode is reverse-biased and the output going to the HI. Everything is happy. But when Q0 is HI and Q1 is LO, the diode is forward biased and the voltage difference between the two inputs will be clamped to somewhere around one diode drop (~0.7 V). They are in contention, the current draw is excessive, and the voltage seen by the rest of the circuit is indeterminate.

If you want to use diodes to let two outputs pull a signal line HI when one of them is HI and the other is LO, then use two diodes. Connect the anodes of one diode to each output and tie the cathodes together and send this signal to your load.
 
Last edited:
Top