Light Switches

The super-simple light switches featured in some SuperHouse episodes are designed to be reliable and easy to assemble. They’re really just illuminated buttons on the end of a long bit of wire, connecting to a light switch controller that does all the work of detecting when someone presses a switch.

You can see details of the light switch controller in Episode 25: Arduino home automation light switch controller. Details of the light switches themselves are in Episode 26: Make your own home automation light switches.

To make your own version of the SuperHouse light switches you can use a blank wall plate that suits the standard size for your country and the decor of your house, and combine it with your choice of illuminated buttons (available in multiple colours) and a breakout with an RJ45 connection.

Then you can use LAN cable (such as Cat-5 twisted pair) with RJ45 plugs to connect the light switches to an Arduino using an I/O Breakout To RJ45, and either an I/O Breakout Shield or an I/O Breakout Shield Mega.

Parts Required

To make each light switch you will need:

  • A blank wall plate. This is the same as the body of a normal light switch or power outlet, but without anything in it. You can usually buy these from a local hardware store or electrical supplier for a couple of bucks.
  • Illuminated buttons. Available in red, green, blue, white, and yellow. See GQ16F Specifications for full specs on the buttons that I use.
  • A breakout to suit the number of buttons you want. Available in 2-button, 3-button, and 4-button versions. If you want a wall plate with a single button, use the 2-button breakout and only fit one button.

Mark Switch Locations

The breakout PCBs have the physical spacing of the buttons printed on the top of the board, so you can always refer to it if you need to. For example, the 4-button breakout has 24mm horizontal spacing and 30mm vertical spacing (center to center) between the buttons as shown here:

You can use these measurements to mark the correct positions on the blank wall plate.

To make it even easier, the breakout PCBs also have a hole drilled at the exact center of each button. That means you can use the breakout as a template to mark the drilling locations.

Carefully position the PCB directly on the wall plate, so that it is centered both vertically and horizontally.

Then use a felt-tip pen to mark a dot on the wall plate through the center hole of each button.

Drill Switch Holes

Now that you have accurate marks for the hole locations, use a small drill bit to make a pilot hole through each of the marks. Do this step very carefully to ensure the position of each button is correct.

Then drill out the holes to 16mm diameter. You can do this with either a step-drill (which will leave a very clean hole) or a 16mm spade bit. Be careful with this stage, because a large drill bit can catch the edge of the hole and spin the wall plate violently. Make sure your hands are protected and the wall plate is well braced.

If the drill has left the edges of the holes rough, you can clean them up with a sharp hobby knife. Otherwise the switches may not sit flat against the plate.

Mount Switches In Wall Plate

Insert the switches through the wall plate from the front, and then fit the nuts onto the switches from the back.

Don’t tighten them up yet! The switches still need to be able to rotate, so leave the nuts loose.

Fit Breakout To Switches

Be very careful with this step. It’s critical to get it right. The pins on the switches must be oriented the right way around so that the LED connections go to the correct pads.

Look closely at the back of each switch and find a small dot between two of the pins. If you look at the markings on the breakout PCB you’ll also find a dot. Rotate the switches in the face plate so that the dots on the switches are in the same position as the dots on the PCB.

Place the PCB onto the pins, and press down and wriggle it until the pins go partly into the holes. It’s easiest to do this with the wall plate sitting face-down on a work bench, but be careful not to scratch it. Place a soft cloth, some paper towel, or an anti-static mat on the work bench to protect the wall plate and the front of the buttons.

The switch pins can be a very tight fit in the PCB. Be careful that you don’t damage them when fitting the PCB. Be patient, work carefully, and slowly work the PCB down onto the pins. You may need to bend the pins in or out slightly to make them align.

Don’t push the PCB all the way down. Only push it enough for the pins to go through the holes, and just come through the top of the PCB a tiny bit. This will reduce the strain on the pins, and also give better clearance for the cable when it plugs into the RJ45 socket.

Tighten up the nuts on the back of the switches so they’re held firmly in place.

Solder Switches To Breakout

