1
\$\begingroup\$

I'm sure this has been covered but I am not finding answers to what I am looking for. Just getting back into electronics after well over a decade...so I'm a bit rusty. :)

What I need is a 100 LED sequence broken down into 20, 5 LED segments, with LEDs lit in pairs as they chase. Ideally 1/2 on, 3/4/5 off...1 off, 2/3 on, 4/5 off...1/2 off, 3/4 on, 5 off...1/2/3 off, 4/5 on. Something like that (visually represented below). Always 2 LEDs lit and 3 unlit for each 5 LED segment. I've broken out my old lab kit (was shocked at the amount of dust on it) and to my surprise I found my packet of first gen blue LEDs. I remember having to special order them and they cost me $10 each. That'll tell you how long it's been. But I have all manner of parts and was hoping that using a 555 and 4017 (I have a tonne of these) as well as some combination of transistors or inverters is what I'm looking at here. Chances are I have the parts on hand already. But I'm straining my brain trying to figure out a workable and SIMPLE circuit that can drive that many LEDs in the pattern I'm seeking. Bonus if I can regulate the speed of the chase.

Any advice, input or thoughts is GREATLY appreciated.

OOxxxOOxxxOOxxx

xOOxxxOOxxxOOxx

xxOOxxxOOxxxOOx

xxxOOxxxOOxxxOO

x=OFF O=ON

\$\endgroup\$
  • \$\begingroup\$ Have you not considered a string of shift registers? Use CMOS 74ALC with 25Ohm drivers to Cathode and Anode to V+. Choose voltage wisely. \$\endgroup\$ – Sunnyskyguy EE75 Oct 29 '16 at 1:21
  • 1
    \$\begingroup\$ Are you doing this as an exercise or you only care about the result? A quick and 'lame' way of doing this would be addressable LEDs (WS2811/2812, APA102 - aka NeoPixels). \$\endgroup\$ – Wesley Lee Oct 29 '16 at 1:43
  • 1
    \$\begingroup\$ Microcontroller? Or do you really want to just use hardware without any programming? 4017 could probably do this with a clock of some kind. \$\endgroup\$ – jonk Oct 29 '16 at 3:38
  • \$\begingroup\$ Do you mean 4 states or 5? Jonk and I read your question differently. He assumed you meant what you wrote, and the 4 states you've shown are the only ones you wanted. I assumed your text was correct and your illustrations were lacking the 5th state of 0xxx00xxx00xxx0? Which is it? \$\endgroup\$ – Neil_UK Oct 30 '16 at 6:05
2
\$\begingroup\$

4017 output is 'one hot', and won't source much over 1mA, so you can't use that directly.

If you must employ a 4017, then the simplest way to get to a base-5 chase sequence is to use diode logic to connect the 10 outputs to the bases of 5 NPN driver transistors. So output Q0 connects by 2 diodes to TR0 and TR1 bases. Output Q1 connects by 2 diodes to TR1 and TR2 bases, etc etc. Total bill of materials 20 diodes, 5 current limiting resistors on the bases, and five transistors. If you use a driver array like ULN2803, then you don't even need the base current limiting resistors. That array goes up to 50v, so you can put LEDs in series to reduce the current requirement.

Finally, use an oscillator to drive the clock pin. A variable speed clock varies the speed of the chase.

