Introduction: Exterior Motion Light Kit

This project requires understanding of how to read a circuit schematic. The Ardweeny has its own included
instructions and will need to be assembled first before it is installed onto the protoboard. The circuit board and relay will be housed in an ABS plastic enclosure, so the presentation on the protoboard is not important. 10 feet of stranded hook-up wire is included for making short connections from the relay to the board or supply to relay, etc. The color of the wire is not indicative of the polarity or signal transmitted or supplied.

Step 1: What You'll Need

You Will Need
Soldering iron and solder, Wire strippers and Angle cutters

Kit Includes:

1 Photocell, 100mW, 3k-200k Ω

1 LED cable interconnect

1 Power Supply, dual output, 12V/5V

1 Header, vertical, 1 row, 10 position

1 Case, ABS plastic, 3.125" x 2" x 0.875"

1 Prototype board

1 PIR motion sensor

1 Ardweeny MCU kit

1 Relay module, Arduino-compatible

10 1/4 watt resistors, 10k Ω

1 10 watt LED Floodlight, 12VDC

1 Stranded 20AWG hook-up wire, 10'

1 Servo extension cable, 3-wire, 12"

Complete kit is bundled at:

Step 2: Ardweeny Assembly and Mounting

Assemble the Ardweeny and mount the Ardweeny on the protoboard near one side of the board. Be sure none of the pins are in the common bussed strips of the protoboard if there are any. For the sensor headers, you will need to break the single row header into the appropriate pin count. You will need two 3-position headers (one for the relay and the other for the PIR sensor) and one 2-position header, for connecting the photocell cable.

See the schematic for the Ardweeny and barebones Arduino circuit. The schematic shows a power good LED that is not included and it is not critical to the circuit. It is just included in the schematic for reference and testing if you need to troubleshoot.

You will need to make wire or solder jumper connections from the Ardweeny to the pin headers for the sensors. You will also need a location on the board for the incoming 5V power and ground connections.

Step 3: Electronics Enclosure

The enclosure is to house the circuit board and the relay module. A 3'8" hole should be sufficient to
pass the four stranded wire connections, the two sensor cables, and the main power cable for the floodlight. However you install the components, make sure you have easy access to the programming header in case you want to modify the code. Permanently fixing the protoboard inside isn't really necessary, and not doing so leaves the mounting hole of the protoboard free to be used as a strain relief for the incoming power and ground wires.

Step 4: Relay and Photocell

The photocell is a board level component which is why the LED connector cable is supplied. Trim the leads of
the photocell so when installed in the LED holder cable, it sits flush. The other end of the connector cable will connect to the 2-position header in the circuit board. Below is the wiring diagram for hooking up a light to the relay. The wires of the floodlight should already be stripped and tinned. You may shorten the main cable if desired. Please be extremely careful when working with 120 VAC. Make sure appliances and power supplies are disconnected when tinkering with power lines.

The DFRobot is helpful for making relay connections:

Step 5: Final Installation

The floodlight is already in a waterproof, metal-bracketed enclosure and can be installed as is. You may opt
for a more custom solution by retrofitting an existing light housing or by making your own. At the bottom of the page is a template for a plywood cover. The cover allows the light to sit nearly flush and also secures the sensors and allows them to "see". The dimensions on the template are approximate and should be verified before making cuts or holes. The floodlight should be test fitted so you can mark the position of the screw holes and have proper alignment. Some chiseling may be necessary to allow the PIR sensor to sit more securely and allow the done of the sensor to protrude from the plywood surface.

Step 6: Programming

Your will need a USB to Serial TTL programmer to upload code to the Ardweeny/Arduino. There is a zip
archive containing the Arduino code. One bit is for testing and verifying the sensors. The other is finished code for a functioning light. Using the test code is necessary for determining what level of darkness to react to. The default in the final code is "100", but yours may need some tweaking depending on your environment. The code is commented to assist with making changes to variables such as delay time and how long the light stays on when triggered.

Step 7: Code

/* The sample code was created by Ryan Winters for an Exterior Light project
for Jameco Electronics. Use this code to test the function of the sensors and also to record values reported by the sensors using the Serial Monitor.


Relay signal should be connected to digital pin 3 (ATmega328 physical pin 5) PIR signal wire should be connected to digital pin 2 (ATmega328 physical pin 4) Photocell signal should be connected to analog input 0 (ATmega328 physical pin 23) Status LED should be connected to digital pin 13 (ATmega328 physical pin 19) Status LED is already built into the Ardweeny (still digital pin 13, physical pin 19) ***********************************************************************/