Home made light switches for a smart home

img

Summary

I got tired of the standard white light switches I had, and made a 4 button "smart" light switch in oak, including an MCU with CAN bus.

Introduction

Nearly all homes in Norway uses the white Elko RS16 light switches. They work well, but they are not very well suited for a smart home. They are not made for momentary action by default, so you'll need to insert a stiff spring for the switch to act as a momentary switch. Also, there's no feedback such as LEDs. Finally, you can only have up to three buttons in a frame. Having all my light switches connected to a bus cable with 24 V (SELV) and CAN bus, I'm free to make the light switches myself from a regulatory perspective, so I decided to make a switch module better suited for my use.

Hardware specifications

  • PIC18F26K80 microcontroller (compatible with HAPCAN)
  • Four mechanical keyboard switches (CherryMX compatible)
  • Four LEDs
  • DS18B20 temperature sensor
  • Transient protection/filter and DC/DC regulator
  • Fits in Elko wall box

PCB assembly

The PCB is made to fit in a standard Elko wall box.

img img img img

I experimented quite a bit with different keycaps from Aliexpress. None of them had cutouts for LEDs, so I had to make that. The final procedure to produce a keycap with a LED indicator was:
  • Insert a keycap into a jig to get it aligned properly and run a program that machines a hole
  • Put masking tape on the front of the keycaps
  • Leave a small block of hot glue in the keycap and put it in the oven on 100 degrees
  • Remove the masking tape. This leave a diffuse transparent surface perfect for viewing the LED from any angle.


img img img img img

Aluminium frame

The aluminium frame serves the purpose of mounting both the PCB and the front panel to the wall box. The PCB is mounted with spacers, the front panel snaps on with magnets.

img img img

Wooden front panel

Started off machining one in plywood, but in my opinion it looked much better in oak, so I continued with that.

img img img img img img img img img

Finally, the whole assembly is mounted.

img img img img img img

Comments



Design: Jon Petter Skagmo