Shop OBEX P1 Docs P2 Docs Learn Events
Ping: Midi Controller- false object detection — Parallax Forums

Ping: Midi Controller- false object detection

n0izmkrn0izmkr Posts: 2
edited 2010-01-12 23:22 in Accessories
This is my first stamp project and my first forum posting. I have looked through the other forum posts relating to the Ping, but have been unable to find posts relating to my particular problem. Please let me know if I need to provide any further details of my project.

I have a built a theremin-style midi controller, utilizing two Ping Ultrasonic sensors and the BS2. The controller works great in a "quiet" enviornment. However, when put into tight rehersal and performances spaces, it receives false hits.

The controller is played in a live electronica band- computers, drums, bass, trumpet, and trombone. The controller seems to be sporadically detecting hits from the trumpet and cymbals. The severety of the situation fluctuates, depending on the size/shape of the performance space.

When we tested one instrument at a time, the false hits occured in a patteren that could be related to the height of the performer and the direction in which he was playing. So, it does seem to be a result of soundwave collisions, or the receiver detecting 40khz waves from other sources.

Currently, the workaround for this problem is turning the sensors off with a switch (SPST and main power supply) when the controller isn't being played. I would like to find a more refined way to deal with this. I'm hoping there are small changes I can make to the physical design to prevent the false detection. I'm also hoping this won't need a drastic change in the physical housing, as the performer who I built this for has already spent a couple of months playing/learning the instrumet. I am hesitant to add more code, for fear of slowing down the response time. Yes, a dilemma. However, if someone has encountered this issue in their own projects, and knows a possible code solution, I will post a link to the code.

Possible solutions I have considered include adding another sensor, such as an IR switch, or adding acoustical treatment. I have researched acoustic treatment, but as of yet, have not found anything specifically rated for ultrasonic waves.

Measurements of the Ping boxes are: 3.5"x2.5"x1.5". The sensors are recessed 2cm inside the box.

Any advice, insight, etc would be greatly appreciated!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nicole Carroll
aka n0izmkr
www.nicolecarrollmusic.com
1499 x 1004 - 664K
1499 x 1004 - 572K
1500 x 2240 - 1M
1499 x 1004 - 828K

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-07 20:17
    You're definitely getting 40KHz interference from other sources. Cymbals are an almost ideal source of such interference, and a trumpet could easily have harmonics in the 40KHz range. You could try to shield the Pings from these sources, but I doubt you'd have much luck. One software strategy that might help is to take several readings, then use the median value as your distance reading. There's also a way to do a running median calculation, which I presented here. What's not clear, however, is whether the response time would be fast enough for your app.

    -Phil
  • FranklinFranklin Posts: 4,747
    edited 2010-01-07 23:43
    You might be able to convert to IR or use IR to switch the pings in and out of the circuit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • n0izmkrn0izmkr Posts: 2
    edited 2010-01-12 21:31
    I had considered implementing an IR switch, but unfortunately this would not solve the problem because in small spaces, the waves from the cymbals/trumpet are overriding the detection of the hand over the ping sensors, so there would still be false detection.

    From what I understand, the PIR sensors only output high/low signal. I don't think I could replace the ping sensors with the IR sensors, since I am mapping the sensor's field of view to precise midi values.

    Please correct me if I am wrong regarding the PIR output.


    Regarding the running median- I'll have to think on this one. I'm not sure it would be the best solution for this application, as I need real-time, precise response, with near zero latency. However, thus far I have had no luck with material barrier solutions, so I'm going to give this a try.


    Thank you for your input!


    n

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nicole Carroll
    aka n0izmkr
    www.nicolecarrollmusic.com
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-01-12 23:21
    You could also try measuring the hand distance as outlined here ... or wait for Parallax's laser distance sensor to debut. By using a white glove against a black background and diffuse front lighting, you could also key the instrument with the TSL1401-DB imager by measuring horizontal, rather than vertical, displacement. Your performer would have to get used to the new paradigm, though.

    -Phil
  • FranklinFranklin Posts: 4,747
    edited 2010-01-12 23:22
    http://www.youritronics.com/infrared-theremin-musical-instrument/

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.