Quantcast
Viewing all articles
Browse latest Browse all 4871

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

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 may be NSFW.
Clik here to view.
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 4871

Trending Articles