Unsurprisingly, I get bombarded with adverts for smart home products, including numerous types and formats of smart lighting. One in particular caught my eye but, when I looked at it deeper I found it came with a proprietary interface and app. I came to the conclusion that I could do it better and create something that would fully integrate with my contextual smart home.
These lamps seem to be available in two forms: lamps that shine into the room or lamps that shine into the corner and reflect light off the walls. My first project design will shine into the room.
The height of these kind of lamps varies and basically you can use any length of 90° aluminium extrusion you want. Typically they come in 1m or 2m lengths though. For this first prototype, I'm using an odd piece I had lying around that is about 50cm long. My 90° extrusion came with a nice curved opaque, white diffuser.
You can use any kind of LED strip you want. I'm using an RGB+WW (red, green, blue and warm-white). You will obviously need some kind of LED strip controller to match your chosen LED strip. If you really wanted, this type of lamp could be a simple binary, single colour light or just a dimmable, single colour light.
I've designed the lamp base using Autodesk Fusion 360 and will 3D print this on my Ender 3 Pro 3D printer. You can download the STL file.
I've designed and built my own 4-channel, RGBW controller for use with LED strips like this and designed to be connected to an Arduino or Raspberry Pi. It's another of my smart home building blocks and uses my standard 10-Way DIL connector. It uses four IRLB8721 MOSFETs to drive very high currents if required and also supports PWM, to enable each channel to be dimmed.
This might become a Smartisant product later.
The first part of my build involved 3D printing the base on my Ender 3 Pro 3D printer. It took over 4 hours to print in white PLA. I will smooth this and paint it in white or silver.
The final part came out really well, with the 3D printer easily handling any bridging required. It needs to be properly cleaned up and printed.
On the underside, I have designed in some 8mm × 8mm × 64mm slots to allow some weights to be fixed into the base, making it more stable. You can also see the exit hole/channel in the design for the wires.
The aluminium extrusion sits snugly in the shaped hole in the base.
This is the completed lamp hardware before the base has been cleaned up and painted.
The painted lamp base.
The slots in the underside of the base are designed to accept metal weights like this. This is an old square bar I had lying around that was used between door handles.
Wiring up the RGBW controller is easy and just involves connecting the 5 wires to the LED strip and 12V dc power to the controller board.
The RGBW controller is then connected to an Arduino via the 10-Way DIL connector. This is where the clever stuff happens!
The connector and PCB have been designed to use the following pins and these are exposed using my Smartisant Arduino Shield SHLD1:
The use of a direct rotary encoder enables a direct manual control interface using a rotary knob mounted on a standard switch plate blank. This features a momentary push switch as well, to enable some quite powerful features, especially as the lamp remembers both brightness and colour states.
The rotary dial enables brightness control. Push and rotate the knob allows colour selection. A single press toggles the light on and off and when turned back on it restores the last colour and brightness. A double click resets the light to white and at full brightness.
The above pin designations leave the following pins for the rotary encoder:
I'm using the Arduino Mega 2560 for the project but, it could be any similar processor that has enough PWM capable pins. The Mega 2560 has a LOT more memory than the Uno though, for not a lot more money.
These things are brilliant! You get a huge amount of smart home functionality to very little money and can connect a huge number of sensors and devices to them really easily. They are also incredibly reliable and last 10+ years if used properly.
My Smartisant Arduino Shield SHLD1 makes it really easy to connect stuff like this together. I use it both to prototype new smart home devices and features and also to deploy live functionality in my contextual smart home.
Over the years, I have developed my own library of code for Arduino and this includes all the functions to integrate it into my distributed Home Control System and connect numerous types of sensors. This is designed to be reused many times in all my projects, making it very quick and easy to develop and test new smart home devices and features.
My contextual smart home models different types of lighting including a object type for these kind of lights, called 'RGBW'. Communication between the Arduino and my smart home is done using a unified communications protocol, so it is really easy to turn it on, off, change the brightness, colour, etc. This can be done via any of the available user interfaces, where permissions allow.
I've now written all the software to allow full manual and full smart control via my home network.
In my contextual smart home, I'm mostly aiming for a zero touch user experience, so that lighting like this just works intelligently around us. With colour changing and dimmable lighting though, sometimes you want to be able to manually control it using the various user interfaces available. Because this lamp and is tightly integrated with my smart home, any of the more general smart home interfaces can be used to control it:
I've developed my own artificial intelligence interface to my smart home, which supports both spoken English and types text, to query and control everything connected to my contextual smart home.
Sometimes you just want to use a switch and I've developed my own smart switch, which also connects to the Arduino and allows full control of brightness and colour via the rotary encoder with an integrated push switch. This is optional though.
The Arduino accepts requests over its network connection, to select brightness, colour and/or effects. It reports any change of state back to my Home Control System, regardless of how it was actioned.
This project delivers and powerful, smart home integrated RGBW lamp but the underlying technology described here could equally be used for any form factor of lighting, including ceiling lights, wall lights, etc.
If you really wanted the controller parts (including the rotary control) could be integrated into a lamp base and the whole thing made to work using Power over Ethernet (PoE).