Continue to Site

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 help

Status
Not open for further replies.

danfontan

New Member
I came across an issue and am hoping to see if someone can help me.

I am using a 5v dc power supply and trying to advance to the next out output of a CD4017 with a pushbutton. Can someone show me the circutry needed to do this?

Thanks in advance,

Dan Fontan
 
The network on the clock is for debouncing the switch
 

Attachments

  • 4017.gif
    4017.gif
    4.9 KB · Views: 2,647
Hi anyonek, a few years later....your diagram shows the 4017 going through all outputs and then resetting. I have pin 7 connected to 15 to reset after three outputs. How would this affect the debouncing circuit, where you have 15 grounded directly?
A different, more basic question-I'm using 4x1.5V batteries as a 6V power supply. What value capacitor should I place across this? I'm only running three small LEDs in addition to the chip.

thanks for your help.
 
Hi Jimbo (a few years later),

The debounce circuit is needed with a pushbutton clock input. The reset has nothing to do with it.

With a 6V supply, the current from the CD4017 into 2V red LEDs is only 5mA.
When the battery drops to 4V then you will hardly see the LEDs.
The battery voltage is too low to use 3.5V blue or white LEDs.

If you use a 74HC4017 IC then you can use resistors to limit the current in the LEDs to 25mA when the battery is 6V and they will still be pretty bright when the battery drops to 4V. Blue and White LEDs will work just as well as red.

I have my 3V Ultra-bright LED Chaser project with a 3V battery and the 74HC4017 still works when the battery has dropped to 1.25V but the red LEDs are not lighting anymore. They become pretty dim when the battery has dropped to 1.5V.
 
A 100nF ceramic capacitor across the IC pins will do fine.
 
Thanks Audioguru and Hero999. I've built the circuit already, using the diagram at this link, modified to reset from pin 7:

**broken link removed**

I will add the 100nF cap across the power. The problem I'm having is with the push button switch-the LEDs are lighting up fine, I calculated current limiting resistors for 10mA with a supply voltage of 6V.
Question here-the supply is 6V-but what is it at the 4017 outputs? I've seen a number of comments about not needing cl-resistors with this chip.
Bottom line is that they do light up, and are not too bright, which is fine for my purposes [kids' toy].

The big problem is with the switching. I'm using a simple spring-loaded push button switch, push to close the circuit and trip the counter to the next output.

Unfortunately, when I push the buttom, there isn't a smooth transition to the next LED. They all flicker a bit and it's completely random as to which LED lights up next. I'm guessing the switch is triggering the 4017 half a dozen times per depression (is this 'bouncing'?).

So, is there a way to interrupt that signal after only the first contact, perhaps by having a half-second timer to stop the chaos?

Or perhaps there's some other fatal flaw with the circuit as a whole? I'm pretty much a novice here.

The IC I'm using has HEF4017BP printed on it
the resistors are 330ohm 1/4w
LEDs are standard 5mm type shop guy said 3.5V but I've calculated for 3.0V @ 10mA to be on the safe side

Thanks again,

Jim
 
It sounds like it's bouncing to me.

You might be able to fix it by sticking a 100nF capacitor across the switch.

You don't need a series resistor because the IC will limit the current to a safe level but it might be too bright for what you want.
 
Try this to see if it will work.

The idea is to maintain the CLK pin high after pushing the button even if it bounces for short duration during its closure.
 

Attachments

  • 4017xx.gif
    4017xx.gif
    5.1 KB · Views: 2,559
The Texas Instruments datasheet for the CD4017 shows that its output current with a 5V supply is only 2.5mA into a 3.5V white or blue LED. So with a 6V supply its current is only 3.5mA. The 330 ohm resistors are not needed. They reduce the 3.5mA to only 2.4mA. Not bright.

If you use a 74HC4017 to get more current then only a single current-limiting resistor is needed for all the LEDs since only one is lighted at a time. The resistor goes in series with all the cathodes of the LEDs and ground.
 
works well!

Thanks guys,
great help. I read up on RC debouncing circuits, Schmitt triggers, time coefficients etc, but in the end the 100nF capacitor completely solved the problem, thanks hero999.
I also removed the cl resistors, and the LEDs are marginally brighter.

Next step:
how to add a little time-lag to the LEDs so they fade-in and fade-out more like incandescent lights. I'm guessing a capacitor around the LED or nearby.

Any thoughts?

Jim
 
The output current from the CD4017 is low enough that a capacitor of about 100uF to 1000uF across each LED will make the LEDs fade in and out.

I have some 1000uF/16V capacitors that are small and inexpensive.
 
Also since the voltage across the LEDs is only 4V at most the capacitor only needs to be rated to 6V and you can get very small 6V 1000:mu:F capacitors.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top