Shop OBEX P1 Docs P2 Docs Learn Events
Best way to create linear movement in a string of 32 LEDs — Parallax Forums

Best way to create linear movement in a string of 32 LEDs

Tony B.Tony B. Posts: 356
edited 2011-11-15 17:43 in General Discussion
I am developing an educational display to illustrate the flow of grain from a semi-trailer through an elevator and into a storage bin. I will be using 32 LEDs to demonstrate the flow of grain. I was planning on using 3 - 74HC595 Serial to Parallel shift registers but was wondering if there was a better way to create linear movement in a string of LEDs like the old movie houses that had the lighted marquees and the lights looked as if they were moving from one side of the sign to the other continuously.
Thanks,
Tony

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-11-13 19:47
    A shift-and-store register like the 'HC595 is overkill for such a task. A simpler 74HC164 serial-in-parallel-out shift register would do the job just as well. In fact, with a 555 as the clock driver, and some additional logic to set up initial conditions, you wouldn't even need a microcontroller running it. But, for a more rapid design approach, without so many loose components, a BS1 might be the ideal compromise to run the daisy-chained shift registers.

    -Phil

    Update: On second thought, you don't need the shift registers at all. Just wire your LEDs in 3 groups of 12 LEDs (36 total), such that each sequential LED in the string comes from the next group: ABCABCABC... Drive the LEDs in each group with an open-collector transistor, series-parallel fashion, with maybe four LEDs and a current-limiting resistor in each string, the strings being paralleled. The three transistors could be controlled by a BS1.

    -P.
  • ercoerco Posts: 20,259
    edited 2011-11-13 20:03
    Dog-drat, Phil beat me to it again. This is a great app for a BS1, and a perfect opportunity to use those dollar latching Omron relays I posted about at
    http://forums.parallax.com/showthread.php?132685-Latching-Relay-Goldmine&highlight=latching+relay

    A BS1 can drive 28 of those relays directly!
  • Tony B.Tony B. Posts: 356
    edited 2011-11-13 20:04
    Thanks Phil for the quick response. I really like the Update idea and will begin working on the prototype to make sure I understand all that your saying.

    Tony
  • Tony B.Tony B. Posts: 356
    edited 2011-11-13 20:10
    Thanks Erco. I will have to check them out tomorrow.

    Tony
  • TubularTubular Posts: 4,717
    edited 2011-11-13 21:00
    Tony,

    There is another way, using a sparkfun RGB led strip which has 32 leds per metre. It only needs 3 pins, and if using the propeller there is a demo object in the obex already.

    When testing I had exactly that kind of pattern streaming along the incoming power socket which was hanging down from the ceiling (convenient for keeping a straight 1 metre for testing). Really quite effective, especially from a medium distance. It lets you spend your time tuning for all kinds of neat effects, instead of soldering...

    cheers
    tubular
  • pedwardpedward Posts: 1,642
    edited 2011-11-13 23:53
    CD4017 Decade counter configured in a cascading mode will drive 10 leds per chip. You would have 1 LED lit at a time, then you could put a push button on the display to increment the count and use the last output to reset the counter.
  • tonyp12tonyp12 Posts: 1,951
    edited 2011-11-14 05:53
    No MCU needed,
    step1: a 555 configured to give ~1 sec pulse.
    step2: pulse to a 4017
    http://sensorsweep.tripod.com/sequencer.html

    If you run the whole curcuit at 9-12v, you could put 3leds in series (with just one resistor, http://ledcalculator.net/default.aspx?values=12,2.2,10,3,0)
    spaced 10 a part. (=30 led display)
    As LED in series use the same current as a single led, you just need higher voltage. (Forward Voltage *Leds)

    4017B
    http://cn.mouser.com/Semiconductors/Integrated-Circuits-ICs/Logic-ICs/Counter-Shift-Registers/_/N-6j789Zscv7?P=1z0z44d&Keyword=4017B&Ns=Pricing%7c0&FS=True
    Or the 4022 for LEDs spaced max 8 a part.
    http://cn.mouser.com/ProductDetail/Texas-Instruments/CD4022BEE4/?qs=sGAEpiMZZMtOXy69nW9rMxLGg3mO03D2kqiM950w1WU%3d
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-11-14 06:55
    tonyp12 wrote: »
    No MCU needed,
    step1: a 555 configured to give ~1 sec pulse.
    step2: pulse to a 4017
    http://sensorsweep.tripod.com/sequencer.html

    If you run the whole curcuit at 9-12v, you could put 3leds in series (with just one resistor) spaced 10 a part.
    As LED in series use the same current as a single led, you just need higher voltage. (Forward Voltage *Leds)

    Or the 4022 for LEDs spaced 8 a part.
    http://cn.mouser.com/ProductDetail/Texas-Instruments/CD4022BEE4/?qs=sGAEpiMZZMtOXy69nW9rMxLGg3mO03D2kqiM950w1WU%3d

    I built an LED chaser kit years ago. I think this is how the circuit worked.

    I like the transistor fired groups personally. It's the basis for lots of other cool projects..... and it gives you the possibility to dim the LEDs, make a dimmed trail and other stuff :D
  • tonyp12tonyp12 Posts: 1,951
    edited 2011-11-14 07:33
    Transistors would be needed if you need more that 10mA (each pin max rating for the 4017/4022)
    Or you only have 3V and therefore putting Leds in serie is not possible.
    Though you could just use more 4017 in parallel that share the first ones reset line.

    Hints:
    You don't have to use 10 (or 8) spacing, you can bring reset pin to pin 4-to-7 if you want less spaced leds.
    Use an array instead of single transistors
    http://cn.mouser.com/Semiconductors/Transistors/Darlington-Transistors/_/N-2xpq8Zscv7?P=1z0y3i9&Ns=Pricing|0
  • Tony B.Tony B. Posts: 356
    edited 2011-11-15 04:47
    Thank you everyone for all the help! With your help I believe I’m going to be able to add to the size and “wow” factor of this display. I’ll post a video of it working when I get it completed.

    Thanks again,
    Tony
  • ercoerco Posts: 20,259
    edited 2011-11-15 08:35
    Another obvious "instant" solution presents itself as the holidays draw near. Buy a string of LED Christmas lights with a built-in chaser circuit.

    Timing is everything!
  • Tony B.Tony B. Posts: 356
    edited 2011-11-15 17:43
    Now why didn't I think of that? What a great idea. I'll will have to head to town and see what I can find.

    Thanks Erco

    Tony
Sign In or Register to comment.