The overall effect produced by this project is a glowing sequence of lights changing slowly from one colour to the next. The microcontroller cycles through randomly generated values of red, green and blue hues of light to produce a variety of nice colours. The software implemented on the controller interpolates from one shade to another, each colour channel being treated independently. Light intensity is controlled by means of pulse width modulation (PWM) for each colour. A high frequency of approximately 60 Hz is used to modify the light intensity and eliminate any flicker that might arise. One major problem that had to be overcome was unequal brightness of the LEDs used, the result of which is a tendency for one particular colour to dominate in the overall hue produced. It was found that blue LEDs are perceived to have the largest intensity and green, the lowest.
This was compensated for by using a large resistor for blue and a low resistor for green, together with two green diodes in series for higher green colour intensity. The values of the resistors may have to be tweaked to achieve the best balanced colour intensity. A diffused glow was achieved by cutting the lens of the ultra bright LEDs used and using a ping pong ball as a basic diffuser. This very simple project is perfect for a rainy day and can be built in a couple of hours. Despite its simplicity it will produce a very interesting and glowing effect. Several units may be built and they will mix a variety of colours randomly. The source and hex code files for the PIC12F675 device are available as free download # 080419-11.zip from the Elektor website. The code was developed using CCS C.