RGB LED wireless light

Here is a post about what you can do in an afternoon or two with a whole load of electronics stuff lying around.

I have had an red-green-blue (RGB) board from Big Clive or Phenoptix lying around for a while. I had developed an RGB LED controller for it, so I also had one of those attached to it.

It is designed to fit in to those 150W halogen light holders and I had managed to find one of those as well.

I wanted to do something fun with it so decided to make a wirelessly controlled LED lamp which can be used to change the room ambiance, or to signify some form of data (anything from room temperature to number of emails to read).

Demonstration

Here is the completed lamp and a short demo video:

Concept

The light contains an RGB LED board which is controlled using serial data from a microcontroller.

The microcontroller will read command sent to it via its serial lines and act on those accordingly.

The serial data is sent wirelessly using an XRF radio UART serial module. Any data sent to the device in the correct format will cause it to change colour.

Data will be sent using another XRF module from elsewhere (the XRF has a great range).

Parts required

If you would like to follow this build then you will need:

There are loads of different options for all of these parts, this was just what I had lying around.

Hardware

I wired two of the Minimus outputs (PD0 and PD1) to the Serial Data and Serial Clock lines of the RGB LED controller. The RGB controller was wired up to the 12V input and contains an on-board 5V regulator, which powers all the logic level equipment.

The XRF was wired to the Rx and Tx lines of the Minimus (PD2 and PD3). The wires were swapped over, so the XRF Tx connected to the Rx of the Minimus and vice versa. This is due to the flow of data from the XRF to the Minimus.

The XRF is a 3V3 device so I also needed a 3V3 converter board, the active version of this break out board.

A push switch was also wired to a digital input on the Minimus (on PD4). This has not bee used for anything yet, but the idea is that it will be used to locally switch the light output on and off.

Here are some photos of the guts of the it:

alt

All the parts before fitting into the halogen floodlight base.

alt

The minimus AVR.

alt

The RGB LED controller.

alt

The XRF and XBBO 3v3 breakout board.

alt

The RGB LED floodlight board.

alt

The empty halogen floodlight holder. This has holes for the 12V DC power, the push switch and the aerial of the XRF.

alt

alt

The RGB board was screwed into place with some 3mm machine screws and a couple of tapped holes I drilled.

alt

The finished, closed unit with glass front and power.

Software

The software was written using the Arduino IDE. It was uploaded to the Minimus AVR using the flow mentioned in this previous blog post. The code is available to download here or is written out here. Hopefully the comments help with the code flow. It uses the substring command which (as noted here) might be too memory intensive, which could cause an issue (but this code works as it is).

Further work

  • Frosting for the glass to diffuse the LED output (Thanks for giving me an off-cut, Russell)
  • Get the push-switch to switch between on and off
  • Control via a Slice of Radio Raspberry Pi add-on board.

Leave a Reply

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