Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4990

Automation, sensing and robotics • Re: code PIR motion sensor to trigger a relay On/Off not working

$
0
0
thanks Gordon for the link and schematic.
since i could not find that specific relay in USA, i got this from ebay https://www.ebay.com/itm/255142106413 instead
Image
it seems to be working great so far!
very interesting that Normally Opened on the relay auto flip to On as soon as the rpi gets powered On. this is not a big deal for this project.
Once i run my python script though, the relay flips to Off. if motion is detected, relay flips to On as desired.

vcc to 5v
gnd to gnd
In2 to gpio 17

Statistics: Posted by tung256 — Fri Sep 13, 2024 9:41 pm



Viewing all articles
Browse latest Browse all 4990

Trending Articles