Edited by Anthony Gallot

Pir sensor is a device that detect human presence. Use a retriggered PIR.
A value is sent to arduino periodically.
Useful to wake up the robot or launch face detection/recognition. Or what ever you want.

Summary :





Open InMoov/config/C_pir.config  and setup like this :


;whitch arduino control pir :

;5 minutes after presence detected

To check if the PIR is worky, you can use a multimeter between gnd and signal pins or use input oscope from webgui too.

MRL oscope view:



By default the pir pin is 23 on the i01.left Arduino. By default “sleeping” function is sent after 5 minutes of human inactivity.
If the robot is sleeping and if human is detected, “wakeup” function is sent.

File InMoov/services/C_pir.py

Comments 13

  1. Hello,

    I am trying to get the pir sensor to work but I keep getting this error upon startup “Arduino COM8 OK
    The Arduino choosen does not exist, plese check pir”

    I have verified that the sensor is working properly on a bread board. This is the text in the config file

    ;witch arduino control pir :

    PirPin=23 was already set so I did not change it. I am using the new blue nervo boards and have the sensor plugged into the PIR pins on the board.

    Any and all help is greatly appreciated!

    • I think you might not have set the Arduino COM port in service_6_Arduino.config.
      In the PIR config you set to connect to the RIGHT arduino:

      Do you have a Arduino connected for the right side in the service_6_Arduino.config?

      • Thank you for the quick response. I do have the right side set for COM8 in the arduino.config. I was trying to use just the pir sensor so that’s all I had hooked up. I just tried again but with the right hand attached. I was still getting “The Arduino choosen does not exist, plese check pir” but the right hand was functioning properly.

        Is there any info that I could provide that may help?

        • Could you try the same set up but using the Full arduino in the configs?
          I have never tried it with only the right side, and I am about to take off for Bruxelles.
          The Full configuration works for sure, because I use it all the time.

          • Got the same message when config set to full. I get the same message for the NeoPixel as well when I run it through a slave but works just fine when set for standalone nano through USB.

            Does the aref need to be set in the sketch for the pir as well or just the finger sensors?

            I’m in no rush, still waiting on servos to attach the arms to the torso!

  2. I have adjusted HumanPresenceTimeout=300000 all the way down to 5000 and it still takes 5 minutes to come into sleep mode. I believe I adjusted the Delay Time Adj on the sensor to about 30sec. Is there another setting I am missing?

      • I just tried 150000 same result. Sleep mode activated after 5min 15sec no matter what HumanPresenceTimeout is set to. I even tried 0.

        I also double checked the DealyTimeAdjust pot on the PIR board and it is set for just a few seconds. I tested by pulling it out and hooking up to stand alone arduino with pir monitoring script.

        I am sure its reading my service_C_Pir.config because I have the PIR on the left servo and it does sleep and does wake up with warm body presence.

        I also tried to bring up oscope in swingGui but I can’t seem to get any activity on D23.

        So I am not ruling out a brain fart and that I am missing something very simple. Any ideas would be appreciated.

        Here is a copy and paste of my service_C_Pir.config:
        ;—————————– PIR CONFIGURATION —————————————-

        ;which arduino control pir :

        ;5 minutes after presence detected

        ;———————————– END ————————————————–

        • Hello,
          In Manticore version 2693.16, the PIR config doesn’t contain:
          You must have mixed an old config file.
          You need to modify the timeOut in the inmoovLife.config

          ;Sleep 5 minutes after last presence detected

Leave a Reply