Monday 22 May 2017

safety - Using 240v mains on/off as input to microcontroller


I have a light switch that switches 240v (UK) mains. Instead of using that to directly control a light, I want to use it as an input to a controller board so I can also automate the lighting. (It's low voltage LED lighting driven via a transformer although that doesn't really affect my question).


My question is what is the best and safe way to use switched 240v mains power as an input to a low voltage microcontroller circuit? It would be best to use the existing switch to switch a low voltage control signal but I can't change the wiring at at this time so the only input I have to my control is a switched 240v mains power line.


I have other power available where the controller is so I'm not intending to power this via the original light power, I just want to see if I can use it as a control line without extensive rewiring work for now.




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...