Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Pololu Maestro 12 with PIR

I’m trying to use an Adafruit PIR with my Pololu Maestro 12 to trigger an animation sequence while it detects motion:

I’m using a 5V power adapter, and the PIR works with 5V, and the servo power is 5V as I have the jumper set so VSRV=VIN, so I assumed I could user the servo power (red line) to power the PIR instead of the boards dedicated 5V Out, and I wired it that way. I do have a 10K Ohm resistor connected between the Servo 5V and the Servo Signal as a Pull-Up resistor for the PIR channel (11), and Channel 11 is set to “Input” in Maestro Control Center channel settings.

Under status, the PIR doesn’t seem to be detecting motion. It stays at 255 constantly.

What am I doing wrong? Will I have to use the dedicated 5V Out instead of the servo 5V?



From Adafruit’s PIR motion sensor documentation, it sounds like that PIR sensor outputs a high signal when it is triggered and is low otherwise. So, it sounds like either your PIR sensor is always detecting motion or your pull-up resistor is too strong and not letting the signal go low when no motion is detected. You probably do not need a pull resistor with that PIR sensor, but if you are using one, it should probably be a pull-down.

You might also double check that your sensor is wired correctly (sometimes the wire color on PIR sensors is not indicative of the actual function) and try the setup in the Testing a PIR section of that documentation to test your sensor separately of the Maestro. You could also try setting the jumper to enable “Retriggering” as described in that section.

If you try all that and are still having problems, can you post pictures of your setup that show all of your connections?


Thanks @BrandonM. I’ll give all that a try tomorrow. The animatronic this is for is currently in use in a Halloween display.

That all said, it sounds like I should be ok wiring the 5V of the PIR to the Servo 5V, correct?

I tested the PIR with an LED on a breadboard. It worked as expected… LED stayed off and only illuminated when motion was detected.

I tried with the Pololu without the pull up resistor. Wiring was as seen in the picture below… I made sure the wiring was correct.

I set channel 11 to input. I’m still getting a high value floating just below 255, even when there should be no motion, as tested with the LED.

Perhaps I need a pull-down resistor? How is that wired… between signal and ground? Is 10K Ohm a good value?

Also, please confirm that 5V from the Servo 5V is ok.

Mike Potter

@BrandonM I figured out the problem.

There was a short in the servo connector I added to the PIR wiring harness. I made a new servo connector, and everything works well. No pull-up or pull-down resistor needed.

This PIR works great for a 5V application, now that it’s working.

For anyone interested in this application, insert the following code below the “begin” at the top of the script. Note that you must use “less_than” for this particular PIR. Replace the “11” with the servo channel you are using. Make sure to include the additional “begin” as shown below.

11 get_position 100 less_than while

1 Like

I am glad to hear you were able to get it working! Thank you for letting us know what the issue was.

By the way, your project looks pretty neat; if you are willing to share more details about it, you might consider posting in the “Share your projects” section of the forum. I am sure other members would also be interested to see it in action!