DIY Project: Outdoor Motion Light |
|
Tweet |
|
|
By Ryan Winters Jameco Product Manager When my managers asked me to replace the security light outside Jameco headquarters, I saw an opportunity beyond the confines of the building courtyard – this would be a great project to share with customers! So I designed a circuit, sourced the components and loaded the kit onto Club Jameco for any customer to view and purchase. My objectives for the outdoor light project posed a few technical challenges. It had to withstand extreme weather variations, only come on at night, and only be triggered by motion. This sounded like a job for Arduino. |
Outdoor Motion Light |
Parts List:
The breadboard prototype was ready for action in less than 10 minutes. As a proof of concept and to keep from having to hook up the power supply and floodlight just yet, I used an LED I had lying around to stand in for the floodlight.
Coding the Arduino was a snap too. Since I only had two conditions to test and both had to be true for the light to turn on, the code used just one IF statement. I used the serial monitor to read the values of the photocell so I could determine the approximate darkness where the light would turn on. In bright conditions, the photocell returned values in the 900 range, but when it was completely covered, it returned values around 100 or less. 100 would be my threshold for ambient light. The PIR sensor only returned high and low, or 1 and 0. Using the serial monitor was useful for seeing how the sensors reacted to conditions and for recording values to set as trigger points in the code.
I actually built the Arduino circuit using the barebones kit, and after showing it to a couple people, one of them asked me why I didn't use the Ardweeny, as it would take up less space. It would also be a lot easier to incorporate into the project rather than soldering a bunch of jumper wires. Since it was already built, I included the schematic using the Ardweeny as well. The same code could be used for both since they both use the ATmega328P with the UNO bootloader. See the breadboard prototype and relay connected below.
Breadboard Prototype |
Connected Relay |
When the Arduino/Ardweeny circuit was complete and the headers were installed, I made a single hole in the plastic enclosure to feed wires through. A 3/8" drill made a perfect-sized hole. The plastic enclosure housed the PCB, the relay, a few wires that connected the light to the relay and a couple wires for the power connection.
I installed the floodlight as is because it already had a mounting bracket attached. I considered retrofitting the existing light enclosure, but the box was ugly and the plastic lens was discolored from years of UV exposure. I decided to make a custom cover out of wood to cover the existing hole in the exterior soffit. I set the power supply and circuit box in the attic space; the wood cover held the light relatively flush and allowed for holes so the sensors could "see". The template I used for the wood can be found at the bottom of the page. Programming code and schematics are also at the bottom of the page for reference.
There is plenty of room to add additional sensor headers if upgrades to the light are desired. One of my co-workers, playing devil's advocate, suggested that someone could fool the light by shining a flashlight at it. To counter, I suggested using a RTC (real time clock) module so the Arduino would know exactly what time it is and when it should go on.
With the exception of soldering the custom Arduino circuit, the project was simple. Using the Ardweeny made for a simpler design and installation. Given the lifetime of the LED floodlight (50,000 hrs), if it is on 24/7, it should last over five years. Thanks to the use of sensors and logic, the light will probably outlast all the other components. The light outside my building might even last until I walk past it for the last time when I finally retire from Jameco!
If you have a project you would like to share or if you would like to earn some cash from your designs, submit your project to Club Jameco.
Click here for project instructions, cover template, programming code and schematics.
Ryan Winters is a Product Manager at Jameco Electronics and is a Bay Area native. He is mostly self-taught and his hobbies include working on cars and computers, fiddling with electronic gadgets, and experimenting with robotics.

Outdoor Motion Light
Breadboard Prototype
Connected Relay