Smart Home Safety Lighting Project

There are many smart home products on the market that provide 'night light' functionality but few that are fully integrated with the smart home and allow complete control of the operation and light levels. For this reason, I designed my own 'safety lighting' solution. You can read about the my research and thinking behind it.

Safety lighting is designed to come on when it is dark outside (as determined by my twilight sensor) and provides a low-level ambient lighting in places where it is needed. It provides just enough light to see by and helps negotiate hazards such as stairs, corridors and doorways. It is also designed to only come on when our home is occupied.

Design

Note:  This simple wired solution is just one part of my planned safety lighting and other solutions and form factors are covered later.

My initial design assumes the safety lighting uses a dedicated low voltage (12V dc) lighting circuit and is wired as such, using 16/0.20mm 0.5mm² 11amp 'thinwall', automotive grade cable. In my smart home, I also colour code all wiring and have chosen a pink wire for all safety lighting. Because the currents involved are so low, there is negligible voltage drop along very long lengths of wire.

Most of my 'safety lighting' is simply 5mm warm white LEDs, which are incredibly cheap and reliable. There is also a massive range of bezels available, to allow different styles of fixing either into or onto a surface.

An LED typically requires a forward voltage of around 3V, so you can't simply connect it to the 12V supply. You could use a single resistor to limit the current but, to get a constant current and brightness I am using an LM317 current regulator IC (datasheet). This uses a single resistor to set the current.

For my safety lighting I run LEDs at 4mA, so the value of the resistor R above is 330Ω. This basically means we can ensure a fixed brightness regardless of any variations in the supply voltage. Because the currents are so small, I can use the LM317 in cheaper TO-92 package.

Installation

LEDs come in all shapes and size, not just as round 3mm, 5mm or 10mm versions. Square, rectangular and triangle shaped LEDs are a thing. You can alsop get flat top LEDs, which means they can be mounted flush to a surface. You can also get a wide range of holder or mounts to fix LEDs in place. These also come in different colours and materials. Whilst plastic is common, metal versions are also available.

Smart Home Control

My contextual smart home models 'Safety Lighting' as a simple (on/off) 'Light' object. It is intelligently controlled by associating and configuring a controller and my Home Control System uses my unified communications protocol to make requests by sending an event to the slave processor on which it is hosted, to turn it on or off.

The physical lighting control is performed by an Arduino Mega 2560, which is a slave processor and part of my distributed smart home architecture.

The actual power switching is done using my 8-channel optically isolated output board.

Installation

Use Cases

Stairs & Landing

I have installed a single LED mounted in the ceiling above our stairs. When off it is virtually invisible. At night it puts out enough light to see by on our landing and stairs. Even with our bedroom door open, it is not enough light to keep us awake.

Bathrooms & Ensuite

I have also installed safety lighting in our bathroom and ensuites. This means we don't get dazzled by the main lighting if we get up in the night.

Beds

It can also be nice to have a soft glow coming from under a bed, to allow you to navigate a bedroom safely.

Summary

I've had safety lighting installed in my smart home now since 2008 and it was one of the first lighting projects I undertook. It has been faultless in all this time.

In order to make it even easier to deploy my safety lighting and for others to do so too, I've had a number of tiny PCBs manufactured. These accept the LM317 IC in both TO-92 and TO-220 package and allow the LED to be soldered to the PCB or mounted remotely on wires.

The board helps make it all more reliable and allows the LED current to be set using a single LED. Used in current limiting mode like this, it will work from a wide range of voltages and I'm using 12V dc without having to worry about any voltage drops on longer cable runs.

Dynamic Smart Lighting

I've also developed my own dynamic smart lighting and this has several form factors and the ability to be used for safety lighting too.

Further Reading