Introduction: DIY Motion Activated Lights - Galileo

Picture of DIY Motion Activated Lights - Galileo

This project uses a passive infrared sensor as a motion sensor to turn on a light bulb.

Step 1: Collect Supplies

Picture of Collect Supplies

Collect a passive infrared (PIR) sensor like shown in the picture. You will also need a Galileo, a screwdriver, a relay, bulb socket and a light bulb. Wires are needed to connect the sensors. The final product is pictured here with all the tools you will need.

BE CAREFUL WORKING WITH HIGH VOLTAGES!

Step 2: Connect PIR Sensor to Galileo

Picture of Connect PIR Sensor to Galileo

Connect the Ground cable from the PIR sensor to ground on the Galileo, VCC to 3.3 pin on the Galileo, and connect output to digital pin 0 on the Galileo.

Step 3: Connect the Relay to the Galileo

Picture of Connect the Relay to the Galileo

Connect three wires to the relay VCC, ground and In. The VCC wire connects to the 5V pin on the Galileo, the ground wire connects to ground on the Galileo and the IN wire connects to digital Pin 7 on the Galileo.

Step 4: Connect Bulb Socket to Power Cord

Picture of Connect Bulb Socket to Power Cord

We used a power cord with open end. One of these ends is connected to the middle wire from the bulb socket (black wire for us). The two remaining free wires (white one from the bulb socket and one from the power cord) will be connected to the relay.

Step 5: Connect Remaining Wires to the Relay

Picture of Connect Remaining Wires to the Relay

The open wire from the power cord gets connected to the relay COM pin on the Relay. The wire from the bulb socket is placed in the NO (for normally open) pin on the relay. Tighten the screws on the relay to keep wires in place.

Step 6: Screw in Lightbulb

Picture of Screw in Lightbulb

Place the bulb in the socket. Now the whole system is assembled! Plug in all the necessary wires, power to the Galileo, USB connection from the Galileo to the computer. Once you are totally ready and sure your circuit is correct: connect the power cord to the wall. BE CAREFUL WITH HIGH VOLTAGES!

Step 7: Upload the Code

You are now ready to upload the code! Attached here.

Comments

tomatoskins (author)2016-04-14

Excellent use of relays!

About This Instructable

2,092views

12favorites

License:

More by emccuen:DIY Motion Activated Lights - Galileo
Add instructable to: