For a project im working on, i need to incorporate a bunch of LED’s. (#8)
The LED’s will need to be positioned in a circle like fashion 'pointing outwards. (more on this when i post the main project)
Im building a disk like PCB that will allow this.
After running some ideas of how i want to “present” the lights (flashing, running a sequence, etc) i starting thinking of those little LED chasers you can buy.
i have found a nice little kit that will allow me to do everything i want.
The heart of the LED chaser is the PIC 16F628A microcontroller, IC2. The program that runs on this chip controls the LEDs attached to the output port pins. Resistors R1 thru R8 limit the current through LED1 - LED8 to a safe level that won’t damage the PICs I/O ports or LEDs. Resistor R9 provides a pull-up for the input connected to switch S1. R10 holds the PICs MCLR reset signal high.
Capacitor C1 is used to decouple the 5 volt power supply to the PIC.
The voltage regulator used is a LM2931-5.0, low-drop-out regulator and will maintain regulation with an input voltage down to 6 volts. Input voltage for the LED chaser should be between 6 volts and 14 volts to ensure power dissipation remains within limits. The LM2931-5.0 regulator is designed for battery powered and automotive applications and includes internal current limiting, thermal shutdown, as well as reverse battery connection without damage to itself or the circuit behind it. Capacitor C3 is important and must be fitted to prevent instability of the regulator output.
The program looks like this:
[code]Control 1,8 ;RepeatCount =8
hold 5 ;5x10ms = 50ms delay
sdat 3,2,1,0,3,2,1,0 ;seq
hold 5 ;5x10ms = 50ms delay
sdat 0,3,2,1,0,3,2,1 ;seq
hold 7 ; 7x10ms = 70ms delay
sdat 1,0,3,2,1,0,3,2 ;seq
hold 8 ;8x10ms = 80ms delay
sdat 2,1,0,3,2,1,0,3 ;seq
seqend ; RepeatCount = RepeatCount -1[/code]
i like new toys!