SwitchMote R2 coming soon

UPDATE: It is now released (release notes). Assembly & guide is here. Kit available at the shop.


You asked and I’ve listened.
SwitchMote R2 is coming soon as a 100% kit, and should address most safety concerns and shortcomings of R1. I gave up the previous non-isolated design because of different considerations. The switching regulator was not able to work reliably beyond 185V from a half wave rectified input. Then lots of people talked about isolation and supporting loads higher than the 100W on R1. Well I came up with a design that is only slightly bulkier, and is fully isolated (3kV) through a UL certified PSU that supplies 5V @ 400mA for the electronics, uses a very compact coil relay with up to 5A @ 250V load. The design is also much more balanced and I’m happy with the result, the back cover plate uses 4 mounting spacers+screws, allows programming through the FTDI female connector. You can solder your wires directly to the PCB if you are required or you can use the traditional screw terminal. And lots more to talk about but more details will be included in the assembly and usage guide. And yes it works at 240V, doing timed testing right now:

The non-isolation part was of concern because of liability and because I am not a huge company to back it up. To prove my point, look at the tear-down photos of this IRIS switch, it uses a non-isolated design, will you buy it? Continue reading

SwitchMote source code released!

The source code for SwitchMote is finally “done”. As always, consider this a beta release at best, you should always check the github repository for any updates. There are 2 parts to configuring and programming a SwitchMote.

SwitchMoteConfig sketch, which needs to be loaded and used once, after assembly and before SwitchMote installation. This sketch is meant to help setup the essential parameters of the Moteino in the SwitchMote such as frequency, node and network IDs, RFM69 type (W or HW), encryption key, description, and some other utilities that may be extended in the future. All these parameters are then stored to EEPROM and will not be dependent on hardcoded values in your sketch.
This is especially useful when you have some nodes with RFM69W Moteinos and some with RFM69HW. It’s hard to keep track of all the transceivers settings. Additional settings could be added, like power level, bitrate, etc. Keeping the configuration with each node is most efficient in applications like SwitchMote. Setup once and forget!

SwitchMote sketch is the permanent sketch that will get loaded on your SwitchMotes. Note that this sketch will read the EEPROM configuration that was setup with the SwitchMoteConfig sketch mentioned above. This sketch 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, x={0,1,2}, y={0,1}
  • listens for SSR:y tokens, to turn the SSR on or off and the associated button in that same state (reflected by the LEDs)
  • if the button associated with the relay (SSR) is pressed then the SSR 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 loaded with this sketch will work independently and with each other without the need for a network gateway or coordinator. A gateway is by default notified but the feature can be removed if not desired.

Also note that a SwitchMote can work without a relay, in which case only the neutral wire N and a hot wire to either one of S1/S2 is needed. In this case the SwitchMote can just act as a controller for other SwitchMotes or be customized to send other commands to other Moteinos. For instance you could open/close your garage (with GarageMote). The sky is the limit of what you can do.

Further details of the SYNC feature and how to use it are documented on the SYNC mode section of the SwitchMote page. Please refer to that page for any updates and latest information on SwitchMote.

Happy switching & sync-ing!

P.S. This code was released for RFM69 transceivers only because of huge growing interest in these line of transceivers and diminishing interest in RFM12B. You are welcome to port this to a RFM12B implementation as long as you keep within the boundaries of the CC-BY-NC-SA license.

Wireless programming a SwitchMote Moteino

I’m close to being done coding the SwitchMote, I think the code will be released tomorrow. I’ve been testing the code on the SwitchMote here in the lab because I can physically interact with the buttons on it. Needless to say, every time I want to upload the new firmware I cannot disconnect the breaker, unscrew the wall plate and the mains wiring, detach the unit from the wall to be able to upload through FTDI, that would be awful.

Enter wireless, over the air, magic, programming of Moteinos.
I’ll just say that it comes in very handy when your project is in the wall!

