# Sequential Turn/LED Troubles

#### MythicalCoder

Joined Aug 28, 2015
83
I'm trying to design a circuit that achieves this effect:

I have ten positions I want to do this with, just like the GIF above. Each position is made up of three 50mA LED strips.

- What's the name of the above effect? Searching for "Chaser" brings up a bunch of 555/4017 results, which only fills one position at any given time, instead of being additive until it's full, then subtractive until it's empty

- Does anyone know how to build this circuit as simply as possible, while making the speed adjustable?

- Lastly, I searched high and low for a simple automotive 50mA LED driver, but can't seem to find any that don't requite a ton of other external components (this is problematic as I've got a ton of strips to support). Does anyone know where I can source one of these?

#### ian field

Joined Oct 27, 2012
6,539
I'm trying to design a circuit that achieves this effect:

I have ten positions I want to do this with, just like the GIF above. Each position is made up of three 50mA LED strips.

- What's the name of the above effect? Searching for "Chaser" brings up a bunch of 555/4017 results, which only fills one position at any given time, instead of being additive until it's full, then subtractive until it's empty

- Does anyone know how to build this circuit as simply as possible, while making the speed adjustable?

- Lastly, I searched high and low for a simple automotive 50mA LED driver, but can't seem to find any that don't requite a ton of other external components (this is problematic as I've got a ton of strips to support). Does anyone know where I can source one of these?
A shift register shifting a bunch of bits through.

A low frequency square wave holds the input low for a certain number of clock pulses, then high for the next lot.

Divide down from the clock to get the LF SQ wave and you get a nice tidy alternation between LEDs on or off.

#### absf

Joined Dec 29, 2010
1,949
That chip in your picture has 18 pins. So it is neither a 4017 nor 74164. My guess is it is a PIC or AVR mcu.

Allen

#### Wendy

Joined Mar 24, 2008
22,206
I might be interested in helping, but you are going to have more than a few components, especially diodes.

I'm also the author of a lot of 555/4017 circuits, possibly the ones you were talking about. LEDs, 555s, Flashers, and Light Chasers

Chapter 11, Making Patterns applies in this case.

Ian's suggestion has a lot of merit too.

How complex does it get before it is too complex?

#### crutschow

Joined Mar 14, 2008
26,020
I believe you can do this with two 74C164 parallel-out Shift Registers, one 4013 Flip-Flop and one 555 timer.
You connect the Shift Register in series. This give 16 output, but you can use just 10.
Connect the 9th output to the D input the Flip-Flop.
Connect the FF not-Q output to both SR serial inputs.
Clock the SR's and the FF with an astable 555 oscillator circuit running at the desired chase sequence frequency.

Note that to get the proper sequence, the SR must be initially set with all zeros.
This can be done by holding the SR Clear input momentarily low when the power comes on.
For this connect a 100kΩ resistor between V+ and the Clear input with a 1μF capacitor to ground.

Here's the sequence:
Let's arbitrarily start with the FF /Q output high and all S/R outputs low.
This will feed 1's into the SR inputs at each clock pulse until the 9th output sets the FF D-input high.
This causes the FF to change state, setting the FF /Q output low at the 10th output going high, and inputting a 0 into the SR input.
This cause the next clock pulse to generate a 0 output at the first S/R output.
This now continues when each SR output sequentially going low until the 9th output sets the FF D-input to 0, and the whole sequence repeats.

Note to be sure and tie all unused inputs to the SR and FF to ground, otherwise the circuit may behave erratically.

You can drive the LEDs from the SR's parallel outputs using a small transistor.
How may LEDs will each output drive?

#### MythicalCoder

Joined Aug 28, 2015
83
Thanks for all the help so far! A shift register / 555 timer approach sounds perfect for this. Probably won't support the 150mA I'll need (three LED strings of 50mA each), but transistors are more than fine to use. That would also allow me to put in an override switch that bypasses the sequential feature by manually triggering the transistors or some such. To more directly answer your question, each line would be anywhere from three to nine amber LED's.

I can't seem to find 74C164 anywhere beyond a few references to it here and there. Is there an alternative to this I can use? I was going to build a schematic from the datasheet, but I can't find the chip nor the datasheet.

#### GopherT

Joined Nov 23, 2012
8,012
Thanks for all the help so far! A shift register / 555 timer approach sounds perfect for this. Probably won't support the 150mA I'll need (three LED strings of 50mA each), but transistors are more than fine to use. That would also allow me to put in an override switch that bypasses the sequential feature by manually triggering the transistors or some such. To more directly answer your question, each line would be anywhere from three to nine amber LED's.

I can't seem to find 74C164 anywhere beyond a few references to it here and there. Is there an alternative to this I can use? I was going to build a schematic from the datasheet, but I can't find the chip nor the datasheet.
A 74HC164 or 74AC164 will do.

#### absf

Joined Dec 29, 2010
1,949
Here the schematic using 74HC164 and 555. Output drivers are needed if you want to drive more than 10 mA per output.

Allen

#### crutschow

Joined Mar 14, 2008
26,020
A 74HC164 or 74AC164 will do.
Since this appears to be an automotive application, the use of those devices would require a regulator to generate the required 5V supply.

A 74C164 can operate directly from the 12V car supply.
It has a supply voltage range the same as the CD4000 series.

Last edited:

#### crutschow

Joined Mar 14, 2008
26,020
Here the schematic using 74HC164 and 555. Output drivers are needed if you want to drive more than 10 mA per output.

View attachment 101518
I see that you don't need a flip-flop to get the sequence as I suggested, but I don't see how you can to that without initially resetting the shift-registers, since they can come up in a random fashion when power is applied.
Changing R21 to 100kΩ and connecting a 1μF capacitor from Reset to ground should provide the required reset.

Also for a sequence of 10, the transistor base resistor R1 should go to output U3-4.

Note that each output of an 74HC164 can only drive about 4mA, not 10mA.

#### absf

Joined Dec 29, 2010
1,949
I see that you don't need a flip-flop to get the sequence as I suggested, but I don't see how you can to that without initially resetting the shift-registers, since they can come up in a random fashion when power is applied.
Changing R21 to 100kΩ and connecting a 1μF capacitor from Reset to ground should provide the required reset.

Also for a sequence of 10, the transistor base resistor R1 should go to output U3-4.

Note that each output of an 74HC164 can only drive about 4mA, not 10mA.
Thanks for correcting my mistakes..

But regarding the sourcing of 4 mA, I read from the datasheet that the 4 mA was (MIN)..

While the MAX Io = +/- 25mA. That's why I assume 10 mA per output pin is OK for this chip. The LS164 has very different sourcing and sinking current.

See HC164 from SGS Thomson attached....

Allen

#### Attachments

• 258.6 KB Views: 13

#### crutschow

Joined Mar 14, 2008
26,020
....................
But regarding the sourcing of 4 mA, I read from the datasheet that the 4 mA was (MIN)..

View attachment 101541
While the MAX Io = +/- 25mA. That's why I assume 10 mA per output pin is OK for this chip. The LS164 has very different sourcing and sinking current.
........................
That's a wrong assumption. What do you think MIN means?
The MIN Io is the worst-case value that the chip will reliably sink or source and is the value you should design for.
Depending upon the particular chip you use, any current higher than that may cause an increase in the output voltage drop. And thus having all the outputs sinking 10mA may cause the chip to overheat.

The MAX Io is the maximum you should apply under short-circuit conditions.
It's not a design value for normal operation.

#### AnalogKid

Joined Aug 1, 2013
8,810
The 25 mA spec is the max current level before the chip dies, not an operational parameter. This is explained in the note at the bottom of the table that you posted. On the next page of your attached datasheet, the output current is not characterized above 5.2 mA. If the lawyers won't let them go to 5.3 mA, neither should you.

For LED drive without a zillion little parts, I recommend the ULN2003 transistor array. Two 2003's get you 14 inverting drivers: 10 for the outputs, one for the Q1 inverter between the shift register output#10 and the data input, two to form a multivibrator and eliminate the 555, and one to drive the two clamp inputs and act as a lamp test input.

ak

#### MythicalCoder

Joined Aug 28, 2015
83
The 74C164 seems to be considered end-of-life. I'm fine with the voltage regulator approach. Will build and post a schematic tomorrow for review.

One question though: is the dual capacitor on the VCC/GND connection any safer than a single capacitor on that circuit? Particularly with the differing capacitance, this is a new approach for me.

#### crutschow

Joined Mar 14, 2008
26,020
...............
One question though: is the dual capacitor on the VCC/GND connection any safer than a single capacitor on that circuit? Particularly with the differing capacitance, this is a new approach for me.
It's not a matter of safety, it's a matter of better decoupling.
The small capacitor is better at decoupling high frequency interference on the power line and the large capacitor is better at decoupling the lower frequencies.

Using a small and large capacitor is standard practice for power bus decoupling.
Typically there is one large capacitor somewhere on the bus and a small capacitor across each IC, especially if the IC is a high frequency analog or digital device.

#### absf

Joined Dec 29, 2010
1,949
The 74C164 seems to be considered end-of-life. I'm fine with the voltage regulator approach. Will build and post a schematic tomorrow for review.
Actually you can use CMOS shift register 4094 and the affect is the same. It was mentioned by Scott Wang on my previous thread.

Allen

#### crutschow

Joined Mar 14, 2008
26,020
Actually you can use CMOS shift register 4094 and the affect is the same. It was mentioned by Scott Wang on my previous thread.
I though of using that device also, but it has no reset input to initialize the device upon power up.
That simple circuit design requires that the circuit start up with all ones or all zeros in the shift-register and, without a reset input, you would have to serially set the SR by imputing all zeros for at least 10 clock pulses.

#### Austin Clark

Joined Dec 28, 2011
412
This is a simple circuit to create. As others have stated, you'll need a shift register (serial in, parallel out) and a timer/clock of some sort (555 timer in astable mode would be great). An easy way to get the sequence you want is to take the the last output bit, invert it (using a NOT gate. Either in an IC or with simple BJT transistor-resistor logic), and use it as the input bit.
If the device doesn't start with all 1's or all 0's, an easy way "reset" it (if no hardware reset is available) is to use a button to force the input high or low for a full "cycle". It won't be automatic, but it's quick and straight-forward.

If you can, use a CMOS 4000 series shift register. They play much nicer than their TTL counterparts. (They have a much wider voltage range, push-pull outputs, lower input impedance, etc; ).

#### AnalogKid

Joined Aug 1, 2013
8,810
TTL parts *invented* the push-pull output for logic devices, and CMOS devices have a higher input impedance.

The schematic in post #8 has what you describe. Adding one capacitor gives it instant, power-on reset.

ak

#### MythicalCoder

Joined Aug 28, 2015
83
Not to mention I can't be expected to press a button every time my turn signal flashes to make sure it illuminates in the correct sequence. Power-on reset is a requirement, not a bonus.

Anyways, thank you VERY much everyone for all the help so far! Took me long enough, but I finally finished version one of the schematic based on absf's original schematic, crutschow's written revisions, and AnalogKid's sugggestions. Wasn't sure how to calculate the values for the 555 resistors though. I'm looking to make the timing adjustable, just in case the turn signal relay timing changes. That way, I don't have to manually swap out resistors or what have you.