Overview

SwitchMote is a wireless light switch controller that replaces traditional light switches and allows you to remote control any AC load. SwitchMotes can be independent of each other or they can be synchronized such that when a button is pressed one or more SwitchMotes can turn their loads ON/OFF. It can also be wirelessly programmed (OTA).

This is the latest revision with all SMD components, 3D printed enclosure and and minimal soldering and hand assembly:

Here are some overview videos (SwithMote R2 shown):

SwitchMote PSU

  • SwitchMote PSU is the PSU (power supply unit) side of a SwitchMote – a compact fully isolated power supply that can provide 5V up to 400mA. It is based on the RECOM RAC02 which provides 3kVAC mains isolation
  • Onboard compact mechanical relay(s) can control up to 2 (two) AC loads, perfect for any mains switching application (single 16A or dual 10A relays)

Here is a SwitchMote PSU shown with dual 10A relays, and the Moteino which provides wireless control:

Bottom side with unit fully soldered:

 

SwitchMote 2x10A

SwitchMote can host dual 10A relays (on D7 and D3). This allows to control two loads of up to 10A@250V from a single SwitchMote. The assembly instructions are here. It’s now possible to order SwitchMote with a single 16A relay!

SwitchMote 1x30A

  • Similar to SwitchMotePSU, the SwitchMote1x30A is a compact fully isolated power supply that can provide 5V up to 400mA
  • 30A-250V onboard relay can drive heavy AC loads wirelessly via the Moteino. A sample sketch to control it can be found here. The relay has independent load connections on top for connecting standard QC 0.25″ terminals. They are in parallel with the Hot and Load PCB/blue screw terminal connections
  • 2oz copper thickness with double sided load traces, flamability rated PCB
  • same safety features as SwitchMote: 120/250V fuse, varistor, AC-DC 3kV isolation
  • Essential terminal connection difference: AC power needs to be hooked up through the Neutral and Hot terminals. The third terminal is for the Load only
  • Soldering assembly is very similar to SwitchMote
  • Schematic:

Features

SwitchMote is a unique smart light switch available as a customizable kit, and programmable in Arduino IDE. It was designed to be safe, easy to assemble, easy to use and program. It can be installed in standard US electrical boxes.

  • Replaces regular light switches allows remote control and monitoring of lights for automation purposes
  • SYNC feature independently links between multiple SwitchMotes to create light scenes without the need of a central gateway/coordinator
  • Up to 3 buttons and 6 status LEDs provide functionality and visual feedback
  • Motion detection via PIR motion sensor option in place of middle button, allows detecting motion and also automatic lights-on with off-timer (PIR sample sketch)
  • Wireless programming via Moteino eliminates the need to disconnect SwitchMote from the wall when you want to upgrade the firmware
  • SwitchMote PSU is the PSU standalone version, no front button panel, can be used to drive a 5V load wirelesly
  • Control one 16A load or two 10A loads via onboard mechanical relays
  • Safety features: 120V/250V input fuse and anti-transient MOV varistor, UL certified AC-DC power supply, routed slots and large clearance between high/low voltage circuits

Kit Parts

The SwitchMote kit is modular and has 2 parts (may be ordered individually). The original kit includes everything to build a wall mountable wireless light switch.

  • SwitchMote PSU (SM Power Supply Unit, available separately here) which provides 5V from mains, needed for the Moteino and LEDs. This may be used to control up to 2 relays remotely. Comes with MOV, screw header and 3D printed enclosure that mates with the front of the unit when assembled.
  • SwitchMote Button Shield with 3 buttons, and optional PIR sensor, red and green LEDs. Also included are a white translucent laser cut acrylic button cover and 3D printed frame with screws to mount to the back of the unit.

Safety & Disclaimer

DANGER

Be prepared, be safe! Make sure to read this disclaimer and familiarize yourself with all the steps below before starting any work on SwitchMote assembly/install.

SwitchMote is isolated from mains electricity via the RECOM PSU (3kV isolation). Additional safety devices in the SwitchMote kit include a current limiting fuse and a MOV (metal oxide varistor) device to help protect against transients.

You should not attempt to assemble/install a SwitchMote if you are not familiar with mains wiring! Mains voltage can cause a fatal shock or start a fire when used improperly or negligently! Please consult this electrical safety handbook to understand how you can protect yourself and your equipment from electrical shock.

The SwitchMote is not an end consumer product but a kit and requires assembly/soldering and is intended for users comfortable/qualified to assemble it, taking who understand the safety measures neede for assembly, installation and use. Certain parts are polarized and require proper orientation before soldering otherwise SwitchMote may malfunction or not work.

