PIR module on the inMoov Robot

The inMoov will be fitted with a PIR module. This Passive Infrared Sensor measures the infrared light radiates from object it’s pointed at. A PIR module can be used to detect if somebody is in front of the inMoov robot. I am thinking of using the sensor to power up the inmoov robot so it can reduce power when nobody is in front of it.

I used a simple module what can be purchased on several web shops around the world.

This module has a footprint of 32,5 mm x 24,5 mm x 25 mm and has three pins. One pin is for 5V power and one ground pin. The third pin is the data pin and is High when motion is detected. The modules as two potentiometers. The left potentiometer is for the sensitivity and the right is for the duration the pin should be high after motion is detected. The sensitivity is depending on your situation. For the duration I used the shortest setting because I don’t expect I to miss this trigger.

The picture below shows how the PIR module is connected with an Arduino. I used this to test the module.

The PIR module has it’s own connection on the Nervo Board. It’s located next to pin A15, D44 and D46. I made a ribbon cable to connect the sensor to the board. The pins on the PIR module and the Nervo Board are not in the same order. I needed to swap the vcc pin and the signal pin on one end as you can see in the picture below.

To test the PIR module and it connections I used a little piece of Arduino code. The signal pin of the PIR module is connected to pin 23 on the Nervo Board. The code is checking every second if motion is detected and prints the results in the Serial Monitor.

[code lang=”cpp”]
/*
* This is an example of how to use a PIR sensor with an Arduino.
* www.swanrobotics.com
*/