Low cost motion detector for the RaspberryPi

motion1Spent this evening experimenting with a low cost PIR motion detector [HC-SR501], it is small – appox 2cm by 3cm and easily to find for just over £2 on ebay.

Connection is very simple just 3 wires, the device runs on 5V with a single 3.3V output pin which goes high when motion is detected – to be on the safe side I have connected to RPi via a 1K resistor. There are 2 pots to adjust sensitivity and how long the output stays high after motion is detected, together with a jumper that sets how the unit responds to continuous movement detection.


All worked fine first time, importantly Marmite one of cats jumped up onto the table at just the right time so I also know it will detect her, which was the stretch goal of the evening experimentations.  Marmite1

Currently I have a cat sensor based around the ‘picam’ code, see earlier pose – https://meanderingpi.wordpress.com/2014/04/05/cat-cam-mark-2/. This is fine in good light levels and avoids the need for additional hardware, but struggles in low light. The plan here is to set up the motion detector with the Pi NoIR to see what they get up to at night.

Sorry I have not been posting over the summer, with the longer nights I am going to try and post something every week going forward

About davidms49

Hobbyist / designer focussing on projects using RaspberryPi and more recently Retro 8bit processors
This entry was posted in Uncategorized and tagged . Bookmark the permalink.