In my mandate to only introduce things to the house that I know to be useful or believe to be beautiful, I came across this glass dome at Nkuku.
Nkuku is an ethical home and lifestyle shop, celebrating the work of artisan craftspeople across the globe, distributing their products from a cafe store in Devon. Their carefully curated pieces have an individualised charm that guarantees beauty, but could I truly say I have a use for a display dome?
Coming to my rescue was an idea I'd had for a table lamp some months back. It would see the form leveraged into an occasional lamp, retaining the beauty and adding a very necessary function for our poorly lit sitting room.
As always, whilst it was on the kitchen table, the temptation to add a few more features came on strong. The battle became how to honour the style of the piece, how to make something that could reflect the dome's heritage, but bring it forward to a thoroughly modern set of capabilities.
First thing for any glass bodied light in a house with two children is that you have to be able to operate it without touching it. Adding illumination to this kind of structure is most commonly achieved by floating a small battery pack and LED string inside the dome, but aside from the challenges of keeping the batteries charged, I can't see that configuration lasting for more than a couple of weeks before someone drops the glass.
So, external power becomes a requirement, bringing the corollary requirements of working out how to deliver it, and how to turn it off. The kitchen believes that even the cleverest of devices should behave consistently with their analogue counterparts (I do not want to be explaining how to turn on a light) so the flex represents an opportunity to fit an inline switch. This affords the necessary separation between dirty hands and fragile glass, and provides a visual interface which most users will find intuitive enough to use without training.
For the actual light source itself, the idea I had in mind used a string of micro LEDs. Amazon and eBay carry a wide range of such devices, and in the post Christmas season most are discounted. The only real challenge is in selecting which particular version to use. I found lengths from 10cm to 200cm, power from 3 to 36V, prices from £3 to £65, and a whole range of features (from waterproof ultra-bright static, through dimmable, to flash, chase, disco, etc).
I eventually opted for this 100 LED 5V 1A chain, as the copper traces complement the jar's aesthetic, and the unit seemed to strike a good balance between price and quality. The USB connection gives immediate portability, as, like most modern families, we seem to have multiple USB power supplies constantly plugged into at least one socket in each room.See this item at Amazon UK
Of course, running on 5V also affords advantages in automation and control. At these power levels, a bad connection is unlikely to set fire to anything, and 5V 1A is exactly the kind of load that I can switch easily using a few cheap components and a microprocessor. That means I can probably save money on a dimmer function by creating my own, and can easily extend the device forwards into using custom timers and remote access.
I wrote out a wish list of features as follows.
The lamp should:
- be easily operated without a learning curve.
- provide enough ambient light to illuminate the room.
The lamp could:
- be in the colour temperature range of between two and three thousand Kelvin.
- automatically turn off at bedtime to reduce power.
- automatically turn on in the early evening for security.
- be dimmable according to time of day or user preference.
- be controllable from a smart phone.
- support fade programmes that reinforce circadian rhythms of room occupants.
- respond to voice requests via digital assistants, such as Siri or Amazon's Alexa.
Above all, the governing constraint was this guidance, lifted from Nkuku's own site:
The relationship between an artisan and a beautiful handmade piece creates a story, which makes each product not a mass market item, but an individually crafted piece. The traditional skills used by our suppliers have been handed down from generation to generation. We value this age old knowledge and hope to help keep it alive. We love the character in each item, the handmade nature of our products is what we believe sets us apart. We want to protect these skills.
I want to protect those skills. I want to value this age old knowledge. But how do I keep this narrative intact, whilst adding a new chapter of my own?
Honouring the aesthetic
I've added automation to low voltage lamps before. Most recently, as a night light for my eldest. That time, I used an IKEA desk lamp as a donor, and was able to hide the power adapter and microprocessor inside a USB ported mains block. That works fine with utilitarian task lights, but the appearance doesn't really suit the Nkuku story. I can leverage the code, but the build is going to have to be from scratch then...
Bringing power to the lamp
The start point would have to be the flex. Regardless of how spindly a 5V pair of fly leads might be, they're not going to be something I can easily hide in a living room. I'd either need to deliver power invisibly, or find a way that was attractive enough to be a feature. The 1A wall wart that came with the LEDs wouldn't have the juice to power a microprocessor and the LEDs simultaneously, so I knew I'd be hunting for a new power source and lead anyway.
My ensuing searches turned up numerous manufacturers of braided cable, whose offerings blend modern wiring standards with a traditional look and feel. My vendor shortlist eventually resolved to Vividor, who offer a twisted silk braid in a good range of colours that is rated for 700W of lighting at 240V. Yes, this is considerable overkill for a lamp that won't exceed 3W at 5V, but it looks good, and the .75mm core will help hold out against voltage losses if I add longer cable runs.
Until I came across Vividor, I'd been factoring in using two core cable. That's the traditional way to power a table lamp, and its what all the switches and apertures are built around. Vividor's uniquely tight weave squeezes three core into a similar footprint, and with an external diameter of less than 6mm its on a par with many doubles. I figured this would pay off when it came to configuring an inline switch. Once I'd found a vendor on eBay who sold 3 core by the metre, it was a matter of waiting for the postman. I chose the teal colour, as it gives a hint at the modernity to come.
Controlling the power
A smart lamp isn't that smart if you need a phone to turn it on or off. Most lamps solve this by adding either a body capacitance circuit (touch lamps) or an inline switch. The glass and wood exterior meant touch circuitry would be near impossible, so the switch becomes necessary.
In an ideal world, the inline switch would be made of bakelite, but I was unable to find an affordable source of what is clearly becoming a desirable antique. In order to move the project along, I decided to use a simple black torpedo rocker switch in the interim. There are plenty of these at an affordable price point, and as I'm sitting at 5V 1A, so almost any switch that looks right is going to be overkill in terms of rating. Although generic enough to be invisible on the outside, the internal designs vary between manufacturers, and I needed to be sure I could route all 3 cables through the body. Ebay found me a 2 core 2A inline rocker with photos of the interior. It looked like there was enough clearance inside for the 3 cores, and at £3 for two, its not a major issue if I'm wrong.
Dimming the leds and extending the UI means embedding a microprocessor. I had a few choices:
- An arduino: Will run at 5V. Less than a fiver. Large, and with limited connectivity.
- A feather huzzah. Runs 3.3V logic but has a regulator onboard capable of taking this from the 5V line. Wifi connectivity via built in ESP8266 chip. About £20.
- A wemos D1 mini Pro. Runs 3.3V and has the same setup as the feather, but in a smaller form factor. Less than a tenner.
The User Interface
With an ESP8266 chip onboard, I immediately gain access to wifi. That means that there are multiple interfaces available.
UI 101: the switch.
Conventionally wired, the switch would contain two paths: A continuous circuit for the ground wire, and a switched circuit for the live. As my switch only has to handle 5V, I didn't mind crowbarring all three wires through the body. There's even a little ledge to hook the extra cable into as it passes.
I've also taken advantage of the third core to wire the switch a little differently from how you might expect. Rather than cut the live wire and leave the lamp unable to do anything until the switch is returned to a closed position, I opted to run the live and ground wires through the body without interruption. This means the lamp is always on and ready to respond to the other UIs or events.
As its wired here, the switch is used to conditionally connect the third core (usually designated earth) to the ground wire. The other end of that core will sit on a pin on the microprocessor, which itself will be connected via a resistor to the Wemos' 3.3V output. Software can then be loaded to monitor the voltage on that pin. If the switch is open, the 3.3V will arrive on the pin and the logic will read as 'HIGH'. When the switch closes, the 3.3V will be pulled to ground, and the logic will read 'LOW'. I can monitor those state changes and use them to turn the leds on and off, whilst keeping the Wemos fully powered.
Of course, in this configuration, there is no true ON or OFF position for the switch. OFF is simply the way the switch isn't thrown, when the lights are ON. Depending on which UI spoke last, ON could be up, or down. But that's OK. If the light is ON, moving the switch will turn it off. If its off, vice versa.
Accessorising: The Web UI
Accessorising the manual switch is a web user interface. Using libraries, its easy to have the little ESP8266 units act as web servers for their own controllers. Memory and concurrent calls are pretty limited, but there are lots of handy CDN hosted frameworks that you can link in with minimal source.
The Wemos will let you use progmem constants to free up memory, and these are ideal for long strings of characters that won't change, such as a web page or script.
I opted to separate the UI into:
- a static HTML page served from progmem.
- a dynamic json file generated on the fly and concatenated as a string.
I added links to cdn versions of bootstrap, jquery, and a couple of widgets for the toggles and knobs, and leveraged these to provide a suitably pleasant user control surface.
I also had the Wemos host register 'belljar.local' via the multicast Domain Name System (mDNS) so that any device in my house could quickly pick it up. The ESP joins my household wifi on a spare 2.4GHz channel, and is only reachable from inside my network. Whilst I can turn the light on/off from the garden, as soon as I lose sight of my SSID, control is relinquished. Whereas other devices have utilised MQTT for internet and IFTTT access, it wasn't relevant or useful here.
The current gold standard for operation in this household comes via Amazon's Alexa. Remote interface alexa.
Copper tabs. Wooden USB plug. Mains plate.
Photographs by Lotek.