Introduction: Motion to Lights

Picture of Motion to Lights

Tired with stumbling on stuff in my garage that doesn't have a light switch I decided to do something about it. Motion sensor connected to a light was the result and it works really well.

Step 1: Motion Sensor to Breadboard

Picture of Motion Sensor to Breadboard

Red cable is for power (5v), black for ground and purple is for output.

Between the output and the cable going to the RPI GPIO there is a 10k resistor.

Step 2: Relay to Breadboard

Picture of Relay to Breadboard

Here is how I connected the relay to my breadboard. Red for power (5v), Black is ground and the White cable to go into the RPI GPIO.

Step 3: Raspberry GPIO Pins Used

Picture of Raspberry GPIO Pins Used

Raspberry connections for power (5v) and ground (black) to both motion sensor and relay and input from motion sensor(purple).

Step 4: Output to Relay From Raspberry GPIO

Picture of Output to Relay From Raspberry GPIO

GPIO pin used for signal to the relay.

Step 5: Triggers in Cayenne.

Picture of Triggers in Cayenne.

Cayenne is a user friendly interface to connect sensors and use them with raspberry and arduino. This is how I have set my triggers to turn on the light connected to the relay when the motion detector is activated.

Step 6: Parts Required

I have used a Raspberry pi 3 model B

Jumper cables female to male

Jumper cables male to male

one 10 K resistor

Relay board

Motion detector HC-SR501

Breadboard and the Cayenne interface to trigger it all.


DIY Hacks and How Tos (author)2016-09-18

Great motion sensor project. This could easily be used to make a simple alarm system.

Yep, the cayenne system also have a notify function that will send a sms text or an email to you as the trigger goes off. So an alarm is easy to make.

About This Instructable




More by Hellfalk:Chilibot v 1.0SpookBotFixing a broken thermostat on a heater with Cayenne and a Raspberry pi
Add instructable to: