Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ESP8266 Wireless Light Switch - UK Mains - Schematic Review and Suggestions

Status
Not open for further replies.

Tenatious

Newbie level 3
Newbie level 3
Joined
Sep 21, 2018
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
31
I'm looking at making my UK light switches "Smart" and controllable via Wi-Fi and have come up with the following and wanted some advice on what I have so far: namely, will it work as I think it will and secondly is it safe the way I have gone about doing it or are there any other suggestions people have to making it even safer, don't want to get a nasty shock!

The idea is to keep my regular light switch as they are expensive stainless steel plated switches and I don't want to replace them with tacky Wi-Fi switches like the LightWave RF or Sonos T1 and then use this light switch as an input in to an ESP8266 GPIO. This way the light can be controlled both by the physical switch or via Wi-Fi and won't cause any issues should the Wi-Fi decide to die. When it senses a change in the GPIO the program will power an optocoupler which will in turn power a triac causing the light to turn on.

Standard switch is connected as in the schematic. Negating the pull up resistor required as the GPIO pin is set to 'INPUT-PULLUP' and so will just notice a change from either 3.3v to GND when the switch is used.

I want to make use of the mains 240V powering both the light and the ESP8266. I have a neutral wire in my sockets unlike most of the UK. To achieve the mains powering the ESP8266 I have opted for a HLK-PM03 240V - 3.3V supply.

Let me know your thoughts please :)

Screen Shot 2018-09-21 at 09.01.21.png
 

What is R1 for? I don't understand the conections to SW2, you would be better of using a mains opto triac.
 

What is R1 for? I don't understand the conections to SW2, you would be better of using a mains opto triac.

R1 was from a recommendation from this website: https://skippy.org.uk/quick-look-at-the-hlk-pm01/

As for the SW2 I was just trying to show the fact I was using a normal UK light switch that has a COM,L1,L2 connector as the switch so that when it is toggled in one direction it is 3.3V and in the other direction GND and the GPIO will notice the difference and then initiate the OUTPUT on the other GPIO pin.
 

R1 is a varistor to help protect against voltage spikes but the symbol is wrong on the schematic.

It should work, I have something similar beside me right now using an ESP32 receiving from my mobile phone web browser.
Be careful not to screen the antenna too much by the steel faceplate or the range might be very small.

Brian.
 

R1 is a varistor to help protect against voltage spikes but the symbol is wrong on the schematic.

It should work, I have something similar beside me right now using an ESP32 receiving from my mobile phone web browser.
Be careful not to screen the antenna too much by the steel faceplate or the range might be very small.

Brian.

Not sure how the symbol ended up wrong! Just used the part number from Farnell's in the schematic program and that's what it gave me.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top