Motion Detection Lights
Intro: Motion Detection Lights
i wanted to make cheap motion sensor lights that work from a standard 220V socket. This is the best that I could achieve, for now)
STEP 1: What Will You Need
1. A thin wooden board.you can also use any plastic as long as it's minimum conductive material
2. Double sided adhesive tape to fixate your build on the board
3. A tuperware of symmetrical proportion to the wooden board. I just used what I have lying around. You can always use whatever you like
4. FR4 fiber board pcb which you'll have to saw into the size that suits you, separate it into two areas by grinding away a line in the middle and then solder tin onto its surface
5. 12V 5V fully isolated switching power supply AC-DC module 220V to 12&5 V. Please be careful when handling 220V. You have to solder a plug with 2 wire cord to that module (plugs differs from one country to another)
6. Breadboard, jumper wires, PIR sensor and arduino nano
7. 3 LED rigid (flexible) strip lights
8. Electrical wires ( I used the wires that came with the LED lights)
STEP 2: Connection
First you solder the plug cord to the AC-DC module. With a voltmeter make sure the positive and ground are detected on the module and then soldered onto the already divided and covered with tin FR4 fiber boards. Once you have all the voltages assigned, you start soldering the modules accordingly. The arduino nano (power through VIN and GND), the relay and PIR sensor are all powered from the 5 V source transmitted into the breadboard whereas the LED are soldered onto the 12 V source with the positive coming from the relay (see diagram)
STEP 3: The Code Can Be Downloaded From Arduino.cc. You Just Have to Modify the Pin Numbers
http://playground.arduino.cc/Code/PIRsense
STEP 4: Fully Connected to 220V
after you have everything wired up and soldered. You make a cutout from the tuperware and screw into the piece of wood that you have your project attached to by double sided adhesive tapes and with plastic bolts and nuts for the modules after drilling holes accordingly. You also have to make small cutouts for the wires of the LED and PIR sensor on the side. After doing so, you can put back the lockable lid of the tuperware and you're ready to go
STEP 5: Installed in the Bathroom
luckily I have an installed power outlet in the ceiling which made connecting it really easy by just plugging in the plug. Then I passed the wires through the ceiling tiles and just fixated the lights according to my desire. You can also drill holes into the tiles but I'm renting :p
Hope you make it. Really easy and cheap. You can also use an attiny 85 for such a project instead of arduino nano.
STEP 6: Version 2.0
I removed the arduino, connected the pir sensor signal to that of the 5 V relay. Fixated the main wire with zip straps and covered the soldered 220v wires with plasti dip. I was able to significantly reduce the size of the project. Too bad I don't have a 3D printer,yet;)
40 Comments
NikhilK16 7 years ago
souhadl 7 years ago
Of course. that's what they are intended for
NikhilK16 7 years ago
JodyF1 7 years ago
You know, it's quite funny.... this literally gave me nightmares last night. Someone was chasing me with the IR detector coming from this device, I was running for my life so not to get electrocuted. And I think it was @SauHadl :-p
JohnC430 7 years ago
check ebay and understand what a PIR detector is. too bad about your nightmares
JodyF1 7 years ago
ZeeshanZulfiqar 7 years ago
by the way what will happen if it reach up to 230v?
souhadl 7 years ago
The manufacturer claims that the ac-dc module can handle
AC85 ~ 265V wide voltage input.
ZeeshanZulfiqar 7 years ago
so what is jodyf1 talking about pir sensor reaching 230 volts..??
JohnC430 7 years ago
he means that if there is a short from 230V to the pir sensor. the power supply is a commercial product with Isolation and beyond that there is only low voltage so I don't see how that can happen.
souhadl 7 years ago
souhadl 7 years ago
Too bad about those nightmares but I assure you I'm no freddy kruger. While studying for 13 years to become a surgeon and acquire my Ph.D in medicine, I didn't have time to study for 2 years to become an electrician and limited my knowledge to YouTube videos and literature so please excuse my unprofessional circuit.
JohnC430 7 years ago
oh by the way now taking JodyF's "advice". I think it is time for you to go back to college and get your engineering degree. I am an electrical engineer and also am a certified electrician and have designed and built dozens of high power and high voltage electrical and power electronics projects. I understand what he is talking about. he is right about safety, however since the project is already in a safe place and out of reach, there is no need to off the deep end.
souhadl 7 years ago
JohnC430 7 years ago
i was obviously just kidding about going back to school.
JodyF1 7 years ago
I must commend you on your openness about the whole thing. What I worry about is people who ignore advice, believing they know everything. And the last thing this site needs is people making kids think something is safe by saying it's safe even when professionals are saying it's not. I know this isn't a kids' project, but plenty of teenagers give these things a shot, and having just one or two adults saying it's safe is enough to make them think it'll be fine. Kids don't know the difference between good and bad advice.
souhadl 7 years ago
W0JT 7 years ago
oldmanbreadboard 7 years ago
Lots of comments about the dangers of line voltage and they should never be ignored. The safest way to "play and learn" is to get a wall wart step down transformer that isolates the line voltage from the user. Duh, a battery is actually the safest way, so we can all speak too fast. The major point to take from all these comments is DO NOT MESS WITH LINE VOLTAGE. You will be exposing yourself to all the voltage and current supplied to your house, at least the branch circuit you are plugged into, and that will kill you in a heartbeat by stopping your heartbeat, and frying you. I lost a neighbor who was fixing his own well pump and accidentally touched a 220 volt main, he died instantly. Electronics is a great hobby, but please be safe. When I was in training to be an Air Conditioning mechanic, I was taught to keep one hand in my pocket, if the unit was powered up. That way the current would not have a path through your arms (and through your heart). It really is that dangerous. Nuff said, I will go back to sleep.
ZeeshanZulfiqar 7 years ago
yes!! jodyf1 only mentions his negative points. please do appreciate ones effort and JUST suggest the blanks one has left.. every one know in which project you had to play with. even i made a project that could be used for severe spy purposes. after all, authors share their ideas. authors should mention precautions but again the person copying would be responsible not the author if he uses it in wrong way or do any illegal act. many projects include lasers which can prove to do a lot damage if directed towards eyes but children use it to play... it does not goes on the inventor if anyone is hurt by even the laser..