1129 Touch sensor + Max : sensitivity, hysteresis and delay?

Supporting Max/MSP versions 6 and up
johncohn

1129 Touch sensor + Max : sensitivity, hysteresis and delay?

Postby johncohn » Fri Jul 08, 2011 11:56 am

Folks,
I could use your help !. I'm trying to use a bunch of 1129 touch sensors with Max to build a sort of musical instrument.. I have no trouble creating a simple demo where the 1129's can trigger simple midi notes in Max.. The issues I'm having are with sensitivity, hysteresis and delay

Sensitivity- I've attached the 1129 touch point to a piece of fine copper mesh behind a thin lexan sheet . I'm easily able to sense my hand on the other side of the lexan.. what's bugging me a bit is that the plate is quite sensitive to surroundings.. eg. metal beneath a table, etc. I was trying to figure out a how to calculate the right size for my sensing pad.. and/or.. a way that I could discriminate between static coupling and the presence of the hand. I believe the sensor is ratiometric.. but the phidget interface in max seems to be showing only two values.. 0 or 999, Is there a way to change the scaling on these things so I can some interpretation about how near and/or big something is ?

hysteresis- I'm also noticing that there is some sort of built in hysteresis in the 1129. I.e the Phidgetinterface registers presence of a hand at (say) 2cm distance.. but then does not register that the hand is not present until it's raised to (say) 5 cm. Is this hysteresis somehow in the phidget interface.. or is it set in the 1129. If it's the latter, is it possible to control ? It's creating some difficulty in 'playing' the instrument

delay- similar question.. I've created a simple feedback mechanism using leds to indicate when the 1129 sensor is active. There appears to be a surprisingly long (many mS) long delay between the placing of your hand and the sound of the midi note. I've tried changing the sample rate (setSampleRate) message on the phidgetinterface.. I've tried -1 (trigger on change) and 1 (1 ms poling i think. or is it 100mS ? ) and 0.. (no clue).. -1 seems to have the least delay... Any ideas on how to improve this ?

Is it possible that the whole 1129-> phidget 8/8/8 controller ->Max interface is going to be too slow to use to trigger a musical instrument ? Have others tried to do similar things and either succeeded or failed ?

Any help/comment on any of the above would be most appreciated !
-jc


ps. On a similar bent.. does anyone have a contact touch sens design that would work with phidgets ? Perhaps one that works with coupled noise (ie. you need to physically touch the antenna).. that would be a nice compliment to the existing sensors...

pss. . one suggestion.. there should be some sort of of better solder connection for the sensing tab on the 1129..

johncohn

Re: 1129 Touch sensor + Max : sensitivity, hysteresis and de

Postby johncohn » Wed Nov 02, 2011 10:30 am

Folks.. I'm still very interested in getting help.. I need to figure out why there's such a time delay in my 1129 touch sensors.. There's a detectable delay (10's of milliseconds ? ) between the time the touch sensor is actuated.. and the time I can (say) turn on an LED or sound a midi note.. . I currently have the 1129's feeding into an /8/8/8 phidgets controller that is connected by usb to the Max/MSP phidget plugin... which I then use to trigger the midi event.
Is it the sensor ? Is it the phidgets processor ? Is it the software I'm using (Max/MSP).. Chances are.. it's all three.... I know that's a long path.. but we're talking milliseconds here.. could it really be that slow ? I would appreciate any tuning help before I decide to reimplement.. Thanks for any guidance.
-jc

erik
King of the Lab
Posts: 476
Joined: Fri Mar 06, 2009 12:42 pm
Location: Calgary, Canada
Contact:

Re: 1129 Touch sensor + Max : sensitivity, hysteresis and de

Postby erik » Wed Nov 02, 2011 11:38 am

Since the Phidget device is a USB device, it can only send a data packet every 8ms due to USB specifications. If the sample time is changed to below 8ms, to 2ms for example, you would get four samples every 8ms. This is not a limitation of the processor, since it is actually sampling every 2ms but can only send the data to the PC every 8ms. Additionally as you mention, the delay can also be from the long chain. Could you program a simple example that just lights the LED when the touch sensor is pushed in another programming language for comparison?


The 1129 is a capacitive touch sensor. The capacitance can change depending on the surroundings, and not necessarily if something is touching the sensor. This allows it to be triggered through objects like wood, glass and lexan. As you mentioned, the 1129 can only read a 0 or 999 - it only detects whether there is something there or not. It is not possible to detect size or distance.

Some possible solutions:
- Increase the thickness of the lexan.
- Decrease the size of the wire mesh, or replacing the mesh with the end of a wire.

Both of these solutions could also result in the notes never being sensed however, and could require a lot of trial and error for reliability and repeatability.

Instead of using capacitive touch sensors, you could look into resistive touch sensors, such as the 1131, or the 3103 and 3104 Force Sensing Resistors (FSR). I don't think that this would fix the delays, but you would be able to get a reading for how hard the sensor is pushed and do some volume related things.

johncohn

Re: 1129 Touch sensor + Max : sensitivity, hysteresis and de

Postby johncohn » Mon Nov 07, 2011 12:46 pm

Erik,
Thanks for the response.. What I am wondering is whether the cap sensors are intrinsically slower than some of the other sensing types.. Do you have any insight there ? Do you know of folks who have successfully used phidgets USB-based solutions for musical instruments ?
-jc

erik
King of the Lab
Posts: 476
Joined: Fri Mar 06, 2009 12:42 pm
Location: Calgary, Canada
Contact:

Re: 1129 Touch sensor + Max : sensitivity, hysteresis and de

Postby erik » Mon Nov 07, 2011 1:05 pm

Using an analog-to-digital sampling detection method, capacitive touch sensors do take a few milliseconds. The delay is much less if there is dedicated hardware that is specifically designed for capacitive touch, such as in some touchscreen phones, etc, but of course those solutions are much more expensive. In order to keep costs down and provide a more modular solution, we opted to go with the analog-to-digital approach.

We did have one customer program a song and then play it back on a xylophone using actuators and a servo controller. But I haven't heard of anyone using Phidgets to create a real-time instrument as you are doing.


Return to “Max/MSP”

Who is online

Users browsing this forum: No registered users and 9 guests