SwitchMote also requires programming prior to it being functional, LowPowerLab is not liable for how the end user decides to assemble or use and customize the sample firmware code. The following information and sample code is meant as an educational resource only, to help guide the end user with assembly and better understand how SwitchMote can operate. The end user is fully responsible to ensure the final product will be electrically safe to operate.

Although as a whole, SwitchMote is not UL/CSA/CE certified, it uses a certified power supply. However SwitchMote comes with NO GUARANTEES expressed or implied and LowPowerLab is not liable for any injuries or damage caused by improper assembly or use of SwitchMote. It may be against code to install non UL certified equipment in your area, so you are responsible to make sure you are compliant or take any risks on your own. If you do not agree or understand the terms of this disclaimer you should not use SwitchMote. Use it at your own risk!

Assembly

SwitchMote is a wireless light switch controller that replaces traditional mechanical switches and allows wireless control up to two AC loads. SwitchMotes can be independent of each other or they can be linked in such a way that when a button is pressed one or more SwitchMotes can turn their loads ON/OFF (via SYNC-ing).

SwitchMote PSU assembly

SwitchMote PSU  is the power supply side of the SwitchMote which allows wireless control of a single 16A relay, or up to two 10A relays.

Before you assemble or use any SwitchMote variant please see this page and disclaimer.

Always solder components from smallest to largest. Start by soldering the MOV (blue through hole component). Then solder the terminal header and make sure the leads access terminals are to the exterior of the board. Finally trim the leads as neat and flat to the PCB as possible.

Prepare the male and female headers for mating with Moteino. Cut the provided kit headers into these segments: 1×7 and 1×13 male; 1×6, 1×7 and 1×13 female. Each time you cut a female you lose a position so to cut the 1×7 you must cut at the 8th position. Trim the excess plastic on the female headers with an utility knife. Note: the photo below shows the older R2 PSU, this is for reference only, the important part here is the headers:

Insert the headers in the SwitchMote PCB to align them and then solder the male headers on the Moteino first. Then solder the Moteino 1×6 female FTDI header on the TOP of the PCB, see photo, also a good time to solder the wire antenna. Then proceed to solder the female headers on the SwitchMote while using the Moteino as align helper.

Next up is soldering the relay(s) and the RECOM power supply. If you have the single 16A relay, solder the RECOM power supply first, then cut the extra relay pins (cut them as low/flat as possible) and direct the other pins into the “Relay 1” slot as shown in the photos below. Insert the DC side first then use a screwdriver to help with slightly bending the pins on the other side to fit the holes:

If you have the 10A relays, solder the relays first then the RECOM power supply.

Finally trim all the leads flat and secure the antenna with a bit of tape. Then attach the PSU cover plate if  was included in the kit (it’s optional with the PSU). You may/should test the PSU side if possible with a polarized power cable, insert the HOT into the “H” terminal and the NEUTRAL in the “N” terminal. The PWR LED should come on and power the Moteino (if any). You can then load a sketch and control the D7 and D3 pins on the Moteino which will control the two relays.

The photos below show the older R2 PSU but the relevant part here is soldering the large components and headers and trimming the solder joints flat.

Simple mains test with the PSU assembled. The green PWR LED should come on.

If you only have the SwitchMote PSU, then you are finished at this point.

Mating with button shield

The second part is assembly of the front button PCB and mating with the PSU.

Next prepare to mate the PSU with the Shield. You will need to cut another few male headers: two 1×1, 1×5, 1×6. Mate the two parts together, ensure there is clearange between the two PCBs (no leads being close to each other, otherwise trim them down). Solder as seen in photos, when finished trim the excess of these header pins. Ensure a good soldering job with no cold solder joints.

Add the Moteino and bend antenna around in a way that it fits the case:

Add the 3D printed cover:

Button cover and final assembly

Place the lasercut acrylic button cover in the 3D printed frame, and ensure the correct orientation – RST button hole should match where the RST button is. Apply a little hot glue in 4 corners and at two points on the lateral sides as necessary, this will secure the frame to the acrylic cover:

Finally, mount and mate the frame with the back enclosure with the provided screws. Avoid overtightening as this can bend the PCB and/or damage the 3D printed parts:

Your SwitchMote is now assembled, you may proceed to programming with an FTDI Adapter (see next step in the guide).

Once programmed, pressing the buttons should switch the LED states and the middle button should control relay1, top button should control relay2 (if installed).

When this is all done, your SwitchMote is ready to replace a regular light switch. See the main install example page for how this might be done.

Programming

For programming and testing purposes, you can power and upload sketches via an FTDI-Adapter, just plug your FTDI-Adapter via the provided double header into the SwitchMote as seen below:

