6
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

I'm attempting to make a circuit that flashes each LED sequentially. So far my 555 timer works just fine and gives me a pulse about 3x/second for the clock on the CD4017. However the LED's flash in random orders.

For the split second that the timer supplies voltage to the 4017, a random LED is lit up. For the split second that it stops supplying voltage all the LEDs dimly flash on.

Note that for the sake of simplicity, I only included 5 LED's in the schematic. There's ten LEDs for the 10 outputs of the CD4017.

Any idea what's going wrong here? I'm a first year student of E.E. so I'm still learning a lot. Thanks!

EDIT: This is essentially what I'm trying to create: 555-4017 LED Sequencer

\$\endgroup\$
  • \$\begingroup\$ You've verified that LED 0 is connected to pin 3, 1 to 2, 2 to 4, etc. as per the datasheet? \$\endgroup\$ – Ignacio Vazquez-Abrams Aug 18 '13 at 2:20
  • \$\begingroup\$ Yep. It couldn't be that though since sometimes the same LED will flash two or three times in a row ocassionally. \$\endgroup\$ – codedude Aug 18 '13 at 2:23
  • \$\begingroup\$ Related question: electronics.stackexchange.com/q/37248/2028 \$\endgroup\$ – JYelton Aug 18 '13 at 7:24
  • \$\begingroup\$ Also note that the timer never actually "stops" supplying voltage; it supplies a high voltage, and then it supplies a low voltage, repeatedly. Supplying no voltage requires either a high-impedance output or leaving an input pin floating. \$\endgroup\$ – Ignacio Vazquez-Abrams Aug 18 '13 at 8:50
  • \$\begingroup\$ @IgnacioVazquez-Abrams I didn't know that. Thanks for the heads up! \$\endgroup\$ – codedude Aug 18 '13 at 20:33
3
\$\begingroup\$

Do you have the datasheet for your specific 4017? It is quite possible that you need more current than the 4017 can handle.

For example, the datasheet for a Texas Instruments CD4017BE shows (graphs on page 3) that with a drain-to-source voltage of 10V, each output pin can sink no more than ~15mA:

CD4017BE typical current sink characteristics graph

As @Tony mentions in his answer, if the LEDs have a typical forward voltage of 2 to 2.2 volts, then the 100Ω current limiting resistors you are using drop approximately 7 volts. Using Ohm's law, I = E / R, the current each output pin would need to sink is around 70mA.

Try a higher resistor value to lower the current significantly, say 10mA. The LEDs won't be as bright, but it might be within your 4017's current sinking ability and at least allow you to determine if things are working correctly.

You can figure out the resistor value to use by rearranging Ohm's law:

$$R = \frac{E}{I} = \frac{7}{0.02} = 350\Omega$$

If that works, and you want to make them brighter, you'll need to either find a 4017 that has greater current ratings on the output pins or add some transistors.

Edit:

Note that the circuit you linked has a "1K2" resistor connecting the LEDs to ground (negative). That's equivalent to 1.2kΩ which works out to slightly less than 6mA per LED.

Edit 2:

Per @Curd's comment, I am also including the source current diagram from the datasheet.

CD4017BE typical current source characteristics graph

\$\endgroup\$
  • \$\begingroup\$ Hmmm. Didn't think about that. I'll give it a go and see what happens. \$\endgroup\$ – codedude Aug 18 '13 at 20:33
  • \$\begingroup\$ The diagram shows the sink current. For the given circuit (current flows through LED if output is high) the source current is relevant. \$\endgroup\$ – Curd Sep 17 '13 at 9:42
  • \$\begingroup\$ @Curd You are correct, I had not paid attention to the schematic properly. I added the source current graph to the answer. \$\endgroup\$ – JYelton Sep 17 '13 at 15:51
0
\$\begingroup\$

Your schematic doesn't match the "drawing."

Drawing shows a pushbutton between 4017 Vcc and the actual power supply that is not on the schematic. Is that switch actually there? If so, is it normally closed or normally open? If it's normally open, then that's your problem.

\$\endgroup\$
  • \$\begingroup\$ That switch must be NC, since it's a power supply pin and applying voltage to an unpowered CMOS IC is usually a very bad idea. And to top it off, the CD4017 has a dedicated reset pin; hurray for edumacation... \$\endgroup\$ – Ignacio Vazquez-Abrams Aug 18 '13 at 8:42
  • \$\begingroup\$ I didn't include any of the switches from the picture. That picture isn't exactly what I did but close enough that I thought it would help show what I was attempting. \$\endgroup\$ – codedude Aug 18 '13 at 20:31

protected by Dave Tweed Jun 19 '16 at 22:55

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.