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.

Circuit Help - 4017

Status
Not open for further replies.

Akd

New Member
Hi

Hi i am Andrew and I am new to this forum. I am in need of some help as i am a novice to electronics, but i can solder ok. The last time i did electronics was in high school about 12 years ago.

I am trying to create a simple circuit using the 4107 decade coutner.

What i am trying to acheive is basically a circuit that when you press a single central button, the next light in sequence lights up, and the previous light turns off.
There are 10 white leds in a circle. And like i said, when you press the button, the led in position 1 turns off and the #2 turns on. Each time you press the button, the next led lights up.

I was told that i need to use the 4017 decade counter and transisters between the light and the counter. I am not sure if this is right or not, but any help is greatly appriciated.
If anyone has created this type of circuit, or can give me any help in being able to make it, that would be grealty appriciated.

Thanks again
Andrew D
 
The only way i can see transistors as a requirement is if you needed large amounts of current to drive a motor or something similar.

for LED's, they can be taken directly from the chip.

There are 2 clock pulse pins on the 4017. one is the inverse of the other. Connect the noninverting one (the one with the pin not attached to a circle) to VCC, VCC to battery. Connect the inverting one to a pull-up resistor (a resistor between VCC and the pin). Also Connect the inverting clock pin to one pin of your external push button. The other pin is connected to ground.

Connect the anodes of every LED to all the outputs through 470 ohm resistors except Q5-9. They begin with Q. The other end (cathode) of the LED's are connected to ground. Also, ground the RESET pin.

Use a 5V power supply.
 
