PIR motion sensor and arduino uno - how to speed up

Hi All, new to all this and trying to help my son with a invention project for school.

We are trying to operate a 12v pull solenoid with a PIR motion sensor and Arduino uno.

We have the PIR sensor hooked up tot he Arduino and tuning a simple LED on and off.

We have played with the sketch as far as changing the milliseconds and the LED light on duration does not change. We have also changed the adjustment on the PIR sensor. This does change the duration of how the long light stays on.

The issue is, we basically need the led to blink on and off almost instantly.

Our goal is to replace the LED with a pull solenoid, but we need the solenoid to open and close pretty fast to allow a ball to roll and then close to hole the rest of the balls in place.

any help appreaiated as the finish line is approaching fast.

thanks!

Hi there.

PSA: Post your code

// Per.

You need to hack the hardware of the PIR sensor. Their is no way to correct this from the software running in the Arduino.

How to do it is in my “Statues” article in The MagPi 51, available as a free download

Our goal is to replace the LED with a pull solenoid, but we need the solenoid to open and close pretty fast to allow a ball to roll and then close to hole the rest of the balls in place.

Note a PIR sensor will not detect a ball, it is designed to detect people and animals.

PIR sensor is not going to work for your project. A break beam system is likely the best option.

How frequently do you need this solenoid to fire? - Scotty

What type of PIR are you using? I'm using HC-SR501, here you have some usefull links.

Datasheet: https://www.mpja.com/download/31227sc.pdf

Tutorial: Welcome henrysbench.capnfatz.com - BlueHost.com

or make some changes to the hw: [Hacking] HC-SR501 Motion PIR Sensor CR Hacking - YouTube