Maker Pro
Maker Pro

'Chasing' LEDs

rossdoggah

Feb 26, 2016
2
Joined
Feb 26, 2016
Messages
2
Hey guys, new to the forum go easy on me!

Okay so I'm trying to think of ways to replicate this
(skip to two minutes in).

So what I want to do is have about 4*15 LEDs sequentially light up, just like it did in that video.

I have basic c knowledge and could write up code for a small scale version however I have no idea where to start with this.

Any help will be appreciated.
 

cjdelphi

Oct 26, 2011
1,166
Joined
Oct 26, 2011
Messages
1,166
Shift register(s) and transistors (in ic form) and a micro controller for ease of use
 

Colin Mitchell

Aug 31, 2014
1,416
Joined
Aug 31, 2014
Messages
1,416
Shift register(s) and a micro controller for ease of use
If you have a micro you don't need shifty registers. The micro is shifty enough.
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Hey guys, new to the forum go easy on me!

Okay so I'm trying to think of ways to replicate this
(skip to two minutes in).

So what I want to do is have about 4*15 LEDs sequentially light up, just like it did in that video.

I have basic c knowledge and could write up code for a small scale version however I have no idea where to start with this.

Any help will be appreciated.
As mentioned partially above, a shift register will be your friend here.
Essentially, a shift register works with one input, and many outputs. (And a clock)

The simplest method would probably be to take the original turn-signal output and tie it to the input of the shift register. Make a basic clock source with a 555-Timer and tie that in too.
*Shift registers can be daisy chained together to control many more individual LEDs if you desire.
The behaviour will be slightly different from the video, but the circuit would be incredibly simple.

When the original Turn signal is 'on' the LEDs will begin to turn on in the outward direction, when the original Turn signal is 'off' the LEDs will begin to turn off in the outward direction. This solution would NOT simply turn all the LEDs off at once, any LED that was initially turned on MUST run to the end of the row of lights before turning off.
Adjusting the 555 timer will make the LEDs chase faster or slower.

*Note that cars have a detection circuit built-in that will flash the turn signal much quicker if it thinks a bulb is burnt out! This may negatively impact this example. You can fix this by adding a ballast which will provide a dummy load to make the car think a bulb is still present. You may also be able to swap out the flasher relay for one designed for use with LED lights.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
While the circuit in post #5 can be expanded to 15 stages (barely), neither the timing between stages not the LED brightness will be a constant across one complete cycle. Two 8-bit shift registers in series requires a total of only two output lines from the microcontroller, and both the timing and the light pattern are under software control. Plus, transistor arrays can be used as LED drivers for less complexity, integrated lamp test, etc.

ak
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
While the circuit in post #5 can be expanded to 15 stages (barely), neither the timing between stages not the LED brightness will be a constant across one complete cycle. Two 8-bit shift registers in series requires a total of only two output lines from the microcontroller, and both the timing and the light pattern are under software control. Plus, transistor arrays can be used as LED drivers for less complexity, integrated lamp test, etc.

ak
I'd like to axe the microcontroller recommendation in the bud. Once programmed it's easy to adjust, but the cost is higher and so is the learning curve. Let's outline some of the differences and see how the OP would like to approach it.

Benefits to the microcontroller is that a little extra coding can be done to individually control each LED so you can do all sorts of other patterns without swapping out hardware.

Keeping the shift registers and swapping out the microcontroller for a simple 555 timer will give you a similar behaviour, but you cannot alter the pattern or behaviour after it is constructed.

Timing can be adjusted after manufacturing on both methods by programming or adjusting a simple potentiometer.

I would only suggest microcontrollers if you want to learn them. Don't dive into them for a single project.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
"While the circuit in post #5 can be expanded to 15 stages (barely), neither the timing between stages not the LED brightness will be a constant across one complete cycle. "

Ground rules: Diode Vf = Vbe = 0.6 V. Vcesat = 0.1 V. LED Vf = 2.0 V
Rightmost transistor = Q1. Leftmost transistor = Q5. The leftmost transistor in a 15 stage circuit = Q15.

Q1 comes on first. 0.6+0.1+(2x2.0) = 4.7 V, so the voltage across the 390 ohm resistor is 7.3 V and the current through the LEDs is 18.7 mA.

Q5 comes on last. 0.6+(0.6x4)+0.1+(2x2.0) = 7.1 V. Voltage across 330 ohm resistor is 4.9 V. Current through LEDs is 14.8 mA, a decrease of over 20%. That is visible.