Never connect to SwitchMote via FTDI adapter/programmer while wired to mains!

Upload the SwitchMote sketch into your SwitchMote Moteino the same way you’d program any Moteino. This sketch includes a configuration menu that helps setup the essential parameters of the Moteino in the SwitchMote such as frequency, node and network IDs, RFM69 type (W or HW), encryption key, optional description, etc. All these parameters are then stored to EEPROM for permanent storage. The sketch has no hardcoded radio settings, instead it reads the settings from EEPROM.

This keeps the sketch unchanged for all SwitchMotes and saves you from having to remember each Moteino’s radio configuration (ex. RFM69W vs RFM69HW). Additional settings could be added, like power level, bitrate, etc. Configure once and forget!

If your SwitchMote has the PIR sensor option you will need to get this sketch instead. The middle button and the PIR output are shared to D5. This sketch monitors D5 for motion rather than a button press.

The ArduinoIDE serial monitor won’t work for using the config utility because of the way it emulates EOLs. So please use Putty instead, or an equivalent terminal app for the configuration utility.
The first time the sketch runs, it will check the EEPROM and detect there is no configuration set – it will then configure defaults (all 0 or empty settings, 915mhz for frequency). Use the menu to configure all parameters to match the hardware and your network settings:

Here’s an example of using the menu to set the essential settings. After all settings are configured, don’t forget to (s)ave and (r)eboot the sketch via this menu to burn the settings into EEPROM.

After the initial configuration, your SwitchMote can be wired to mains and installed in the wall. The sketch will read the EEPROM configuration that was setup initially (shown above). The SwitchMote sketch also does several things:

  • keeps track of which buttons were pressed, and manages the modes of operation
  • any button can be in ON or OFF mode – reflected in GREEN or RED led status
  • listens for BTNx:y tokens, to put button x in mode y, where x={0,1,2}, y={0,1}
  • listens for SW:y tokens where y={0,1}, to turn the relay on or off and the associated button in that same state (reflected by the LEDs: green=ON, red=OFF)
  • if the button associated with the relay (RELAY) is pressed then the Relay is turned ON or OFF depending on the mode that button transitions to
  • if a button is held pressed for at least 3 seconds (configurable) it enters SYNC mode, explained below
  • if a button has SYNC data it will notify the remote SwitchMotes to virtually “press a button”, and transition that button to the mode specified in the SYNC data
  • if any button is held pressed for at least 6 seconds (configurable) it erases the internal SYNC data in EEPROM. This could be modified such that only the SYNC data associated with the pressed button is erased, not the entire SYNC data
  • notifies the gateway, if any present, that a button was pressed

Note that SwitchMotes are designed to work independently and with each other without the need for a network gateway or coordinator (using the above sample sketch). A gateway is by default notified but the feature can be removed if not desired.

Also note that SwitchMote is highly flexible and can work without relay(s), in which case only the neutral wire N and a hot wire to either one of S1/S2 is needed (to power the electronics). In this case the SwitchMote can just act as a general purpose wall controller for other SwitchMotes or be customized to send other commands to other Moteinos. For instance you could open/close your garage (with GarageMote), or use the front panel LEDs to indicate the status of another node (ex: garage status, or mail delivered?). The sky is the limit of what you can do with a SwitchMote!

Wireless (OTA) Programming

Here’s an action video of a SwitchMote being wirelessly programmed:

See this post for more details.

Also see this how-to guide on wireless programming.

SYNC mode

The sketch keeps a table of “SYNC” data in EEPROM, with a number of entries (configurable). Each entry means a remote SwitchMote needs to be notified to virtually “press a button” when a physical button is pressed on this SwitchMote. If that button happens to be associated with the relay (SSR) then the light or AC load (up to 5A) is also turned ON/OFF, depending on the modes the 2 SwitchMotes are in. Otherwise it will just reflect the new state on the front panel LEDs for that button. Note that it’s possible that a button can be in ON state and trigger an OFF state somewhere else. Think of turning a light ON here and OFF somewhere else from a single button press.

