Completing a circuit with battery switch

This may be of interest to someone browsing this thread at some point in time. Here's a simple mechanical latching relay you can build that will sip just 6 µA

1 Like

That's not the part that eats power. It's the radio. In order to receive commands, the radio has to remain on. Otherwise it cannot receive commands. Your zigbee sensors are so efficient when it comes to power because they only power on their radios to send a message. They don't have to maintain a constant link.

Might be of interest. Should easily cover the current handling requirements of most battery devices. Only 2µA standby draw.

2 Likes

@SmartHomePrimer. This technique is worth to be investigate for DC load switching. This is in fact an area where you can simplify the problem. The flip flop is less convenient to control with GPIO. I suppose you can loose count. If the switching is limited for DC load, we can consider using a mostfet like

This mosfet has 100 nA leakage current. This is the part that your battery need to power. Keep in mind there is current consumption on the load side. However, they are sourced from different power. It does not count on the battery side of circuitry.

Please note that If you are dealing with AC load, this is different story. A lot of people still like to use mechanical switch for higher voltage and current load.

1 Like

Received the Switchmate and have been playing. This thing is really hackable. It's easy to open, and technically you can just use the limit switches to close low voltage circuits. There are two, so you can have two states for each limit switch. The switches are single-pole/double-throw, so you just use the common and the unused terminal on the limit switch and you have a low voltage dry contact.

I'm not having luck connecting their Google Assistant app without the bridge. Spent some time with Google support on it and they couldn't make it work. Maybe Switchmate support could help, but that setup is janky anyway. Think I'll just pickup their outlet which servers as a BLE to WiFi bridge. Then it's possible to just add it to Google Home via Home Control or Alexa. That should be easier, but we'll see.

If you take the board out of the device, it can still work with a latching relay though. It has the limit switches to stop precisely, but if you remove them, it still works. They cleverly designed the circuit so that if the limit switches fail, the device cuts off power to the motor after a second when the linear gear reaches the end. That may be based on load of the motor, so it might fail if a relay is substituted. I would have to test. At the motor terminals, I read 2.5v under load in one direction and -2.5v under load in the other to reverse the motor.

There's no bi-directional communication, so the limit switches don't mean anything to open and close states, There is no feedback. It's a flip-flop, so the app, whether on the phone or Google Assistant, has to keep track of the state. Still, for the use case, it's good enough. Dirt cheap too.

Much better prices in the US. I saw a kit with two of the paddle type Switchmates and the outlet for $25 USD. Here in Canada, $40 CAD (approx $31 US) is the least expensive price for the Outlet only that I can find right now. However, I did order two additional Switchmates in a kit for just $12.79 CAD. Going to play with adding them to some battery devices with a latching relay and see how it works out.

1 Like

Or you could just use a low-voltage 5v solution and run wiring for that. 5v can be run in-ground without a conduit. You just have to buy the proper wire. That seems a lot easier and more reliable than trying to hack a switchmate.
If you're unfamiliar, this is the wire I'm talking about. Since it can just be directly buried in the ground, it makes it fairly simple to run power to just about anywhere close to your house. Combine that with a waterproof enclosure and a Hubduino setup and you're in business.

http://www.homedepot.com/p/Southwire-50-ft-16-2-Black-Stranded-CU-Low-Voltage-Landscape-Lighting-Wire-55213142/202316264

1 Like

If you don't need absolute reliability, hacking the Switchmate is dead easy. Solder two wires and you're done. Isolated low-voltage contact for battery devices. Then you still have another contact you can close when the switch reverses. As long as the Alexa or Google Home portion works correctly. I'll know that soon enough.

I do know exactly what you're talking about, and for me, based solely on the original request of the post, that is the practical way to do it, and how I would as well if I needed to. I decided against doing anything to my own faucet timer, because I just don't need it. It's not an arid climate I live in. Just playing around with ideas for battery switches that can be controlled from HE.

Anyone could maybe use the Switchmate board in battery lights, or a battery faucet valve. It would be a cheap way to do an Alexa activated faucet. Maybe a battery powered roller shade if the IKEA shades that are coming out don't meet your needs. Not the fastest, but after sleeping for an hour, I started up the app on my phone and it responded in roughly half a second, and this is a first gen device. Not to bad for $12 USD.

This sound very promising! ... could you send some pics of the opened up device ?

Cheers

1 Like

You can see it here.

I’ll post pictures of both versions once I receive the paddle style today.

FYI looks like there is a homebridge plugin for it..

I’m going to order one and see what can be done too.. I’m in the UK but the US amazon store will ship..

I also came across a similar device too: https://www.amazon.co.uk/SwitchBot-Smart-Switch-Button-Pusher/dp/B07B7NXV4R/ref=pd_sbs_60_1/261-5787361-0179205?_encoding=UTF8&pd_rd_i=B07B7NXV4R&pd_rd_r=09637d0b-c92a-44b9-8cb3-99e9c5328088&pd_rd_w=kenbI&pd_rd_wg=jKKIv&pf_rd_p=15756fbb-4ceb-4379-9d2c-7af36daab01e&pf_rd_r=PBE6MVCDA6MZCBRX7T8Z&psc=1&refRID=PBE6MVCDA6MZCBRX7T8Z