\$\endgroup\$
  • \$\begingroup\$ This is kind of where my mind was headed. But there remains an issue -- he wants pairs of LEDs in the chase and it appears that means FOUR states, not FIVE. Looking at his list at the bottom of the post he made, I read that it goes back from the last state to the first state shown there. \$\endgroup\$ – jonk Oct 29 '16 at 7:46
  • \$\begingroup\$ @jonk I read that he meant 5 states, and hadn't illustrated the fifth 0xxx00xxx00xxx0 state. Four states with a pitch of 5 would look silly. \$\endgroup\$ – Neil_UK Oct 29 '16 at 13:33
  • \$\begingroup\$ I'm not set on any particular hardware but want to keep it simple, and ideally use what I have on hand. I have a handful of 555, 556, 4017 and a nice assortment of gates and flip flops. It is for a model sign project (scaled down copy of the Vegas sign) and will be lighting 3mm white leds. My personal preference is to have a slightly wider dark space separating the light space. I just find it more visually appealing. I just can't figure out how to start with both 1&2 ON, then shift BOTH to the right once. I came to a 5 digit run for an even division into 100 led and a 40/60 ON/OFF ratio. \$\endgroup\$ – Richard B Oct 29 '16 at 17:00
  • \$\begingroup\$ Yeah, and I read it the other way. I think @RichardB needs to write up a more complete description of the range of ideas he'd embrace and include any priorities he feels more strongly about, as well. \$\endgroup\$ – jonk Oct 29 '16 at 18:46
0
\$\begingroup\$

Use a 556 (or two 555) and a shift register.

Make one go at a desired rate but most crucially set its duty cycle at 40% (that's your pattern generator) and feed its output to a shift register's data input (be aware that since this duty is less than 50% you have to actually set it to its reciprocal, 60%, and then invert it).

Put the output of the other timer to the clock input of the shift register and tweak the timer frequency until it's 5 times that of the first timer or until you see the pattern/speed matches what you want.

\$\endgroup\$
  • \$\begingroup\$ Well. You've certainly all been very kind and given me much to ponder. I think I have been too rigid in my thoughts and a simple 3 stage (1 ON 2 OFF) is a much easier way to go. If I am correct than the 4th stage would just go to the reset and it would all repeat? If so I would only need to figure out how to drive 33 leds at once (3 led in 33 segments). Paralleled would be approx 500ma (@15ma each) if my math works. Correct? Part of the need for simplicity is lack of space for the circuit. The fewer parts the better. It has been far too long since I've done this. :) \$\endgroup\$ – Richard B Oct 30 '16 at 0:02
  • \$\begingroup\$ No reset involved, you can just hook up a buffer (like the uln2803 Neil was suggesting) or some transistors To the output of the shift register. Use only the first 5 outputs, since it's repeating, shifting one led at a time, you'll get the same pattern over and over again. Hook every N led in a parallel/series arrangement to the same Q output (based on supply voltage) and it should work. Unfortunately I'll not have access To my desk until tuesday so I'm not able To test this setup or expand on my answer with more researches but if you try it please let me know the outcome! \$\endgroup\$ – zakkos Oct 30 '16 at 0:32
0
\$\begingroup\$

This isn't a full answer if this is about using all the parts you already have on hand, but you mentioned an hour ago you are flummoxed by driving two LEDs in pairs. So I thought I'd start there since that's not so hard.

Look at the following schematic, which only uses four LEDs instead of five (for space-saving reasons only.) There are three input lines, each of which turns on two adjacent LEDs. This would be a 3-state case, of course. But that's one possibility.

schematic

simulate this circuit – Schematic created using CircuitLab

You could also consider using two different counters similiar to (but not necessarily the same as) your 4017. If both were initialized to the same starting state, the following similarly short-handed case might look like:

schematic

simulate this circuit

Also, only 3 states (for brevity again.) I've no idea why you might decide to go that way over the other. But you might come up with a reason, so there it is, as well.

The overall problem faced might be figuring out how to get 4 states out of a 10-state device, or to find a way to combine 10-state devices into a 20-state or 40-state situation where you could then divide that evenly back into 4 states without what amounts to blanking periods.

I'd probably sell the 4017s online in nice packages, get the money back for them, perhaps sell those all-too-expensive blue LEDs, too, and then pick up some really cheap LED modules (which can be bought with drivers included) and get a microcontroller and do it that way. More versatile for the future (and I think you'd imagine some fun ways to use that flexibility as time goes on.)

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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