Using SYNC mode (synchronize buttons on two SwitchMotes):

  • press and hold the button you want to be controlled (the slave) for at least 3 seconds, LEDs for that button will start flashing rapidly.
  • walk to the SwitchMote from which you want to control and press and hold the button you want to be the controller (the master) for at least 3 seconds. At this point the master will broadcast a SYNC? token and the slave will respond with a SYNCx:y token where x=button placed in SYNCy=mode of button placed in SYNC
  • for instance to turn a light ON on SwitchMote#1 (SM1) from SwitchMote#2 (SM2), you must:
    • press SM2 main button (the one associated with the SSR) to place it in ON mode (click until green LED and light are turned on)
    • put that button in SYNC mode (3 second press and hold)
    • walk to SM1 and press the button you want to control from in ON mode (click until green LED is on for that button)
    • put that SM1 button in SYNC mode (3 second press and hold)
    • note that if the SM1 button is also the main button (Relay controlling button), then pressing SM1 main button will now turn both lights ON
    • to turn lights OFF repeat the procedure but place the buttons in OFF state before SYNCing

The SYNC mode is demonstrated in this video starting at 3:53:

Install examples

Replacing a regular light switch
The simplest way to use SwitchMote is to replace a single light switch that is hard wired to a single load (ex. a light). Make sure to disconnect the breaker of the circuit of your light before proceeding with this step. Here are illustrated steps for replacing one of the switches in a 2 gang electrical box containing 2 regular switches. A new cover plate was required to fit the old switch along with the new SwitchMote. Many cover configurations are readily available at HomeDepot or online. Otherwise you can keep your old cover plate if you are replacing a rectangular light switch.

For this particular install a short neutral wire had to be added to the nut where the white wires were merged (needed for the “N” neutral connector on the SM PSU). The other 2 black wires were trimmed to about 3/16″ exposed wire and connected to the “S1” and “S2” terminals on the SM PSU. It does not matter which way the black wires are connected to these S1 and S2 terminals. That’s one of the nice features of SwitchMote, you don’t have to worry which is the source (from the panel) and which is the load (light bulb). For SwitchMote2x10A you must connect the black (hot in) wire to the “H” terminal (you might need to determine which is the hot coming from the source/panel first). Make sure there are no exposed wires left unconnected or protected by wire nuts. The earth GND wires are bare copper and should be pushed back in the box to avoid touching the electronics of the SwitchMote. The back cover is meant for this specific purpose and the metal screws that hold it are not connected to anything on the SwitchMote PCBs. Adding some electrical tape around the nylon spacers adds even more protection from anything that might reach inside the SwitchMote. With the 3 wires tightly screwed in the terminals of SM you can turn on the breaker for a quick test without touching the wiring. The LEDs should turn ON and normal operation should begin just as if it were connected through the FTDI.

Use the screws from the old switch make to mount SwitchMote to the wall electrical box. If this is a brand new install then just use some common M6 screws of at least 1 inch length. Screw through the oval routed holes into the 2 end holes where the old switch was screwed, making sure the SwitchMote Shield PCB will sit flush with the wall and approximately parallel with the box or other light switches around it. Be gentle, do not force the screws into the PCB as it may snap or cause copper traces to break.

For the cover plate gently thread the cover plate screws in the 2 outlier plated holes on the SwitchMote Shield. Then you are ready to mount the cover plate. Take care while fitting the cover plate over the switch. Sometimes plastic electrical boxes are poorly fitted into the wall by the builders, and it might be less than easy to fit a light switch into its own cover. Same is true here for SwitchMote. It is more difficult when you have another traditional switch in the same box along with SwitchMote, as shown in the following photos. If it doesn’t want to fit easily don’t force the SwitchMote to fit, you will likely have to lessen the screws, and the oval holes allow adjusting the SwitchMote position. Use common sense, SwitchMote is a sensitive electronic device and force will not do it any good.

Please note: the below photos show the simple single-relay SwitchMote – for this any of the S1 and S2 terminals can act as input while the other is the switched output. In SwitchMote2x10A this is not the same – there is a dedicated HOT input (“H”)  and two (“S1”, “S2”) switched outputs.

Replacing 3-way light switches
You can certainly replace two light switches arranged in a 3-way combination. Here’s a typical 3-way switched circuit arrangement:

3-WAY

This is a more advanced circuit, so you must fully understand how 3-way switching works, don’t attempt this otherwise. First make sure the Neutral wire is available at both boxes (white wire). You then have to identify which of the two boxes has the Hot (black wire) that leads to the load(s), this is the load-box. You will install the load-bearing SwitchMote in the load-box. The other box is just a switch-box and you will install a SwitchMote that only needs power (N from white wire and either of the S terminals from black wire on regular SwitchMote and N(white)+H(black) on SwitchMote2x10A). Even though the switch-box SwitchMote has a relay and it will turn on, there is no load on it, this is OK (you may choose to not solder the relay on that SwitchMote). Once both are installed only the load-box SwitchMote can control the load/light. You can now SYNC the two such that both turn the light on/off. After this is complete, the switch-box SwitchMote will communicate with the load-box SwitchMote wirelessly to control the load and synchronize the red/green status LEDs on both ends. Note that ground (copper) and red wires that are now left unused should be separately isolated with wire nuts and left in the box for any future changes.

