• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

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

    [ANSWERED] Pir sensor query

    Interfacing
    pir keyboard press interactive hardware arduino
    5
    7
    1396
    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. 14" MacBook Pro M1, 32GB RAM, Max Processor, 1GB SSD
      Various Mac models from mac mini 2012 to Macbook Retina 15"
      1no. imac 21.5 M2 model.

      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 Izzy Guru 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 STD 4.2 | USB 3.6 | + Beta
          MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
          Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
          A range of deployable older Macs

          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: https://support.troikatronix.com/support/tickets/new
            Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
            Add-Ons: https://troikatronix.com/add-ons/ & https://troikatronix.com/add-ons/?u=woland
            Professional Services: https://support.troikatronix.com/support/solutions/articles/13000109444

            | Isadora Version: all of them | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

            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
              - MacBook Pro M1 Max 16" 64GB RAM, Mac OS 15.3.2 Sequoia
              - Mac Pro 5.1 middle 2012 (3,33 GHz 6-Core Intel Xeon, 32GB RAM, Radeon RX 580 8 GB ),
              Mac OS 10.14.6 (Mojave)
              - Mac mini Pro M4, Mac OS 15.3.2 Sequoia

              • A range of deployable older Macs
                Located in Bremen, Germany
              bonemap 1 Reply Last reply Reply Quote 3
              • bonemap
                bonemap Izzy Guru @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 STD 4.2 | USB 3.6 | + Beta
                MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
                Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
                A range of deployable older Macs

                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
                  - MacBook Pro M1 Max 16" 64GB RAM, Mac OS 15.3.2 Sequoia
                  - Mac Pro 5.1 middle 2012 (3,33 GHz 6-Core Intel Xeon, 32GB RAM, Radeon RX 580 8 GB ),
                  Mac OS 10.14.6 (Mojave)
                  - Mac mini Pro M4, Mac OS 15.3.2 Sequoia

                  • A range of deployable older Macs
                    Located in Bremen, Germany
                  1 Reply Last reply Reply Quote 2
                  • First post
                    Last post