Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

CD4017 Inverted count operation?

EdStraker

New Member
I am a hobbyist, and have dabbled in electronics for many years. An engineer I am not. I have made the "standard" 555/4017 sequencer circuit many times and in many forms. but I am stumped for a solution on this one.

In the "standard" configuration, the decade counter performs the Q0-Q9 count with one led on at a time. My question is, is there away to configure this circuit to have all LED's on, and perform the Q0-Q9 count turning the LED's off one at a time? And with minimal additional parts as space is at a premium with this particular project.

have attached a basic "standard" config schematic for reference.

My appologies for such a mundane first post. Thanks in advance for anyone who can assit me with this project.
 

Attachments

  • FV5SQ5EJBGU19FQ.LARGE.jpg
    FV5SQ5EJBGU19FQ.LARGE.jpg
    63.5 KB · Views: 34

rjenkinsgb

Well-Known Member
Most Helpful Member
Yep;
Connect all the LEDs between outputs and V+, each LED with its own resistor.
 

crutschow

Well-Known Member
Most Helpful Member
Connect all the LEDs between outputs and V+, each LED with its own resistor.
That will only turn one off at a time and leave the others on.
The OP wants them to sequentially go off.
 
Last edited:

crutschow

Well-Known Member
Most Helpful Member
perform the Q0-Q9 count turning the LED's off one at a time?
What happens after all the LEDs are turned off?
Does it turn all of them on again and continue the sequence?
 

AnalogKid

Well-Known Member
Most Helpful Member
Connect all the LEDs between outputs and V+, each LED with its own resistor.
Probably not.

For an early B-series CMOS logic part, there is a big difference between 4.7 mA through only 1 pin at a time, and 4.7 mA through 9 pins all the time..

(Assuming the LED Vf = 2.0 V)

ak
 

danadak

Active Member
This is a natural for Arduino. Board costs $ 3.

You can program in blocks. Kids are using this to program robots in school.

You drag and drop blocks, config them, then tell mBlock (free program you use to do this)
to upload to Arduino. Lots of fun, many videos on using this. When you tell it to upload it
generates for you the Arduino code on right side of screen and programs that into board.
Its basically C. code You can start looking at it as you do various projects and start to get a
feel for what C looks like. But again you dont write it, the blocks are "interpreted" into C
code for you. You just config the blocks.

Note you would not need the 555 timer chip, this board and example controls the rate sequence is
done.

1628211470024.png

The abouve example will do what you are looking for.

Board -

1628211748453.png


Regards, Dana.
 

Attachments

  • 1628211533104.png
    1628211533104.png
    259.5 KB · Views: 21

EdStraker

New Member
Probably not.

For an early B-series CMOS logic part, there is a big difference between 4.7 mA through only 1 pin at a time, and 4.7 mA through 9 pins all the time..

(Assuming the LED Vf = 2.0 V)

ak

Thanks for every one who replayed so quickly.
That didn't seem right to me either. How could you connect LED's to the 9v rail and then feed them into the Q# outputs?? Are they not also Output V+??
This was my original dilemma. Yes it is a 555/CD4017 running on a 5v-9v board.

I don't do Arduino. Even if I did it would make no sense to use a microprocessor simple to blink a few LED's. But thanks anyway.

Anyone with a direct solution? If even possible?
 

schmitt trigger

Well-Known Member
My two cents on this matter. Not attempting to convince anyone. Only a Personal experience.

Back in early 1979, I actually designed and built one, very similar to your requirements.
A Disco owner wanted a light chaser.

I had to define a state diagram, obtain the minterm expressions, and then reduce them using Karnaugh maps or Boolean reduction techniques. Translate all of this into a schematic utilizing real 74xx or 40xx gates and flip flops, and finally build it.
It was a lot of work. Are you familiar with those Boolean techniques?

When the Disco owner suggested a “simple update” to the light sequence, I had to recalculate all the previous steps, and then realized that this simple change required a complete and thorough hardware update.

That was when I realized that I should better implement it with a microprocessor.
Even though back then the primitive tools and low-horsepower microprocessors meant that I had to code using assembly language, and had to enter the individual opcodes via an hexadecimal keypad, in the end that was the better approach.
 

eTech

Well-Known Member
This should work.
It uses a 555 and two Hex D flip-flop chips. The LED's are high brightness, low current, LED's.
The mosfet provides a high-to-low reset signal for the CD40174's.

1628215459307.png


1628215502551.png
 

AnalogKid

Well-Known Member
Most Helpful Member
To be clear, the idea in post #2 is ok *except* for that output current thingy. With LEDs connected between the outputs and Vcc, all "off" outputs will be low, sinking current through all of the LEDs except for the "on" output. According to the datasheet, the low output current that pulls the output voltage up to 0.5 V is 2.6 mA, for a power dissipation in the output stage of 1.3 mW. This is way below the part's max spec, and the total current for 9 low outputs would be less than 24 mA. This probably is a safe value for the ground pin, although no max limit is specified. So if you get enough brightness at less than 3 mA, it should work reliably. If you try to run the LEDs at a more common current such as 10-15 mA, the output voltage and power dissipation both will rise significantly.

