0

I recently bought an HC-SR505 Mini PIR sensor. I connected its positive to my Arduino UNO's 5v, output to digital pin 2, and ground to ground. I used Adafruit's code to test it, but all the serial monitor displayed was "Motion detected", which meant the PIR was always on a HIGH state. I then also tried powering it using 3V3 but the PIR kept on cycling on a HIGH and LOW state. Any help on getting my sensor to actually work would be greatly appreciated.

1

The PIR sensor has delay of 8 seconds. So when you turn on arduino, take care that no movement is on the PIR, and then after 8 seconds it should detect no movement. And it has always this delay,every time when detects movement.

  • It depends, don't generalize (<-however you write that word). – Dat Ha Nov 9 '16 at 22:31
  • Depends on what? – wishmaster75 Nov 9 '16 at 22:32
  • The PIR sensor has delay of 8 seconds is not a fact that affects all PIRs. – Dat Ha Nov 9 '16 at 22:51
  • 1
    I'm talking about Hc sr505 – wishmaster75 Nov 9 '16 at 22:53
0

The PIR works at 5V but you need to tweak the amount of sensibility and the signal length. Usually when a motion is detected, the PIR keeps sending HIGH until x seconds defined by a potentiometer on the board, when it goes down, the sensor is ready to capture another motion.

  • Thanks for the explanation. Just want to point out that the HC-SR505 doesn't have a pot on it. Also, do you know if the output voltage is 5v or 3V3? – Brandon Jan 31 '16 at 4:27
0

Switch to use 5v for Vcc, the sensor will work correctly. I have the same trouble if I use 3.3v for Vcc. The output still 3.3v even your Vcc is higher than 5v.

  • While using 3.3v does sound problematic, if you read the question again you will see that the asker started their experiments with the 5v supply, and found that not to work. So the actual problem must be something else. – Chris Stratton Oct 15 '16 at 17:38
  • I tried with another power source, not from the board. In my case I'm using an ESP8266 and to get 5v I need another power source. – ndphu Oct 15 '16 at 17:43
  • You may be using an ESP8266, but the asker is using an Arduino Uno. – Chris Stratton Oct 15 '16 at 17:46
  • Let the asker try 5v from another power source, not from Uno. Does it make sense? – ndphu Oct 17 '16 at 6:12
  • Even though this may not help the OP, this was my problem and I am thankful for having found this answer. – Marcel Waldvogel Jan 10 at 21:07
0

The HC-SR505 module IC is EG4002A, http://www.egmicro.com/download/EG4002_datasheet.pdf

so check against the schematics in the PDF.

0

I have similar problem with the HC-SR505 sensor. First few seconds it holds 0 on the output pin, and then always 1. I think it was bad batch of sensors. Bad batch in chinese manufacturing means thousands (or hundreds of thousands) bad modules flooded the market.

Meanwhile I decided to choose one of options:

  1. Stick with HC-SR501 sensor. It's bigger but works more or less.
  2. Buy expensive ($5.90) PIR sensor from seeed.
  3. Build my own PIR module by my required dimensions and function (in progress).

Update: From 5 sensors received 2 do the job. Supply voltage must be 5V or higher. First 20-60 seconds the output is not reliable and should be ignored. Then it works OK (if it works at all). Since the module has 3.3V LDO onboard the output signal is 3.3V.

0

I'm a noob. I had the same problem.

I connected the signal to pin 7 so I listened to gpio7 which always gave 1. But pin 7 is gpio4... Listening to gpio4 fixed the issue :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.