Hi Andrew,
A 4017 can directly drive LEDs with a 9V battery and no resistors nor transistors. The current for each white LED (3.5V?) will be about only 8mA which might be enough for brightness. If you use a lower supply voltage (a 9V battery's voltage will drop to 6V over its life, and the brightness will also drop) or need more current and brightness then transistors and current-limiting resistors are needed to drive the LEDs.

You can't just use a pushbutton with a resistor to clock a 4017 or any other digital counter. The contacts on a pushbutton bounce a few times very quickly which the counter will count. You need a "de-bounce" circuit to provide a single output when the pushbutton is pushed.
 
Hey

Thanks so much to the both of you Rajagopal87 & mstechca.

This is exactly what i was after.

Thanks again

Andrew D
 
audioguru said:
Hi Andrew,
A 4017 can directly drive LEDs with a 9V battery and no resistors nor transistors. The current for each white LED (3.5V?) will be about only 8mA which might be enough for brightness. If you use a lower supply voltage (a 9V battery's voltage will drop to 6V over its life, and the brightness will also drop) or need more current and brightness then transistors and current-limiting resistors are needed to drive the LEDs.

You can't just use a pushbutton with a resistor to clock a 4017 or any other digital counter. The contacts on a pushbutton bounce a few times very quickly which the counter will count. You need a "de-bounce" circuit to provide a single output when the pushbutton is pushed.

Is that easy to achieve? The "de-bounce"circuit i mean.

Is there another way to do this then?

Thanks again for the feedback

Andrew
 
The 'Heart" circuit is stupid to use current-limiting resistors for the LEDs when resistors aren't needed with only a 9V battery, the IC will limit the current. With a 15V or 18V supply then a resistor is needed.
It is also stupid to use a current-limiting resistor for each LED when just a single resistor between where the cathodes connect together and ground will do the same thing. Only a single output is active on a 4017 at a time.
 
if the pushbutton doesn't work for you, then rip it out, rip out the ground connection, and use the wire as the control. plug it into -ve to activate the circuit, then pull it out. This is equivalent to a button press, but better because you will know exactly whether a high or low voltage is applied.

It is ridiculous, but I think a button is more professional.
 
4017 DEBOUNCE

:D YOU COULD USE A 4093,WIRE IT UP AS A SET,RESET LATCH,TIE THE TWO INPUTS TO SUPPLY VIA 1K RESISTORS,CONNECT THE POLE OF YOUR SPDT(SINGLE POLE DOUBLE THROW ) SWITCH TO GROUND AND AWAY YOU GO,DEBOUNCED CLOCK SIGNALS FOR YOUR 4017...
USE PIN 14 FOR YOUR CLOCK SIGNAL,TIE PIN 13 TO GROUND ,PIN 15 IS YOUR RESET(ACTIVE HIGH)

 
Re: 4017 DEBOUNCE

sheldonstv said:
:D YOU COULD USE A 4093,WIRE IT UP AS A SET,RESET LATCH,TIE THE TWO INPUTS TO SUPPLY VIA 1K RESISTORS,CONNECT THE POLE OF YOUR SPDT(SINGLE POLE DOUBLE THROW ) SWITCH TO GROUND AND AWAY YOU GO,DEBOUNCED CLOCK SIGNALS FOR YOUR 4017...
USE PIN 14 FOR YOUR CLOCK SIGNAL,TIE PIN 13 TO GROUND ,PIN 15 IS YOUR RESET(ACTIVE HIGH)

Caps, bold, italics - didn't you forget to underline?
 
Re: 4017 DEBOUNCE

sheldonstv said:
:D YOU COULD USE A 4093,WIRE IT UP AS A SET,RESET LATCH,TIE THE TWO INPUTS TO SUPPLY VIA 1K RESISTORS,CONNECT THE POLE OF YOUR SPDT(SINGLE POLE DOUBLE THROW ) SWITCH TO GROUND AND AWAY YOU GO,DEBOUNCED CLOCK SIGNALS FOR YOUR 4017...
USE PIN 14 FOR YOUR CLOCK SIGNAL,TIE PIN 13 TO GROUND ,PIN 15 IS YOUR RESET(ACTIVE HIGH)


you dont need to yell (use caps).

and I go against switches unless they are very easy to switch.
 
Akd
the reset is fine , the enable is fine ..
but that lil' blue guy is gonna have trouble with the clock, from the aformentioned switch bounce problem..
 
this should solve it..
EDIT this was from Sebi I believe..
 

Attachments

  • debounce_161_505.gif
    debounce_161_505.gif
    1.8 KB · Views: 1,009
The problem you're speaking of (the transistors) is because logic chips (like counters) are terrible at sourcing current. However you can make a change and use active low logic and have your counter sink current (which they are very good at).

So what that means is you connect up the positive end of a LED to +5 volts, the negative end to a limiting resistor, and that resistor goes to the terminal on the chip.
 
_3iMaJ said:
The problem you're speaking of (the transistors) is because logic chips (like counters) are terrible at sourcing current. However you can make a change and use active low logic and have your counter sink current (which they are very good at).

So what that means is you connect up the positive end of a LED to +5 volts, the negative end to a limiting resistor, and that resistor goes to the terminal on the chip.
But if you do that on a 4017, you'll have 9 LEDs on and 1 off - a circulating Darkness Emitting Diode. And what you said is true of some logic families (notably TTL). A 4017 has symmetrical drive characteristics - it sources as well as it sinks.
 
No _3iMaJ,
The CD4017 is a Cmos IC that sources and sinks the about same amount of current. Maybe you are thinking about TTL logic IC's that sink much more current than they source. Besides, the outputs of a CD4017 are active high. :roll:
 
Hi all

Thanks for all your posts.

Just to let you know, i got it working just the way i wanted.

However, one thing i noticed is that when it was hooked up, you press the button and the 1st led lit up, it moves to the 2nd, then the 4th and the the 10th.

The strange thing was, when i moved the wire from position 13 on the 4017 chip (enable) to the button, and move the posi 14 (clock) to the switch on the enable circuit, it works perfectly, moving the light to the next led like it should. I cant work it out, and well to be frank, cause it is working , i couldn't give a stuff, but it is just wierd.

Thanks again.

Andrew D
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top