lunar accents logo
LED circuits

website index terms and conditions help
home design applications technology educational getting-started company products

Slow Chasing LEDs with Controller

inquire about articleprint articlefeatured articlesupdatesrequest-article

Trying to get a a chasing led pattern from right to left of the same color. i noticed all the modules changed colors when chasing. How would i do this? Trying to get like 9 leds on a strip and make them chases back and forth slowly.

LED Controller Circuits

If you have soldering capabilities, you may want to consider removing the existing LEDs form a multi-colored module, and replace them with single colored LEDs. The control chip would still produce this same output signals, so keep in mind that you may see different chase results with the new LEDs in place. Another option might be to simply remove the unwanted colors. This assumes that the chasing LED unit contains individually colored LEDs that can be removed. If you do not have success with a modification, you may consider building a custom controller. The optical solution would employ a microcontroller, which operates based on custom installed firmware. The firmware controls the chase pattern and speed, and can be updated on demand. For beginners wishing to get involved in electronics and LED lighting, the "Basic Stamp" microcontroller kit provides an easy solution. More advanced users may prefer something like a PIC microcontroller by Microchip. It would also be possible to construct a simple LED control module from discrete electronic parts. A handful of parts, such as 555 timers, multiplexers, assembled onto a bread board could easily provide the functionally described. A slow chase from the first LED to last, and then back to the first LED, should not involve incredibly complex electronics in any case.

Is there a way to make it so the lights goes left to right with 9 leds on a strip, but when it goes to the left, it will stay lit from led 1 to 2 to 3 to 4 to 5 etc. and then when it goes back down from led 9, that the leds will turn off from led 9 to led 8 to led 7 to led 6 etc.? so it goes back and forth?

If the strip has nine total LEDs, and you wanted the ability to control each LED individually, then your LED controller chip will need to have nine output pins. For example, Microchip makes a part called the PIC16F505, which contains 12 I/O pins. The pins can configured by software as either input or output pins, with the exception of a few input only pins. This microcontroller would work great for your application, because it is inexpensive, and relativity easy to program. The software will contain a timer loop that counts down before turning the next LED on. An easy way to control the LEDs to produce the pattern you describe is to simply increment a register, and turn on the next LED at each increment. You may want to use two registers to track the LED output, since each register only contains eight bits, and your LED strip contains nine total LEDs. Test the last bit (associated with the ninth LED) to determine when the program should reverse direction. The same timer loop used to increment the LEDs, can also be used to deincrement them. For an experienced programmer, this program routine should be very simple and easy to compose. For this design, you will not be able to source current to all nine LEDs directly from the PIC micro, due to its maximum 75mA source current rating per port. Even if each LED draws 10mA, you would still draw 80mA total on that port. This board will require a buffer between the LEDs and microcontroller, such as a MOSFET or Darlington transistor.