Connect with us

'Chasing' LEDs

Discussion in 'LEDs and Optoelectronics' started by rossdoggah, Feb 26, 2016.

Scroll to continue with content
  1. rossdoggah

    rossdoggah

    2
    0
    Feb 26, 2016
    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.
     
  2. cjdelphi

    cjdelphi

    1,096
    104
    Oct 26, 2011
    Shift register(s) and transistors (in ic form) and a micro controller for ease of use
     
  3. Colin Mitchell

    Colin Mitchell

    1,418
    314
    Aug 31, 2014
    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.
     
    Arouse1973 likes this.
  4. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    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.
     
  5. Colin Mitchell

    Colin Mitchell

    1,418
    314
    Aug 31, 2014
    Just use my circuit:


    bikeLeftAnim.gif bikeLeftCct.gif
     
  6. AnalogKid

    AnalogKid

    2,351
    659
    Jun 10, 2015
    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
     
  7. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    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.
     
  8. AnalogKid

    AnalogKid

    2,351
    659
    Jun 10, 2015
    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.

    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
     
    Last edited: Feb 27, 2016
  9. AnalogKid

    AnalogKid

    2,351
    659
    Jun 10, 2015
    Another non-uC approach is a dual-opamp ramp oscillator driving two LM3914's in series.

    ak
     
    duke37 and Gryd3 like this.
  10. rossdoggah

    rossdoggah

    2
    0
    Feb 26, 2016
    Awesome! Plenty of good info here.
    Thanks guys I'll see what I can do. :)
     
  11. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    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.
     
  12. AnalogKid

    AnalogKid

    2,351
    659
    Jun 10, 2015
    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
     
  13. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Doh! got the part mixed up, and I should have used 'sequentially' instead of 'gradually'
    Thanks for clearing that up.
     
  14. Tinker Unique

    Tinker Unique

    22
    2
    Dec 1, 2014
    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.
     
  15. AnalogKid

    AnalogKid

    2,351
    659
    Jun 10, 2015
    A 15-stage light sequencer in a car?

    ak
     
  16. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    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.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-