PIR-Sensor only works right when connected to PC

Hi, I‘ve built a simple project, in which a mp3 file is played, when a PIR-sensor recognizes motion.

Works perfectly fine, when connected to my Mac. But when connected to a 9V battery the code to play the mp3 file is running and running. Tested with an oscillator and when connected to battery the PIR input ist always high. When connected to Mac HIGH and LOW.

Some ideas to get rid of this problem?

I am using and Arduino UNO and as PIR: HC-SR505

Hi, can you post the connections between sensor and board?

Of course. 5v and grnd are soldered to a small breadboard piece. And than to the Sensor. And the input pin of the sensor goes to pin 2.

GND are connected together?

in the first picture red is 5v

Have you try a different power supply? Like 230v / 9v ?

If your 9V battery is the smoke-alarm type, it won't work. That can not supply enough power.

it is. is there any type that could offer enough power?

Tried my MacBook with usb-c that worked. 9V fire alarm type battery didn’t work. And via usb cable plugged into phone adapter in socket also didn’t work

USB-C is generous:
USB Type-C 1.2 15 W 3 A

So, a D-cell battery pack of 6 alkaline cells should work via the 9V plug or any LiON USB-C cellphone external battery pack

You don't need a 9V supply. 5V is all you need. any battery bank will work just fine. You can also get a liPo battery at 4.7V and it will work as well.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.