• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    [ANSWERED] Pir sensor query

    Interfacing
    pir keyboard press interactive hardware arduino
    5
    7
    613
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      eamon last edited by Woland

      Hi all

      This is not 100% an isadora question but I am looking to implement elements like this long term to minimise the touch points of gallery elements

      I amnlooking for a PIR style sensor to interact with Isadora and other programs. I wish to mimic the standard space bar push to run a scene etc and use the pir/handwave to execute the scene or similar command.

      I am guessing that someone here has done similar. My primary control computers for this will be mac mini's etc.

      Does anyone have any pointers as to the best place to secure something like this? I am looking but know I am not asking the correct question etc.

      Many thanks

      Eamon

      1no. MacBook pro Retina 13" early 2015 | 2.7GHz i5, 8GB Ram 120 GB Flash storage | Mojave 10.14.5
      1no. MacBook pro 13" early 2011 | 2.7ghz i7, 16GB Ram, 500 GB SSD | High Sierra 10.13.6
      Numerous Mac Mini's/Mac Pro's, All at SSD, Max Ram, OS from High Sierra to Mojave.
      All running Isadora 3 - latest where possible

      1 Reply Last reply Reply Quote 1
      • Juriaan
        Juriaan Tech Staff last edited by

        I dont know about an all in one package that can do a Spacebar when someone enters the scene. What I normally do is use a High precision PIR sensor with an Arduino board and the Keyboard library (https://www.arduino.cc/referen...)

        Isadora 3.1.1, Dell XPS 17 9710, Windows 10
        Interactive Performance Designer, Freelance Artist, Scenographer, Lighting Designer, TroikaTronix Community moderator
        Always in for chatting about interaction in space / performance design. Drop me an email at hello@juriaan.me

        1 Reply Last reply Reply Quote 2
        • bonemap
          bonemap last edited by bonemap

          Hi @eamon ,

          Minimising touch-points is interesting in terms of a design challenge. There are a couple of things that come to mind that I have used in the past. These solutions are derived from the spatial context of each situation.

          The first is a floor pressure mat that is placed under a carpet. These are very cheap and easy to implement. The wires from the pressure mat are extended and connected to a hacked USB computer keyboard circuit and then the software responds to the keystroke. This really only provides one gesture - on the mat or off.

          The second is a depth camera. The depth camera, such as the 1st generation Kinect, is going to give you a lot of calibration control for your content based on distance/depth sensor and recognising gesture - like an arm wave. Isadora 3 now has an excellent depth sensor plugin for Mac - the OpenNI Tracker. The Kinect is quite a big unit for a gallery, however a unit like the Orbbec Astra Mini or the RealSense are much smaller units with the same or similar functionality of the Kinect.  I have used the depth camera for gesture control through a glass window out to the street, it worked effectively in that context, where the interface was back projected onto a diffusion film on the glass.

          The third is similar to what @Juriaan has already suggested a motion detector module (PIR sensor) hooked up to a micro-controller and using Isadora's Serial input.  The PIR module that I have can provide adjustable range and delay times via onboard potentiometers, however for gesture control they may not have the nuance of calibration to make it a reliable solution. It will detect motion at a certain range, pause, and detect motion in the same range again after some seconds. The pause means that the data can appear unresponsive at times. I have a Duinotech PIR module for testing and despite tweaking the Arduino code and sensor potentiometers I could not get a pause rate faster than 4 - 5 seconds. And that makes it feel unresponsive for gesture detection. If movement is continuous within its range it is good at reporting that, and if there is no longer movement within range after 3 - 4 seconds it can report that too. But it then pauses before reporting movement again. A different PIR sensor build might do a better job than this one.

          if you want to persist with the PIR sensor, here is the Arduino code I was testing with thanks to this online example:

          #define pirPin 3
          int calibrationTime = 30;
          long unsigned int lowIn;
          long unsigned int pause = 30;
          boolean lockLow = true;
          boolean takeLowTime;
          int PIRValue = 0;
          void setup(void) {
             Serial.begin(9600);
             // while the serial stream is not open, do nothing:
             while (!Serial) ;
             pinMode(pirPin, INPUT);
          }
          void loop(void) {
             PIRSensor();
          }
          void PIRSensor() {
             if(digitalRead(pirPin) == HIGH) {
                if(lockLow) {
                   PIRValue = 1;
                   lockLow = false;
                   Serial.print("PIR: ");        
                   Serial.println(PIRValue);
                   delay(5);
                }
                takeLowTime = true;
             }
             if(digitalRead(pirPin) == LOW) {
                if(takeLowTime){
                   lowIn = millis();takeLowTime = false;
                }
                if(!lockLow && millis() - lowIn > pause) {
                   PIRValue = 0;
                   lockLow = true;
                   Serial.print("PIR: ");        
                   Serial.println(PIRValue);
                   delay(5);
                }
             }
          }

          and here is the 'Serial In Watcher - Text' actor internal parser string:

          "PIR: " input:string=?

          Best wishes

          Russell

          http://bonemap.com | Australia
          Izzy 3 STD/USB 3.2.5 | MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | Mac Studio 2022 M1 Max 32GB | OSX 12.5.1 Monterey

          1 Reply Last reply Reply Quote 1
          • Woland
            Woland Tech Staff last edited by

            I've been thinking about using adapted DDR pads in installations for this very reason.

            TroikaTronix Technical Support
            New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
            TroikaTronix Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
            TroikaTronix Add-Ons Page: https://troikatronix.com/add-ons/

            | Isadora 2.6.1 + 3 | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s | Macbook Pro (Retina, 15", Mid 2015), macOS 10.11.4, 2.8GHz Intel Core i7, 16GB RAM, Intel Iris Pro 1536 MB |

            1 Reply Last reply Reply Quote 1
            • jfg
              jfg last edited by

              You can use an Arduino nano as USB Midi Device: https://www.arduino.cc/en/Refe...

              with an Ultrasonic Range Finder https://www.arduino.cc/en/Tuto...

              and in Isadora the menu Scenes/Edit Go Triggers to configure the MIDI parameters:

              best

              Jean-François

              • Izzy 3.2.6, Mac OS 13.2 Ventura:
              - MacBook Pro M1 Max 16" 64GB RAM
              • Izzy 3.2.6, Mac OS 10.14.6 (Mojave):
              - Mac Pro 5.1 middle 2012 (3,33 GHz 6-Core Intel Xeon, 32GB RAM, Radeon RX 580 8 GB )
              - MacBook Pro 2015 (16GB RAM) 2,8 GHz Intel Core i7;

              Located in Bremen, Germany

              bonemap 1 Reply Last reply Reply Quote 3
              • bonemap
                bonemap @jfg last edited by

                @jfg

                Thanks for sharing your approach. The Arduino Midi library looks like an interesting solution to explore. Do you have a sample of the ArduinoIDE code that you are using and willing to share?

                Best wishes

                Russell

                http://bonemap.com | Australia
                Izzy 3 STD/USB 3.2.5 | MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | Mac Studio 2022 M1 Max 32GB | OSX 12.5.1 Monterey

                jfg 1 Reply Last reply Reply Quote 1
                • jfg
                  jfg @bonemap last edited by jfg

                  @bonemap

                  It has been a long time since I have worked with it and I cannot guarantee that it is the right file. I hope it helps, though.

                  sketch_PIR_MIDI_JF.ino.zip

                  PS: I used a board Teensy 3.2 for this project

                  best 

                  Jean-François

                  • Izzy 3.2.6, Mac OS 13.2 Ventura:
                  - MacBook Pro M1 Max 16" 64GB RAM
                  • Izzy 3.2.6, Mac OS 10.14.6 (Mojave):
                  - Mac Pro 5.1 middle 2012 (3,33 GHz 6-Core Intel Xeon, 32GB RAM, Radeon RX 580 8 GB )
                  - MacBook Pro 2015 (16GB RAM) 2,8 GHz Intel Core i7;

                  Located in Bremen, Germany

                  1 Reply Last reply Reply Quote 2
                  • First post
                    Last post