Light and PIR combo
This is an IoT ceiling light controller which includes an HC-SR501 PIR motion sensor. It is built around a Wemos D1 mini (ESP8266 breakout board), which controls a homemade TRIAC breakout board. TRIACs provide the advantage of switching devices on and off silently, as opposed to a mechanical relay.
The system is powered from the same AC lines as the lights, thanks to an embedded AC-DC converter. This removes the need for an additional power supply.
Due to the configuration of my lights, I had no access to wires that I could cut and feed into the system so I had to hack LED libulbs so as to get the required lines out.
Although Lights triggered by a motion sensor can be bought for cheap, their motion sensor is entirely deidcated to turning the light on and off. Thus, they cannot be used for other applications such as intrusion detctors. With this project, the motion sensor output can not only be used to turn the light on or off but also trigger any action available in my home automation system.
- Wemos D1 mini
- HC-SR501 PIR motion sensor
- TRIAC breakout board
- AC-DC converter
TRIAC breakout board
Code available on GitHub.