Schematics & drawings

Here is the reference schematic for the PSU and button Shield of the switchmote:

And the dimensional drawings of the PCBs:

John's review

John from John’s DIY Playground review’s the Switchmote (R2) 2x10A, covers the assembly steps, configuration, programming and interfacing to his gateway automation interface:

Reference Overview (old R1)

Reference Assembly (1x5A)

This page is kept for reference and shows the assembly steps for the original single 5A relay SwitchMote.

Step 1 – Solder TVS diode (the only SMD component)
Always solder from small to large components. Start with the SMD diode. The TVS zener diode ensures the output will never spike above 12V, in case there are any transients. This is to protect the low voltage side of SwitchMote. It is polarized so make sure you orient it correctly, see photos. The top has a line which should align with the line on the silkscreen (indicates cathode, may also be marked with silver marker dot). Use tweezers to hold it while you solder 1 side, then solder other side. If you are not SURE how to do this, it’s better to leave it unsoldered than to solder it incorrectly, the circuit will still work just fine without it.

Step 2 – Continue with PSU components soldering
Solder the 1.5K resistors, transistor, power LED, diode and capacitor. Mind the orientation on the diode, green LED, transistor and capacitor! Also solder the input diodes (polarized, note orientation!), and the fuse and varistor (non polarized).

Step 3 – Solder Moteino headers, power supply, relay, terminal
The Moteino headers are the next larger sized components so break apart the headers as illustrated, then solder to Moteino and then use Moteino as guide to hold in place the female headers to the PSU. Solder everything as shown. Then move on to the terminal, the PSU (largest component) and relay. Use a rubber band to hold everything flat to the PCB while soldering. You may then test the SwitchMote PSU by itself by powering from mains, but use a polarized power cord – one that goes in a power outlet only 1 way – test with continuity meter and mark Hot and Neutral wires. The neutral wire should be connected to the “N” terminal on the SwitchMote. The hot wire should be connected to either “S1” or “S2”. Also, you may solder the input mains wiring directly to the PCB (and skip soldering the terminal, stranded wiring recommended), then you connect those wires to the electric box using wire nuts. Upon plugging into mains outlet the “PWR” LED should come ON. You may use shrink tubing on the input diode and fuse if you want extra isolation on those components.

Step 4 – Solder the SwitchMote Shield
Insert the resistors, LEDs (with spacers), buttons (with caps installed) and optional RESET switch. The Switch is wired directly to the Moteino RST pin and can be used to reset the SwitchMote, but in general you should not have a need for it. At the moment of writing a hole is not made in the front cover to access the switch, you may do so by using a fine drill bit and make a small pin hole in the acrylic plate where the switch will reside. Note the switch is an SMD component, but bend the leads to adapt it to the PCB through holes. Then align the buttons and LEDs with the front cover, use small clamps to hold everything tight and then solder everything on the other side. Mind the LED polarity as illustrated, then trim all the leads as flat and neat as possible before proceeding:

Step 5 – Mate the SwitchMote PSU with the Shield
There are 4 male headers you broke apart in a previous step. These will mate the two PCBs. The plastic tabs on the headers provide spacing between the Shield and the PSU. You should check for clearance and any improperly trimmed leads before you solder the two together. Once soldered, trim the excess headers on the longer side.

Step 6 – Attach acrylic covers
Reset switch –
 If you need to access the reset switch you may drill a fine hole in the front cover for it. The front cover can be attached with hot glue. Use the M6 screws and nylon spacers to attach back cover. The Moteino FTDI header should protrude through the back cover slot for easy access. You may wrap electrical tape around the screw spacers to add more isolation.

Step 7 – Programming test
Use the provided 1×6 double length male header to mate with an FTDI Adapter. Make sure the FTDI adapter is connected correctly to the Moteino (components side same on both PCBs). Upon connecting the FTDI adapter to your computer the “PWR” LED on the PSU should turn ON indicating power to the whole unit. The Moteino LED might also flash for a little while as the FTDI adapter is initialized. Load a blinky sketch and change the blink pin to D9, then load it to the Moteino. The Moteino should now blink the LED. This all means that the PSU and Moteino are in working order, congratulations on the soldering job!

Moteinos are tested for upload/wireless functionality before they are shipped. If however for some reason (faulty soldering or some short somewhere) the LEDs don’t light up as described something is wrong and you should not use that SwitchMote assembly.

Actual programming and sample code are are provided in the dedicated section below, also see this blog post.