I’ll cut this short and let you watch how it happens, too bad the flashing LED is not very visible on the video while upload is in progress:

One note to mention is that I’ve recently patched the wireless programming library to shift frequency up by 8Mhz during upload so the heavy RF traffic would interfere less with the rest of the network packets. Also I added an option to use another LED to be flashed during upload – handy for SwitchMote which has a bunch of LEDs on the front panel which are all on other pins than the default D9. I’m also planning to experiment with increasing the bitrate during the upload, maybe double it, and see how much faster and reliable that is. But that might prove tricky since several other settings depend on that, so all settings have to be changed back to what they were after the upload is complete.

SwitchMote released!

SwitchMote is now finally released and available as a kit in the shop!
Thanks to all the followers for their patience!

There is now a guide page for SwitchMote that includes assembly details, technical specs, and of course relevant disclaimer and warnings. Anyone attempting to buy SwitchMote should read that guide and agree to the terms of purchase before doing so. LowPowerLab assumes no responsibility for how SwitchMote is used.

The guide is a work in progress and more details are added as they become available. Code is not yet published as it needs some final touches, but should be ready in a few days.

SwitchMote has been in development for months and went through several prototype revisions. But it paid off. The current version is stable and more user testing will hopefully lead to turn out even better features and fine tune the future revisions.

SwitchMote project update and demo

I put together a quick video to show the progress of SwitchMote and a simple demonstration of how it works and how it can be used in home automation. My goal is to offer a smart wireless light switch controller that allows syncronization with other units independently (without the need of a gateway/coordinator) to create light scenes, and increase the usability of a regular light switch.

Continue reading

SwitchMote – one step closer to reality!

Just got another batch of SwitchMote and SwitchMote Shield PCBs from OSHPark the other day and I put one together for a test run. In the meantime Kris K has suggested I try another type of cover for SwitchMote. I think his idea was great and today I lasered a few of these covers that are meant to fit in the cutout of a regular rectangular light switch and they turned out very nice. This way people could replace the light switch and keep the original cover, or upgrade to a rectangular cutout cover (HomeDepot has all sorts of light switch covers, even paintable if you’d like to blend them with the wall color). The acrylic is also available in different colors from different sources but for now I’ll go with the usual white I’ve been using before.

The button caps come in different colors so I got a few samples to try out. I think blue, red, yellow and white should cover most needs. The green I found was pretty washed out, didn’t really like it, but I’ll keep looking. Here are a few build photos, and more in my flickr SwitchMote set:

More people started asking when this will be available. I’m already producing custom versions of this and I’m trying to get as much testing done as I can. It is mains power stuff so I’m taking this seriously. This 3rd prototype of SwitchMote includes a varistor and trace fuses for added safety against transients and overloads. I need to develop the firmware stack for this and think of how I want SwitchMotes to interact with each other. The SwitchMotes will need to be wirelessly re-programmable when the need arises so users would not have to disconnect it from the wall when they want to update it. But I want SwitchMote to be pretty autonomous. I will install and try a few on my own, planning on replacing some 3 way switches and some outside lights I’d like to turn ON/OFF from the master bedroom. Fingers x-ed. But so far so good, all the buttons work, the LEDs glow nicely in the dark and are very visible even from a distance, and mechanically the unit is pretty much where I want it to be. This setup should fit easily in any standard switch box.

Will follow up with details on progress, stay tuned!

Wishing a very Happy Holidays Merry Christmas and a Happy 2014 to everyone reading this blog!

Switching mains/lights with Moteino

Here’s a peek at another project I’ve been working on lately, SwitchMote. It’s a compact shield for Moteino that has a mains switching power supply and a solid state relay to drive a mains load. I’ve designed this to work for lights. The idea is to replace a single regular light switch with this so that I could control lights from the home-automation controller, while allowing it to be operated manually as well. An LED indicates the status of the light/load (LED on when light off).

Continue reading