BATTERY POWER FOR A SONOFF SWITCH PLATE OR SIMILAR..

924 views
Skip to first unread message

Phil

unread,
Oct 6, 2017, 11:29:15 AM10/6/17
to SonoffUsers
Hi,

Living in the UK where our light switch boxes are fed with the live in/out wires only and considering installing smart switches which require a live and neutral feed to power them i seem to have hit an impass.

so i was thinking could i buy a few off the shelf items and knock up a rechargeable battery power system.  as when the lights are on there is current flowing through the device off which a battery charging circuit could fed.  leaving a fully charged battery to power the control hardware.    

im thinking of hacking the internal board of the switch to disconnect the dc current used to power the soc and using that instead to power something like a TP5056 lipo charging board, which should maintain a battery at close to 4.2v   then a lm117 ldo could be used to provide the 3.3v (may be one on the pcb already??)  

The only big flaw i can see is if installed in a seldom used room the battery may die after only a few weeks??  

is this a daft idea??, (i have had many of these..) 

all input will be appreciated


  

Cysix

unread,
Jan 14, 2018, 11:56:18 AM1/14/18
to SonoffUsers
Unless you have a neutral/GND you can't pull current to charge a battery either, other than through the the use of something like this which might not give you the amps necessary: https://www.sparkfun.com/products/11005.  If you want to battery operate, you probably should just skip the Sonoff bit and just put an ESP8266 breakout board and a relay on a bread board, then flash the Tasmota software to it.  Not great, but one other possible option would also be to put the Sonoff in the box with the light itself and just hardwire the switch on, then use something like Alexa to voice control it.  BTW Aeotec now has a Z-wave microswitch that supposedly operates without needing a neutral.  It's big time $, but may be the best solution for the UK.  https://aeotec.com/z-wave-light-dimmer-switch

Mike Roberts

unread,
Jan 14, 2018, 5:38:31 PM1/14/18
to SonoffUsers
Phil

(also in UK)  I see two options here.  One is to use the two wires to the switch as permanently live to power the sonoff touch switch and then use a Sonoff basic to switch the light (or whatever) and make the connection via your home automation system.  The switch will send a MQTT message whenever it is switched.  This is the fly-by-wire solution that means you cannot switch your light if your router goes down.

The second option is to keep your existing switch and wire it to the pushbutton on a Sonoff basic and adjust switchmode accordingtly.

I have not implemented either of these but have played with these enough to be pretty sure these options will work.

Please make sure the mains work is done correctly and safely and treat the connections to the basic pushbutton as live as I do not believe the basic would qualify for double isolation to its low voltage circuit.

Mike

roguestreak

unread,
Jan 14, 2018, 8:19:38 PM1/14/18
to SonoffUsers
Pretty sure the TP5056 systems aren't suitable for both charging and supply at the same time, from a recent search for a similar setup for backup power for a raspberry pi it seemed that a proper system ("passthrough" is one term used, likely many others) is exorbitant and not simple.  There has to be something cheap out there, considering it would be at the heart of all modern portable electronics (phones, laptops etc), but I've yet to discover what this cheap option is.

One of the simpler versions I came across was the use of nicads with a resistor-based charge circuit, but couldn't find the info again later and sounded like a good way to kill the batteries pretty quickly.

Phil

unread,
Jan 15, 2018, 7:07:21 PM1/15/18
to SonoffUsers
after attempting to squeeze the components needed into a box behind a switch plate, i gave up, (shallow recesses in the walls) 

thanks for the input rougestreak the tp4056 boards on ebay etc come in a couple of flavours 1 with 4 x solderpads to recharge alone ( 2x input and 2x output to charge) and another with 6x solderpads including 2x to feed a small load.. unless i have misunderstood the boards configuration..    if using a wemos d1 soc board there may be a smd diode that needs removal if used with a tp4056 charger board/lipo battery and expectation to run when charging, something i recall from following the Ispindle brewing gravity sensor project which uses the a tp4056 lipo cell and wemos d1 board along with a few other components.  

The current interim setup is with sonoff basics inline set to turn on with power up so if turned off/isolated by the wall switch they will turn on when reconnected as usual, but while online can also be controlled via wifi.  my next tasmota project will be to load onto a sonoff rfbridge and test with some on-route from china 433 mhz small battery buttons (think amazon dash size with replaceable batteries)  if all works as hoped they can be stuck up next to the usual light switchs etc and used instead, may take a few weeks of getting used to,






Bob S

unread,
Jan 30, 2018, 5:14:22 PM1/30/18
to SonoffUsers
FYI, the BSR X-10 switches are able to draw power while wired in series with an incandescent bulb (they only have two leads).

I have found schematics for this, but I am not savvy enough to decode them.  In any event, it is possible.

Bob
Reply all
Reply to author
Forward
0 new messages