LED mood Lamp with PIC16F628

Not rated 22,370

Circuit Image

This high power led mood light is based on PIC16F628 and the ability of this mcu to produce PWM pulses. Varying pulse width we can produce millions of color combinations using only the three basic colors. So only one RGB (Red-Green-Blue) led is capable producing a rainbow of fading colors. With the help of four switches we can handle all functions of the lamp. We can choose fading or jumping between colors, we can select a rainbow style or a random color changing behavior, we can choose slow or fast changing of colors and we can pause on a desired color. More: You can use your imagination to find a housing that will be able to diffuse colors uniformly. Color diffusion is necessary to achieve best results. In original design the author used the 45cm IKEA Mylonit lamp. That's a great housing for your lamp. Instead you can use the smaller 31cm IKEA Mylonit lamp with the same amazing results. That's the lamp we used in our construction. The led used is a high power 3W RGB LED. It can be found on ebay at LEDSEE-electronics. You can also check ebay for other high power RGB leds. It will do the job the same way. Details of this brilliant led shown below.

Here is a list of the components i used for making the led mood lamp.

- 3 x NPN transistors capable of driving 500 mA, for example the BC337
- one PIC 16F628(A) and a programmer
- a small perforated circuit board
- 7 x 10K resistors (1/4W)
- 1/2 watt resistors (2x 22 Ohm, 4x 10 Ohm) and a DIP switch
- a power supply (5 volts, 500 mA)
- Ikea Mylonit lamp or other housing
- silicon paste from your local DIY shop (if you want to use a heatsink)
- one z-power 3 watt rgb led
- a little heatsink and some cooling paste (if you want to use a heatsink)

Programming the PIC16F628 can be achieved using this very simple pic programmer and a program called ic-prog. Just use your programmer and upload the .hex file on your PIC. For successful results you should pay attention on the fuse bits. You should enter the correct fuses as noted on the following table.

The circuit design for the high power LED mood light utilizes a PIC16F628 microcontroller, which is programmed to generate Pulse Width Modulation (PWM) signals. This allows for the control of the RGB LED, enabling the creation of a wide spectrum of colors by varying the duty cycle of the PWM signals sent to each color channel (Red, Green, and Blue). The circuit includes three NPN transistors, such as BC337, which serve as switches to control the current flowing to the RGB LED. Each transistor is connected to a respective color channel of the LED and is activated by the PWM output from the PIC16F628.

The circuit is equipped with four switches that provide user interaction, allowing the selection of different lighting modes. These modes include fading and jumping between colors, as well as options for rainbow effects or random color changes. The user can also adjust the speed of color transitions and pause on a selected color, enhancing the versatility of the mood light.

A DIP switch is incorporated into the design to enable easy mode selection and configuration changes. Resistors are used throughout the circuit for current limiting and biasing purposes, ensuring that the transistors operate within their safe limits. The circuit board is constructed on a small perforated board, allowing for easy assembly and modifications.

The power supply for the circuit is a 5V source capable of providing at least 500mA, which is sufficient to drive the high power 3W RGB LED. Thermal management is addressed by the inclusion of a heatsink, which can be applied with silicon paste to ensure efficient heat dissipation from the LED during operation.

In terms of programming, the PIC16F628 can be programmed using a simple PIC programmer and software like IC-Prog. Careful attention must be paid to the fuse settings during programming to ensure the microcontroller operates correctly. The design can be housed in various lamp styles, with the IKEA Mylonit lamp being a recommended option for optimal color diffusion.This high power led mood light is based on PIC16F628 and the ability of this mcu to produce PWM pulses. Varying pulse width we can produce millions of color combinations using only the three basic colors. So only one RGB (Red-Green-Blue) led is capable producing a rainbow of fading colors. With the help of four switches we can handle all functions of the lamp. We can choose fading or jumping between colors, we can select a rainbow style or a random color changing behavior, we can choose slow or fast changing of colors and we can pause on a desired color.

You can use your imagination to find a housing that will be able to diffuse colors uniformly. Color difussion is necessary to achieve best results. In original design the author used the 45cm IKEA Mylonit lamp. That's a great housing for your lamp. Instead you can use the smaller 31cm IKEA Mylonit lamp with the same amazing results. That's the lamp we used in our construction. The led used is a high power 3W RGB LED. It can be found on ebay at LEDSEE-electronics. You can also check ebay for other high power RGB leds. It will do the jod the same way. Details of this brilliant led shown below. Here is a list of the components i used for making the led mood lamp. - 3 x NPN transistors capable of driving 500 mA, for example the BC337 - one PIC 16F628(A) and a programmer - a small perforated circuit board - 7 x 10K resistors (1/4W) - 1/2 watt resistors (2x 22 Ohm, 4x 10 Ohm) and a DIP switch - a power supply (5 volts, 500 mA) - Ikea Mylonit lamp or other housing - silicon paste from your local DIY shop (if you want to use a heatsink) - one z-power 3 watt rgb led - a little heatsink and some cooling paste (if you want to use a heatsink) Programming the PIC16F628 can be achieved using this very simple pic programmer and a program called ic-prog. Just use your programmer and upload the .hex file on your PIC. For successful results you should pay attention on the fuse bits. You should enter the correct fuses as noted on the following table. 🔗 External reference




Warning: include(partials/cookie-banner.php): Failed to open stream: Permission denied in /var/www/html/nextgr/view-circuit.php on line 713

Warning: include(): Failed opening 'partials/cookie-banner.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/nextgr/view-circuit.php on line 713