The voltage ramp driving the transistor bases comes from an exponential R-C ramp. While the turn on voltage for each successive stage increases linearly, the driving ramp is exponential. Therefore the time delay between each stage coming on increases at a modified exponential rate. According to the datasheet for a standard 555 with a low load current, Vout-low = 0.01 V and Vout-high = 10.7 V, so the output ramp 100 uF capacitor starts at 0 V and is charged by a 10.7 V source through a 4.7 K resistor. The first LED comes on 55.9 ms after the 555 output goes high. The 2nd LED comes on at 86.6 ms, so the first LED is on by itself for 30.7 ms.

At the other end of the ramp, the 4th LED comes on at 154.6 ms and the 5th LED comes on at 192.8 ms, a difference of 38.2 ms, an increase of almost 25%.

At 5 stages the irregularities in brightness and timing are visible, but not terrible. But the question you were responding to was about 15 stages, and my reply was about whether or not your circuit could work for this problem. It can not.

The details regarding the first stage (Q1) are as above. But for Q15 things are much worse. The voltage across the LED current limiting resistor is only 12 - (0.6+(0.6x14)+0.1+(2x2.0)) = 0.9V. Given the possible variations in 16 diodes plus 2 LEDs in series, 0.9 V is not enough headroom to set accurately the LED current.

WORSE than that is the timing variation. The on time of the first LED by itself is the time between stages 1 and 2, and still is 30.7 ms. BUT, the time between stages 14 and 15 (the on time of the next-to-last stage) is (1069.2-864.6) = 204.6 seconds, or over 3 minutes. This does not include the increase in time caused by the capacitor leakage current, which becomes significant as the cap's charging current decreases. With your circuit expanded to 15 LED stages with a first stage time of 30 ms, the 15th LED will come on after 17.8 minutes.

Clearly the oscillator timing components do not support this long of an output period, and even if they did I don't think a 17 minute blink time is what the OP wants for a turn signal, so I don't understand why you proposed this circuit as a solution to this problem.

You obviously have absolutely no understanding of electronics and you should keep your ideas to yourself and not make a fool of yourself.

Your circuit is not a workable response to this thread, and your response to my reply is inappropriate for several reasons. You obviously have no understanding of the problem posed by this thread, and should follow your own advice.

ak

Time constant calculator used for this analysis:
http://ladyada.net/library/rccalc.html
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
Awesome! Plenty of good info here.
Thanks guys I'll see what I can do. :)
Keep us posted!
Seems like the top options to try are either shift registers or bar/dot graph drivers. (LM3914)
AnalogKid's last reply operates differently... the LM3914 will gradually turn LEDs on as the input voltage increases. It's the same part used in VU-meters.
 

AnalogKid

Jun 10, 2015
2,884
Joined
Jun 10, 2015
Messages
2,884
AnalogKid's last reply operates differently... the LM3914 will gradually turn LEDs on as the input voltage increases. It's the same part used in VU-meters.

0 for 2.

Second, the 3915 is the VU-meter part. In terms of activating voltage levels, it's comparators are spaced apart logarithmically rather than linearly.

First, both parts are based on comparators rather than linear amplifiers, so the visual effect in "bar" mode is the same as with a shift register. Each LED snaps on crisply, not gradually.


ak
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
0 for 2.

Second, the 3915 is the VU-meter part. In terms of activating voltage levels, it's comparators are spaced apart logarithmically rather than linearly.

First, both parts are based on comparators rather than linear amplifiers, so the visual effect in "bar" mode is the same as with a shift register. Each LED snaps on crisply, not gradually.


ak
Doh! got the part mixed up, and I should have used 'sequentially' instead of 'gradually'
Thanks for clearing that up.
 

Tinker Unique

Dec 1, 2014
22
Joined
Dec 1, 2014
Messages
22
NOT sure about the solutions suggested. I have no problem with them, but might suggest getting the "sequencer" from a junk yard - off of another car with the sequencing lights. May be a bit easier and work like it should.
 

Gryd3

Jun 25, 2014
4,098
Joined
Jun 25, 2014
Messages
4,098
NOT sure about the solutions suggested. I have no problem with them, but might suggest getting the "sequencer" from a junk yard - off of another car with the sequencing lights. May be a bit easier and work like it should.
Do you have any recommendations to look for?
The only model car I've seen that has a sequencer is the new Mustang that has a sequenced Tail-Light of 3 modules... far cry from the amount the op requires.
I guess you could find a sequencer from an old traffic control vehicle... but that might be more difficult to adapt a large sign meant to be driven by a small control panel to work with the car's turn signal output.
 
Top