Description: This compact circuit operates 8 LEDs directly driven from a PIC microcontroller, accompanied by a single mode control switch. The firmware controls the LEDs using a 5-bit PWM signal, enabling four levels of intensity for each LED channel: off, dim, mid, and bright. Various sequences are programmed into the firmware to create engaging visual effects and chase sequences, similar to the classic effect seen in the Knight Rider television series. The software features sequential, random, and manual sequence run modes, with the ability to manually advance to the next sequence in any mode. The selected sequence and mode are stored in non-volatile memory, ensuring that the circuit restarts in the chosen mode. The design is intentionally straightforward, with each LED directly driven by a PIC I/O pin. This simplicity, along with the inclusion of an in-circuit programming header (ICSP), makes the circuit ideal for teaching and learning introductory PIC assembly language programming. The circuit can accommodate various LED sizes and colors, as well as fewer than 8 LEDs. It serves not only as an LED chaser but also as an excellent tool for adding effects to toys and models. For users seeking a pre-written LED chaser program, a ready-made program featuring 34 chase effects, along with source code and programmer-ready HEX files, is available at the bottom of the page. Several variations based on the basic PWM LED chaser have been constructed, utilizing the same base code but employing different sequences to suit the layout of the boards. The core of the LED chaser is the PIC 16F628A microcontroller (IC2), which controls the LEDs connected to the output port pins. Resistors R1 through R8 limit the current through LED1 to LED8 to a safe level, preventing damage to the PIC's I/O ports and the LEDs. Resistor R9 provides a pull-up for the input connected to switch S1, while R10 pulls up the PIC's MCLR reset signal during normal operation, allowing the input to be raised to 12.5 volts during in-circuit programming. JP1 connects to an ICSP programmer, such as a PICkit2, facilitating easy reprogramming of the PIC without removal from the PCB. Capacitor C1 decouples the 5-volt power supply to the PIC and should be positioned close to the PIC's Vdd connection (pin 14) when building the circuit on a breadboard or stripboard. Power is supplied through J1 and must be smooth DC ranging from 9 to 14 volts. The PIC requires a precisely regulated 5-volt supply, provided by IC1, a 7805 3-terminal, 5-volt regulator. The circuit typically draws around 100mA with all LEDs illuminated, so the voltage regulator does not require an additional heatsink. Capacitors C2 and C3 stabilize the regulator, and diode D1 protects the circuit from reverse polarity of the input voltage. While capacitors C2 and C3 may be omitted in most applications, they are included in the schematic, and the PCB layout accommodates them. If there is uncertainty about their necessity, it is advisable to install them. High-brightness LEDs are very luminous even with 270-ohm current-limiting resistors. However, if resistor values need to be altered, it is essential to consider that the maximum current the PIC can source from an I/O port pin is 25mA. Additionally, the output voltage may drop as the load increases. If LEDs requiring a lower series resistor are installed, it may hinder in-circuit programming via the ICSP header, as the I/O port pins used for In-Circuit Serial Programming are shared with the LEDs. With 270-ohm resistors and a PICKit2 programmer, in-circuit programming should function without issues. JP1 serves as the ICSP header, allowing for programming flexibility.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, including the classic effect seen on the car in the Knight Rider TV series. 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 design is deliberately simple with each LED being directly driven from a PIC I/O pin. This and the inclusion of an in-circuit programming header (ICSP) make the circuit ideal for teaching/learning introductory PIC assembly language programming.
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 However, if you just want a cool LED chaser without having to write any code, a ready written LED chaser program including 34 chase effects with source code and programmer ready HEX files is provided at the bottom of this page. Here`s a couple of variations I`ve built based on the basic PWM LED chaser described on this page. They run exactly the same base code, just use different sequences to suit the layout of the boards. 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 pulls up the PIC`s MCLR reset signal during normal operation while allowing the input to be raised to 12. 5 volts during in-circuit programming. JP1 provides connection for an ICSP programmer such as a PICkit2 making it easy to reprogram the PIC without removing it from the PCB.
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 J1 and must be smooth DC between 9 and 14 volts. The PIC requires a precisely controlled 5 volt supply and this is provided by IC1, a 7805 3-terminal, 5 volt regulator.
Typical current drawn by the circuit with all LEDs on is only around 100mA so the voltage regulator doesn`t require any additional heatsink. Capacitors C2 and C3 stabilize the regulator. Diode D1 protects the circuit from accidental reverse polarity of the input voltage. Capacitors C2/C3 stabilize the voltage regulator and may be omitted for most applications, however the schematic shows them and the PCB layout makes provision for them.
If you`re unsure whether you will need them then it`s best to install them. The latest high brightness LEDs are very bright even with 270R current limiting resistors. However, if you do need to change these resistors for some reason take into account the maximum current that the PIC can source from an I/O port pin is 25mA, and also be aware that the output voltage will drop as you increase the load. If you install LEDs that require a lower value series resistor you may find you are unable to program the PIC in-circuit via the ICSP header.
This is because the I/O port pins on the PIC that are used for In-Circuit Serial Programming are shared with the LEDs. The programmer may be unable to drive these lines when lower value resistor are used. With the 270R resistors and PICKit2 programmer, In-Circuit programming should work without problems. JP1 is an ICSP header to allow p
Light emitting diodes are advantageous due to their smaller size, low current consumption and catchy colours they emit. Here is a running message display circuit wherein the letters formed by LED arrangement light up progressively. Once all the letters of...
The circuit features red lights that chase up and down on the front of the kit, with a pause of about one second between each sequence. Unlike other circuits that continuously pulse a decade counter, this design employs two 555...
An input sine wave applied to the left amplifier base results in the collector output fluctuating above or below 6.6 volts. The amplifier amplifies and inverts the signal, maintaining a roughly centered output, thereby minimizing the chances of clipping. The...
The goal was to create a compact flashlight that could be held in the mouth, easily stored in a pocket, and positioned on a surface to project light upwards. The budget was set at approximately $15, which was significantly lower...
A very simple LED torch can be designed using the NSI45090JDT4G adjustable constant current regulator (CCR) from ON Semiconductor, utilizing very few external components. The NSI45090JDT4G device provides a cost-effective solution for regulating current in LEDs. This constant current regulator...
The LED flasher circuit operates by flashing an LED using only a 1.5-volt power supply. Typically, a power supply of more than 2 volts is required for an LED to function.
The LED flasher circuit designed for operation at 1.5 volts...
This is a stereo LED level meter. It is the most affordable and effective bar graph display available, utilizing commonly accessible components. The circuit requires only a few LEDs, 22 transistors, some resistors, diodes, and a set of electrolytic capacitors,...
Create LED lighting powered directly from the AC mains (120-Volt AC) due to the unavailability of inexpensive and safe enclosures for the circuitry. While collecting old failed CFLs for recycling, it was noted that the body of CFLs (also known...
7-Segment Common LED UV Exposure Box Circuit Diagram. Features: Utilizes Stan Ocker's circuit design, employing a PIC16F84 microcontroller to count and display the time.
The 7-Segment Common LED UV Exposure Box Circuit is designed for applications requiring precise timing and display...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more