RGB LED Mood Light Standalone PWM controller for RGB LEDs using PIC12F629
This project is an update to the original RGB LED PWM Driver. The new version allows the use of either 5mm LEDs or the square bodied Superflux / Piranah style LEDs. The circuit now uses bipolar transistors rather than MOSFETs which make it more suitable for novice constructors and for the first time this project is available as a kit with all parts required to assemble the PCB including the superflux LEDs. (power supply not included)
Full schematic and construction details are shown on this page, as well as the firmware download for those who want to create their own effects or build their own version from the schematic. If you’re not into programming the kit includes a PIC microcontroller pre-programmed with the firmware and a number of mood lighting effects.
The circuit itself is fairly straightforward. Diode D1 provides reverse polarity protection for the board in case the power supply is connected backwards. C1/C2 and IC2 take the incoming 12 volt supply and provide a regulated 5 volt supply required by the PIC microcontroller.
The red, green and blue LEDs are arranged in three parallel strings of three LEDs. Resistors R1, 2 and 3 limit the current through the LEDs to a safe value when using a 12 volt power supply. The low side of each LED string connects to a BC547 NPN transistor which is used to switch the LEDs on and off. These transistors are in turn controlled by the PIC microcontroller which drives each of the red, green and blue channel transistors with a PWM signal to control the average brightness of the LEDs. Switch S1 is used to select different effect sequences. The firmware program running on the PIC microcontroller is the smart part of the circuit and determines what colours are generated and how they fade from one colour to the next.
The three colours of LEDs are positioned on the PCB in an irregular arrangement to improve the colour mixing effect when placed behind / inside a diffuser such as a frosted glass globe.
The controller uses (RGB) Red, Green and Blue high brightness LEDs that are pulse width modulated (PWM) to vary the intensity of each colour LED. This allows effectively any colour to be generated with rapid changing strobe effects, fast and slow colour fades as well as static colours. The data used to set and change the colours is held in an easy to edit file so if you don’t like the sequences provided with it, you can modify the sequence data include file yourself and reprogram with your own sequences. (you will need a PIC programmer and some practical knowledge of microcontrollers and programming if you want to do this.)
The dimensions of the PCB are 50mm x 50mm.
The PCB supplied with the kit is professionally manufactured thru-plated with solder mask top and bottom and screen print overlay on FR4 laminate with RoHS finish.
If you want to etch your own PCB you can use the artwork above. Unless you are able to thru-plate your own PCB you will need to solder component leads top and bottom where required. Also look for the single via on the board that will need to be wired through.
The ready made PCB supplied in the kit has through plated holes so this does not apply.
The kit available from the Picprojects On-line store contains all the parts required to build the RGB LED Moodlight. This includes all the components, quality FR4 double sided PCB, Superflux LEDs and a PIC12F629 microcontroller pre-programmed with the firmware.
12 volt power supply is not included in the kit
A 2.1mm chassis mount DC power jack and 100mm of red/black wire are available as an option
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w
Current Project / Post can also be found using:
- LED Projects with PIC
- home automation system using mobile microcontroller pic
- LED dimmer projects using PIC 12F683
- pic of LED