UFO round LED Chaser Kit for PIC16F628A
This page is has been written to support construction of the UFO LED Chaser Kit #432K.
This neat little circuit provides 8 LEDs directly driven from the PIC along with a single mode control switch. The firmware elsewhere on this page drives the LEDs with a 5 bit PWM signal providing each of the 8 LED channels with four levels of intensity; off, dim, mid, bright. A number of sequences are programmed into the firmware to provide some interesting visual effects and chase sequences.
The software has sequential, random and manual sequence run modes and manual advance to the next sequence in any mode. The selected sequence and mode are also saved to non-volatile memory so it will always restart in the selected mode. The firmware is the same as that used in the linear PWM LED chaser project.
The design is deliberately simple with each LED being directly driven from a PIC I/O pin. You can use it with different sized LEDs and mixed colours, as well as fewer than 8 LEDs. As well as using it as a LED chaser it is great for adding effects to toys and models. See FAQ
The firmware pre-programmed into the PIC16F628A supplied with the kit includes over 34 chase effects and sequences. If you’re interested in PIC micros and programming and want to modify the sequences or create new ones, the source code and programmer ready HEX files is provided at the bottom of this page.
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. If you’re building the circuit on a breadboard or stripboard you should ensure it is located close to the PICs Vdd connection (pin 14 ).
Power is supplied to the circuit via the V+/V- solder points. 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
Typical current drawn by the circuit with all LEDs on is only around 80mA; with all LEDs off it’s under 1mA.
- The latest high brightness LEDs are very bright even with 330R current limiting resistors. However, if you do need to change these resistors for some reason take into account the absolute maximum current that the on-board voltage regulator can deliver is 100mA.
- If you do change the current limit resistors to suit different LEDs you should aim for the LED current for each output to be no more than 10mA ( 80mA total for all 8 outputs)
- The 330R resistors are specified so that with a LED forward voltage of 1.7 volts and the circuit operating at 5 volts the LED current will be 10mA. LEDs with a higher forward voltage will draw less current. Most LEDs have a forward voltage greater than 1.7 volts so the circuit will work with the majority of LEDs and stay well within the design limits of the circuit.
- The LED forward voltage parameter for a specific LED will normally be found in the manufacturers data sheet.
For more detail: UFO round LED Chaser Kit for PIC16F628A
JLCPCB – Prototype 10 PCBs for $2 + 2 days Lead Time
China’s Largest PCB Prototype Enterprise, 300,000+ Customers & 10,000+ Online Orders Per Day
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw