PIR Sensor Controller Switch Stock Room
by Wim3d in Circuits > Arduino
463 Views, 5 Favorites, 0 Comments
PIR Sensor Controller Switch Stock Room

I wanted to automate the light in my stock room. At first I had a door contact sensor to switch on the light when the door opens. However, sometimes I am long in the stock room and when the door slowly closes, the light goes off unintendently.
Therefor I wanted to DIY a PIR controlled switch. At the start of the project I had plans to make it 'smart' and connect it to my home automation, however, during the execution of the project I made it simple since I found no need to make it smart anymore.
I used the components I had in my stock. I wanted the switch to be silent, so I used a solid state relay.
WARNING: this project contains working with mains voltage and this is dangerous since it can cause accidents on personal safety and fire. Only work with mains voltage if you know exactly what you are doing.
Supplies
I did the protyping with an Arduino Nano and made the final product with an Attigny85.
The main components are:
- Attigny85
- Solid state relay 5V Omron G3MB-202P https://nl.aliexpress.com/item/32727602787.html
- Power supply (Hi-Link)
- AM312 mini PIT
Program
The program is quite simple and is published on my Github page.
I programmed everything in Arduino IDE and programmef the Attigny via this instruction: https://www.instructables.com/How-to-Program-an-Attiny85-From-an-Arduino-Uno/
Circuit



The circuit is attached, file is created in EasyEda
The LED is not needed for the working of the switch, I added the LED in parallel to the relay to make an extra visual signal the relay should be on.
I soldered everything on a perf board and removed two rows of copper pads in the high voltage region to prevent a short.
Assembly

Assembly and connect the device to the power supply and the lamp and cover everything.