Completing a circuit with battery switch

One that dropped $360 on non-smart schlage push-button locks a year before beginning to get into home automation and lives alone with no pets or reasons for others to need to come in with great frequency.

If you wanna buy em for me, I'll be happy to put them in. But only if they're zigbee. :wink: hehe

Before buying my place I had always rented from large management companies. So, if i ever got locked out I had an emergency number to call. I never, in 14 years of renting lost my keys or got locked out of the building. I bought my condo, moved in, within 4 months I locked myself out and had to call a locksmith. So, that's when I put in my non-smart push buttons. I know there weren't as many smart options back in 2012 either.

1 Like

Understood. It is cool to have your door unlock as you approach. :grin: but I do not buy door locks for people on the internet, :stuck_out_tongue_winking_eye:

Anyway, I'm mildly interested in the concept. Once operating, it's apparently possible to have a solid state relay that draws 100mW or less, so if I calculated right that wouldn't be a significant drain on 4 average AA alkaline batteries to hold the state. Too busy and too many irons the smart home fire to pursue this other branch right now though. Maybe later.

Yeah...and at 5v that would be 20 mA which in battery devices is HUGE! Battery operated circuits usually go down to like 10 uA when they are "asleep".

To give you an idea, a device consuming 20mA with a 5000mAh battery would only last 8 days.

Do you want to put 4 new AA's in your switch every week? That's like $60 in batteries a year. And you have to change them every week.

I’ve got a MicroBot I’ve never found a use for, so it’s a bit crude but I’m thinking I’ll just wire in a switch and use the MicroBot to turn it on off controlled through a raspberry pi and link in to hubitat that way ... all in a waterproof project box ...

Did I calculate wrong? If the relay draws 100mW, not mA, then divided by 1000 is .1 W. Divide that by 6v and you get roughly .017 Amps.

Anyway, $40, Z-Wave, not Zigbee. Attach the cheapest toggle light switch money can buy and you’ve got a simple battery Wireless power switch for low voltage applications. Not the most efficient, but a Zigbee version with a more appropriate switch internally could serve just fine for someone that really needs such an application. This Z-Wave Plus version operates on two AA batteries, so it could definitely be done with a tiny mechanical relay that flips state.

Yeah, with IFTTT, Hue, Alexa and Webhooks, that's a simple solution. Old phones could also serve the purpose, although it sounds like they might require a cloud subscription

I just bought a warehouse deal Switchmate toggle to play around with. Might be junk. Many say it won't stay paired, but they're perhaps trying to use their primary phones. I've got old iPhones sitting around that could act as dedicated hubs for it, and then perhaps I could use Google Assistant Relay to trigger it if their method isn't as crappy anymore as it is in this video.

I'm not expecting any of these to be fast, or work at great distances, just to work after a reasonable time. There was a reviewer on Amazon that said for Alexa routines, you just send the on or off commands twice since the Switchmate sleeps after a while to conserve battery. So first will wake it, second will do the deed. They said it's just a few seconds delay. Sounds like you need their outlet or their previously available Zip bridge to connect to Alexa, which is a bummer with our newly added abilities to trigger Alexa routines, but I have Google Assistant Relay going too.

$16 CAD to play around is fine by me, and if it's junk, Amazon returns are easy.

[Update] I've now complete one device conversion to Zigbee and have written instructions for how to build one yourself. The Switchmate works, but it's cloud dependent if you are using it with their outlet that also acts as a bridge, and if you're controlling the Switchmate via bluetooth directly, then your phone has to be in range of the device and the company has to be in business :wink: Their app probably won't survive iOS and Android updates in the future if they go under and there's no one to update their app. It's happened to me with a few "smart" devices over that last few years. This project lets you take the Switchmate completely local and control it via Zigbee that won't interfere with your Zigbee mesh if you use the same Sengle Zigbee module I used.

1 Like

Actually, watts devided by voltage equals amps. So, 100 mW divided by 5v = .....20 mA. You realize that 0.017 amps is 17 microamps. I think my math is sound.

And i just confirmed this with an online calculation.

image

20 mA....for 0.017.

Interesting walkthrough on converting a Switchmate to use an ESP8266. Yes, poor battery life, but interesting just the same.

https://www.youtube.com/watch?v=M67VXkJNeLQ

That's using a raw ESP board though....not an ESP dev board like a Wemos D1 Mini. we're talking about something like this:

You'd need something like that to be able to fit in the switchmate. And i'm telling you, the voltage off that battery is not going to be even enough to power the ESP for long. The batter is too inconsistent to power the esp chip without a power regulator like you get on an ESP dev board like a D1 mini.

And when you say bad battery life....the ESP board uses like 170mA while the wifi radio is active and like 100 mA when it's not. So, like we talked about yesterday, with this you're talking 1.7 days of battery life. Totally impractical as a real solution.

He posted an input at the bottom...

"Update:
Battery life is horrible. It is lasting for less than one week. Next step to make it last for one month."

I would say even a month is unacceptable, IMHO. Wonder if he ever got it?

Doubt it. It would be nice if there was an affordable Zigbee option. Seems it just has not been done, but there isn't a technical reason.

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