Motion to Lights

Introduction: 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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: 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

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

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

GPIO pin used for signal to the relay.

Step 5: 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.

Be the First to Share


    • Trash to Treasure Contest

      Trash to Treasure Contest
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest

    2 Discussions

    DIY Hacks and How Tos

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


    Reply 3 years ago

    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.