Solder each of the switch pins to the PCB. Be careful working around the RJ45 socket so that you don’t melt it with the soldering iron. Also make sure you don’t disturb the tiny surface mount resistors on the PCB.

The light switch is now complete and ready to use, but first it’s a good idea to put a dab of hot glue or epoxy onto the nuts so that they don’t work loose.

Completed Switches

A few examples of switches that have been assembled using these breakouts.

4-way with white buttons:

2-way with blue buttons:

17 thoughts on “Light Switches

  1. I don’t have the ability to run cat5 to my switches, so will have to use something like the Sonoff light switch or make my own with an ESP8266 etc. What would you recommend? I was excited when you had shown that you had made one with an esp8266 device but was hoping to see more. Thanks.

  2. I would love to have the ones with the ESP8266 instead the Cat 5. Will be available assembled ?

    1. Hopefully. I’m prototyping those now, but there will be a couple of other videos coming out first

  3. Excellent description of the total process. Please convey the prices of the complete kits to assemble one button ,two button , three button and four button assemblies along with WiFi option.

    1. The prices are all on the product pages, which are linked in the tutorial.

  4. Hi Jon,
    I’ve been reading and watching all the fantastic information you provide on this website and on youtube. You are doing a marvellous job of supplying all this detail and conveying the information across.
    I’m currently rewiring my house, here in the UK. I’m very keen to include the lighting switching flexibility that your network switching using Ardunios provides. I am currently in the throws of designing the architecture after setting out my lighting requirements.
    I’m very keen to get hold of your switches, however the considerable postage costs from Aus to UK, is it possible you could provide the PCB design for the switches, for a fee of course, so I can have them built locally. I could then gather the back plates and pushbuttons myself.
    Also I’m happy to share my project details that I’m thinking of executing, which basically has ardunio design for living areas (Kitchen, Lounge, Dining Room, Entrance) and using 4Ch sonoff for the remote bedrooms. All using MQTT with OpenHAB.

    Let me know if you can help with the switches or have any tips on my design. (the visio of which I can send to you)

    Kind Regards,

    1. I would be interested in hearing about the details of your plans as I am building a new house myself and plan to also implement a similar system. Should you get around to writing up some blog posts or make some youtube videos do come back and provide links!

  5. I have a question regarding the LEDs on the push button:

    If someone turns on the light switch physically (with the button) and then turns them off wirelessly (with software), will the LED turn off as you’d expect or does it stay on?

    What I’m trying to get at is whether the LED on the actual button is completely in sync with the light that the switch is actually controlling, regardless of how it is turned on/off?

    1. That would be up to the software you’d write on your arduino:
      1. As to what circumstances you’d want arduino to illuminate the switch’s led.
      2. The status of your actual light is sent back to the arduino.

      There’s no smarts in the switch itself. How you want it to behave is up to you via the software you’d write on the arduino.

    2. In one of his later videos Jon talks about exactly what you are saying. He now uses one button per circuit – that button handles both on and off.

  6. I wish to get the Things but for sensor…
    Luke pir or temperature humidity…

  7. Hi Jon,

    Will you be replenishing stock for the 4 button breakouts?

  8. Really enjoying the content here and on youtube. Been following you for a few years and excited to come back and see that you’ve developed this beyond putting an Arduino at each of the switch locations. You mention in a lot of your videos that you use one button for on and one for off. It seems that it’d be more efficient to have one button that when pressed just toggles the state between on and off. Is there a reason for one button for on and one for off? Keep up the good work! I’m def learning a lot.

  9. Have you given any thought to having the ability to dim your lights maybe based on ambient light ect? I could see some functionality in being able to control the amount if light rather then just on/off. Thank you for your time.

  10. Did I hear correctly in one of your videos that your source of buttons is no longer available?

  11. HI Jon, Just a couple of things.
    1. Are the LightSwitch PCBs going to come back into stock? If so; any delivery dates?
    2. Superhouse #32 on Rock solid WiFi (Part One) you mention a part 2 being available very soon but its been a year or have I got it wrong?


  12. Have you taken the light switch development any further towards a touch screen in a flush box

Leave a Reply

Your email address will not be published. Required fields are marked *