An alternate solution is a bank of ten p-channel MOSFETs, PNP saturated switches, or PNP emitter followers. The emitter followers will give the best performance with the fewest parts. As above, no matter what the driver, each LED will require a separate current limiter.

ak
 
Last edited:

eTech

Well-Known Member
Thanks for every one who replayed so quickly.
That didn't seem right to me either. How could you connect LED's to the 9v rail and then feed them into the Q# outputs?? Are they not also Output V+??
This was my original dilemma. Yes it is a 555/CD4017 running on a 5v-9v board.

I don't do Arduino. Even if I did it would make no sense to use a microprocessor simple to blink a few LED's. But thanks anyway.

Anyone with a direct solution? If even possible?

If you use two seperate chips to drive 10 low current, high brightness leds, there should be less of a concern.
The power drawn by 5 LEDs in each CD40174 in post #9 is less than 80 mW.
If you need to drive more powerful LEDs, then I recommend mosfet output drive transistors.
 
Last edited:

EdStraker

New Member
Would PNP transistors set up as NOT Gates using the output pulse of the 4017 to Base in order to switch off the LED? Or would the Q Pins need additional resistors to knock the current down further? Just a thought.
 

rjenkinsgb

Well-Known Member
Most Helpful Member
Probably not.

For an early B-series CMOS logic part, there is a big difference between 4.7 mA through only 1 pin at a time, and 4.7 mA through 9 pins all the time..

(Assuming the LED Vf = 2.0 V)

The outputs have symmetrical ratings for high drive and low drive, according to the data sheet.
At 5mA load, the internal dissipation per output is only about 10mW, so 90mW with nine LEDs on.

The device is rated for 500mW at under 100'C and 200mW from that to 125'C.

There is no reason it can not work, as long as the LED current is not excessive.
Using high brightness LEDs, 1mA would likely be adequate.

How could you connect LED's to the 9v rail and then feed them into the Q# outputs?? Are they not also Output V+??

Think of the output as internally having two switches, that connect it to either V+ or ground; actually two transistors (The Vin in this diagram would be from other logic within the IC).
220px-CMOS_inverter.svg.png


The LED & resistor could be to to either power rail, Vdd or Vss (assuming correct LED polarity) and it will turn on when switch / transistor connected to the opposite rail is on.

Just don't leave out the LED resistors, as some online examples do.
 

danadak

Active Member
My two cents on this matter. Not attempting to convince anyone. Only a Personal experience.

Back in early 1979, I actually designed and built one, very similar to your requirements.
A Disco owner wanted a light chaser.

I had to define a state diagram, obtain the minterm expressions, and then reduce them using Karnaugh maps or Boolean reduction techniques. Translate all of this into a schematic utilizing real 74xx or 40xx gates and flip flops, and finally build it.
It was a lot of work. Are you familiar with those Boolean techniques?

When the Disco owner suggested a “simple update” to the light sequence, I had to recalculate all the previous steps, and then realized that this simple change required a complete and thorough hardware update.

That was when I realized that I should better implement it with a microprocessor.
Even though back then the primitive tools and low-horsepower microprocessors meant that I had to code using assembly language, and had to enter the individual opcodes via an hexadecimal keypad, in the end that was the better approach.
I support folks that want to work with logic, of course that is what a micro is, a collection of logic.
Especially when it results in, generally speaking a reduction in parts count. And to your point, as
a designer we were impacted by marketing that wanted changes often. Made the design work
change minimal, as it often was code change, and allowed me to move on to the next project. As
a person with ADD this was a homerun, working on "new" stuff. And I did not have to churn the
HW prototype as much, which for me was BORING.

Regards, Dana.
 

crutschow

Well-Known Member
Most Helpful Member
It's not clear to me that simply inverting the CD4017 outputs will do what is desired:
My question is, is there away to configure this circuit to have all LED's on, and perform the Q0-Q9 count turning the LED's off one at a time?
When you say, "turning the LEDs off one at a time", do you want them to stay off, or go back on when the next LED goes off?
 

eTech

Well-Known Member
I am a hobbyist, and have dabbled in electronics for many years. An engineer I am not. I have made the "standard" 555/4017 sequencer circuit many times and in many forms. but I am stumped for a solution on this one.

In the "standard" configuration, the decade counter performs the Q0-Q9 count with one led on at a time. My question is, is there away to configure this circuit to have all LED's on, and perform the Q0-Q9 count turning the LED's off one at a time? And with minimal additional parts as space is at a premium with this particular project.

have attached a basic "standard" config schematic for reference.

My appologies for such a mundane first post. Thanks in advance for anyone who can assit me with this project.

The CD4017B does not provide latching outputs so is not suitable to provide the functionality you desire. Each clock pulse causes the previous output to reset. This operation is internal to the device and cannot be changed.
 

rjenkinsgb

Well-Known Member
Most Helpful Member
?????
The only person whos ever said they should go off sequentially (and stay off) is Crutschow.

The OP asked for the inverse of the standard sequence & never said "stay off".
 

Latest threads

EE World Online Articles

Loading
Top