Skip to main content
RGB Lighting Controller

Protostack Workspace Project – Part 2, RGB Lighting Controller

Back in 2011 we wrote a tutorial on how to use Pulse Width Modulation to change the colour of an RGB LED. This part of the workspace project is based on the same principles, but on a larger scale.

Overview

The RGB Lighting Controller allows you to control the colour and brightness of LEDs using a slide out control panel. The colours are controlled by hue, saturation and brightness controls and you can also switch it into Slow Cycle, Fast Cycle, Slow Pulse, Fast Pulse and Strobe modes. In reality I don’t really use many of these modes, I just got carried around when building the controller.

The system comprises of the following components:

RGB Lighting Controller

Because the control panel is located in a slide out drawer, the umbilical between it and the control board runs through a flexible channel.

Umbilical

The Circuit

The current being pushed through the LEDs is a lot more than the microcontroller can handle so we use 32A MOSFETS to do the switching. These are controlled by the PMW output of PD6 (OC0A), PB3 (OC2A) and PD3 (OC2B).

The ATMega168A has 6 Analogue inputs. We use 3 of these for the hue, saturation and brightness controls.

Circuit Diagram for RGB Controller

Firmware Source Code

I won’t go into the firmware source code in detail, but it is available using the download link below:

Building the Control Panel

The control panel is a piece of stainless steel that was laser cut and etched. Getting it laser cut was well worth it, but the etched letters didn’t come out as nice as I expected. I was told the laser used was perfect for cutting, but was too powerful for etching letters.

Laser Cut Control Panel

A 16×2 character LCD module is mounted on a Small Prototyping Board then attached to the back of the panel using nylon standoffs. The standoffs are affixed to the panel using an epoxy based putty, the type that you knead, mould into place then allow to set.

Back of Control Panel

Back of Control Panel

The large LED on the left side of the panel was made by knocking the mechanism out of a 19mm pushbutton switch. A 3W RGB LED was then placed into the cavity with a mixture of epoxy resin and titanium dioxide. The titanium dioxide was used to make the resin cloudy and disperse the light.

Large LED

Wiring up the LEDs

I wired up the LEDs using a ribbon cable made specifically for that purpose. This just means it had the right thickness (22AWG) and the right colours. I wanted the wiring to be easy to maintain and extend, so I created a set of n-way adapters that would allow me to branch off from a central bus.

These we made by cutting down Stacking headers, soldering them together, then sealing them with dual wall, glue lined heatshrink tubing.

n-way adapters

The 4 way ribbon cables are connected to the adapters using DuPont male connectors.

n-way adapters

The individual colours in the RGB LED Flexistrips need to mix to form the desired colour. This can be done by placing a diffuser over them or placing them so the colours spread, reflect and mix.

The photo below shows where the desktop meets the left pedestal. This can be seen in the bottom left of the photo at the top of this post. The pedestal is recessed here, allowing the LEDs to bounce of 3 glossy white surfaces.

RGB LED Strips

If you have any questions, please use the comments section below.

Sharing is caring, so if you liked this post, please share it on your favourite social platform.

Related News

Katsushika Hokusai's Great Wave at Kanagawa

Protostack Workspace Project – Part 1

A few months ago I finished a project, to renovate my workspace. I work from...

Protostack Workspace Project – Part 3, The Cooling System

This is the 3rd part of the workspace project where I describe the cooling system...

Leave a reply

Your email address will not be published. Required fields are marked *

Shopping Cart