Great, If you can provide some hints on how I would wire up and where I can solder the wires to that would be great! I’ll have a play with this too..

1 Like

Will post soon. Just picked up two outlet and switch kits for a song at Lowes.

1 Like

Couldn't a Zigbee lock module work. They can be found inexpensively and could be attached to a switch.

1 Like

Yes, and would be bi-directional communications too. If you can get a reliable one that's inexpensive, then that would be better suited to conditions where the action MUST happen, and the state must be known at all times.

I picked one up on Amazon used for $25 with Prime shipping.

1 Like

What was the model?

It was one of the Amazon Key Edition locks. Kwikset convert if I remember. You need to be lucky to grab them.

Here is what I got. More now but if you can take your time, the prices do change.

2 Likes

You got one of those for only $25?!? They are normally like $150. Even used they go for $75.

Have done some fairly exhaustive testing with both Google Home and Alexa, but not long term obviously. In the end, I've concluded that while this is a very viable, low cost solution for non-critical applications, it is not without its issues. With Alexa it's a non-starter unfortunately, but reliable (with one exception) on Google Home. YMMV.

Cost for me actually turned out to be very low. I was in Lowes and they had both the toggle type and paddle type kits on clearance for just under $15 CAD each, so I picked up two of them.

Here's the back of the two types. There's a difference on the back, but on the inside they're almost identical. The paddle type is slightly slower because of the longer travel distance of the linear gear required.

Removal is simple. Four screws and the front cover/button pops off. One of the screws is concealed under the anti-slip pads. Once all the screws are loosened, I just remove one of them completely and push a small screw driver in the hole. The front pops right off.


Here's the inside of the paddle type, One of the limit switches is hidden beneath the circuit board. They are just press-fit into the plastic and pry up easily. There are also two Neodymium magnets inside so if you want to combine this board with the latching relay build posted above, you’re set in that regard.

The limit switches provide nice contacts for low voltage circuits. You need to test to see which wire is the actual common on each limit switch. In a circuit where you were actually going to use both the NO and NC terminals of the switch, you would always make sure the ground wire was soldered to the Common terminal. However, the assemblers in the factory would have been instructed to take any of those two wires and solder them to either the NO or Common terminals. Which one wouldn't matter for this application, as long as it wasn't the NC terminal. For our application, it does matter. So if I'm using both switches to close a contact, I would move the ground wire of the limit switch on the right of this Switchmate so it is on the actual common terminal. That will prevent the circuit I'm closing from receiving any voltage (a true dry contact).

Soldering of our wires for closing (or opening) the contact will be to the top and bottom terminals of the switch (sharing the top terminal with the ground wire from the Switchmate.

Performance

I tested the distance from the bridge (Outlet) to a Switchmate switch and had no problem 40 feet away, semi-clear line of site (some obstructions from the building, window, and brick). At 40 feet non-line of sight, it didn't work, but from 30 feet away, it worked even when the Switchmate switch was behind double-brick.

Integration

This part is a bit disappointing with Alexa. As long as you are using the Outlet for bridging the BLE connection to WiFi, the Alexa option will appear in the app. Connection is all done by code. No Switchmate cloud account required, which is a refreshing change from the norm. The connection to Alexa works, and the devices show up as an outlet and a switch, but the results are disappointing when you try to connect them to HE in an Alexa routine. The device turns ON, but the status turns OFF for a second, then back on. This is enough to really mess things up. The device state also seems to bounce on Alexa. I had a frequent problem, where even if I made two separate momentary Virtual Motion Sensors as Switch (one for ON and one for OFF), I still would get the device bouncing states. Turn it on and it would go ON, but then the device would turn off by itself roughly 30 seconds later. Same would happen with ON. Eventually, if I issued too many of one ON or OFF command, the device would get out of sync.

On Google Home, this did not happen, except for OFF. The issue was solved by turning the device off, then roughly 30 seconds later, send the command for OFF again. After the second time sending the OFF command, it didn't turn back on again. This only happened with Google Home in the OFF direction. Control of the switch from HE via Google Home was done with Google Assistant Relay.

Warning: Do not have the Alexa skill enabled at the same time as the Google Home integration, or you will get the unstable fluctuation between ON and OFF.

Conclusion:

Perfect solution? Absolutely not. There's no state feedback, but you could add one by wiring the read switch of a contact sensor to one of the NC and Common terminals of one of the limit switches, but that makes the whole thing more expensive unless you got some contact sensors for dirt cheap or free.

Another issue is that occasional bounce, where you've had Google Assistant Relay turn the device off, and around 30 seconds later, it suddenly turns itself back on. Easily solved I found by just issuing a second OFF command which could easily be built into a rule. Still, this should only be used for applications where that would not cause an issue, or that absolute state need not always be correct, lest a major problem would result when no external sensor was used to relay the current state back to HE.

Other than that, I'm actually pretty surprised at how versatile these are, and I already have some ideas of places I can use them where if the device state got out of sync, it wouldn't be the end of the world for me. The price was definitely right and the effort very minimal.

3 Likes

Wow! $310 CAD regularly. I know what you mean though, my YRD256 is regularly around $285 CAD, and I got mine on a warehouse deal for $175. Perfect condition.