Smart Home Light Switch Project

The objective of this project (like most of them) is to deliver the best possible user experience when using any smart lighting. We didn't want to limit ourselves to smart bulbs or smart switch modules because both of these solutions have limitations and neither results in a great user experience.

We wanted a solution that was simple and intuitive and worked with all types of lighting. We realised that to achieve this we would need to change the way existing light switches are wired but, we are willing to do this in order to achieve the best possible user experience.

The switch described here will work with any kind of lighting and can be used to control smart bulbs such LIFX or Philips Hue. You can read more about the thinking behind this project here.

Note:  We do use switch plate screw covers to improve the aesthetics of the wall switches but, in many cases they are not shown fitted here.

Design

Our design allows any switch plate to be use and these can be 1-gang, 2-gang, or more. It also enables any knob to be used, so long as it fits a standard size (6mm) spindle. In our home we are typically using MK blanks and attractive metal knobs.

Behind the knob is a low-cost rotary encoder. These are small enough to enable two encoders to be mounted on a 1-gang switch plate.

It also enables any knob to be used, of any material and of any colour. So long as it fits a standard size (6mm) spindle, it will work. In our home we are typically using MK switch plate blanks and plain white knobs.

Importantly, the switches and encoders have a nice positive, quality feel to them. They will not feel out of place in any home and this approach provides the flexibility to choose hardware that meets your personal style preferences. This could include polished metals, woods, coloured plastics, or even specialised finishes (e.g. carbon fibre) if required. We wanted a solution that provided a lot of design freedom.

User Interface

Note:  Note: We are describing the manual switch control interface enabled by this project only. All the other user interfaces exposed by our contextual smart home can also be used to control lighting in our home. This includes intelligent automation and in most cases we aim for a zero touch user experience.

We designed the switch to work in an intuitive and simple fashion. It can do this because it supports both a (momentary) push on/off capability and also a rotation capability:

This means you can use the knob to both select the colour and brightness of the lighting using a wall switch. We are also add a capbility to control the colour temperature as well and more will follow on this later.

Hardware

Behind each knob is a high quality (but low-cost) rotary encoder. We are using a version that supports both a rotary encoder and push switch. These are powered via 5V dc and use very little current, enabling them to be direct connected to an Arduino. There are 5 connections including +5V dc and GND.

We use the following colours, when wiring up rotary encoders:

  • CLK = Blue
  • DT = Green
  • Switch = Yellow
  • +5V = Orange
  • GND = Black

Arduino

The Arduino is translating user input into the requested brightness and colour. It can then action these values by directly controlling attached lighting (e.g. via our RGBW controller) and it also sends the requested values to our contextual smart home.

This means our smart home gets a view of switch activity and can use this as additional occupancy context in our home. It also means a single switch can control any number of lights (grouped lighting) and also lighting groups with different types of lighting (e.g. smart switches, smart bulbs, etc.).

Better still, any number of switches can also be used to control one light or a group of lights, alongside all the other user interfaces in our smart home.

Further Reading