Instructables
loading
loading
Picture of Touche for Arduino: Advanced touch sensing.
Update: New interface - look at the last step.

Credits: Arduino sensing done by DZL, Processing sketch and Instructable done by Mads Hobye

Disney Research lab designed a novel way to detect touch. You can see a video of their demo here:


I had the honor to meet them at CHI2012 in Texas and I discussed with them whether it would be possible to convert their system into the Arduino platform. Their immediate reaction was that the Arduino would not be able to generate good enough frequencies. I asked my friend DZL if he could solve this problem and this was his solution to the problem:

The Touché hardware uses a really fancy Direct Digital Synthesizer IC from Analog Devices. It generates a really pure sine wave signal with frequencies between 1kHz and 3.5MHz with high resolution. While the Arduino is capable of generating frequencies in this range the signal is a square wave with lots of harmonic frequency components and really low frequency resolution.
Simply using this signal with the circuit described in the Touché paper result in a really messy frequency graph due to the harmonics from the square wave. The solution is to use the filtering properties of the LC circuit to our advantage. By measuring the signal after the inductor (coil) rather than before we only see a nice sine wave shaped signal free of all the unwanted frequency components. As a result we now see a peak in signal at resonance rather than a notch but the signal contains the same information.


This has resulted in the following sensing capabilities:


At the conference they told me that they used 200 steps and they were able to get up to 2000. We have 150 in the above video. 
 
Remove these adsRemove these ads by Signing Up
1-40 of 117Next »
PetervdPol28 days ago

:( I really want to build this, it is amazing. However: I get compile errors, both with a Arduino Uno and a iduino Mega R3, Same error:

sketch_mar03a.ino: In function ‘void loop()’:

sketch_mar03a.ino:82:28: error: ‘PlottArray’ was not declared in this scope

Can someone help me?

Transfer the code from 'SendingData.ino' to 'Arduino_sensing.ino', then compile and test it back.

Thank you! This worked. Can you give me a hint on the Processing part as well? There are three files at Github:

GraphClass.pde, Processing_Graph.pde and SerialLink.pde

I have merged them, no avail, Put them in the same folder etc. nothing works. Problem may be I am on a Linux computer and don't have a "Com port" I tried this in ProcessingGraph.pde:

change "PortSelected=3; " in PortSelected=/dev/ttyACM0; which does not work. I also tried this, from another Processing sketch that works:

//PortSelected=0;

myPort = new Serial(this, "/dev/ttyACM0", 115200);

What to do???

MetabolicG made it!11 days ago

Thanks for this wonderful instructable! I hope someone is still reading the comments, as the last one is 2 years old...

I built this device and it seems to work; I get a graph with a peak in the Processing app when the Arduino is attached with the sensing wire in a cup of water. When I put a finger in the water, however, the graph goes almost entirely flat. It does not matter how many fingers I put in, I always get the same result. It works more as an on/off switch than actual sensing... does anyone have any idea what could cause this behaviour?

See attached images for the board and graph outputs.

bottom.jpgtop.jpgtouching.PNGnothing.PNG

I'm also having the same problems. The different states couldn't be distinguished.

Screenshot 2015-03-20 22.04.48.pngIMG_20150320_220212.jpg
TWP491 year ago

We get "PlottArray was not declared in this scope" each time we try to up load to the arduino. We have trired the various suggestions given in these comments--GUINO version and still get the same message.

Hi there! I am getting the same; did you find a solution?

markijzerman made it!1 month ago

Yes! It worked on the breadboard, immediately soldered it to a prototyping board. Thanks loads for this tutorial! :)

image1.JPG
schaar_Touche.MOV(516x290) 15 KB
How easy would it be to run this on an arduino pro mini? or arduino mega? Are there certain pins and settings that need changing?
madshobye (author)  Cannonball21342 years ago
As far as I know you can run it on any board that uses the same chip. So arduino pro mini should be the same. When using it for arduino mega - you probably have to customize the code for the pwn pin for it to work.

Thank you for this amazing project. I have a small question. Is it possible to use another PWM pin simultaneously so we can use multiple objects with one Arduino? I'm getting signal drop when using the same PWM signal over two circuits. Could you please explain how this is done?Thank you very much for any respons.

dSteinel2 months ago

Thanks a lot for this very nice instructable!

The sensor works quite well. But there is an issue which I can't solve so far. I connected the outcomming values to an led so that it goes on when I touch the sensor. It works really good when the arduino is connected via USB. But with an external power supply the led flickers (although the values should be exaclty the same). Can anybody help me so that I dont have to stay connected with the usb port?

Hi, I am not an expert with Arduino Micro Controllers, but to me is sounds like your power supply is either underpowered or failing. Check your input voltage and current with a meter or scope and if they are correct, then I would try adding an electrolytic capacitor (about 470uf) between your power supply and micro controller to condition your incoming power.

davidbarcomb4 months ago

Very nice. Thank you for sharing

clemniem10 months ago

Is it possible to use the Touche on another Pin then Pin 9?
I'd love to use it with the Mozzi library to create output Sound. But they both use Pin 9.
Thanks in Advance,
Clem

Hi ! Same thing for me !! It woulfd be wonerfull if someone could solve this :-)

RCH67 months ago

Hi... I am using Guino dashboard for blinking an Led at about every half of millisecond, and I am plotting the graph according as the led turns on and off. The problem is the width of graph is tooo small to recognize the signal. How can we increase or manipulate the axis??? @Madshobye

RCH67 months ago

Hi... I am using Guino dashboard for blinking an Led at about every half of millisecond, and I am plotting the graph according as the led turns on and off. The problem is the width of graph is tooo small to recognize the signal. How can we increase or manipulate the axis??? @Madshobye

RCH67 months ago

Hi... I am using Guino dashboard for blinking an Led at about every half of millisecond, and I am plotting the graph according as the led turns on and off. The problem is the width of graph is tooo small to recognize the signal. How can we increase or manipulate the axis??? @Madshobye

jcarthew1 year ago

Hi, Thanks for posting this! I am having an issue that I suspect is related to my arduino board having a dodgy clock or something but I wanted to check - the peaks move from right to left very quickly during operation - the amplitude remains constant but the Readnumber changes constantly. Any suggestions? I am going to try with another mega soon. Thanks again!

Tried it on a second board - no change.

jeraman jcarthew10 months ago

What an amazing instructable, thank you for posting! Now I am having the same issue described here on Arduino Uno. Would anyone have an idea of what is going on? Thanks for the help!

madlabdk1 year ago
Hey Mads, We built the touché (thank you so much for your instructables) and interfaced it with two environments we love: PureData and Max/MSP. We have succeeded in this. Here we go the project:
http://madlabdk.wordpress.com/2013/04/08/2-touche-meets-pd-and-maxmsp/
and the github ;)
https://github.com/madlabdk/touche

keep on sharing !
Ive week working on a very similar project for a while, and wanted to check this out. Can you explain how to set it up?
I uploaded arduino graph, and ran the graph mxp and nothing happens. If I check the arduino serial port it it is just outputting nonsense (lots of numbers and symbols).
I did the same with the "peak" files and could not any results.
Any ideas?

Did you ever figure this out? I'm running into the same problem, and I really need to work with this data in Max MSP rather than processing.

Solved! In case anyone else stumbles upon this problem, IT IS YOUR BAUD RATE! I made a post about it on the Arduino forums:

http://forum.arduino.cc/index.php?topic=224730.msg...

The code works beautifully so madlabdk if you see this you are amazing! And of course Madshobye as well, bless yall, and this community!

bonniee1 year ago

Thanks so much for this Instructable! I'm looking forward to trying it. I'm new to these kinds of circuits, so I have a quick question -- for the inductor, is there a restriction on which kind I should purchase? Looking at Mouser, there are a ton of different (and different-looking) varieties...Does the max current or max resistance rating matter? Thanks!

zwsro1 year ago

May I ask if any Coil with10mH will do? I cannot seem to find something identical to the one you use. What I found was a coil that actually looks like a resistor.

This is awesome. The technique itself is cool, and having an Arduino implementation makes it so much better!

Just a quick comment on the Processing code, I was having issues with it because the dynamic arrays weren't getting initialized. The SerialEvent function was freaking out at me, so I just changed the declarations at the top:

float[] DynamicArrayTime1 = {}, DynamicArrayTime2 = {}, DynamicArrayTime3 = {};

float[] Time1 = {}, Time2 = {}, Time3 = {};

float[] Voltage1 = {}, Voltage2 = {}, Voltage3 = {};

float[] current = {};

float[] DynamicArray1 = {}, DynamicArray2 = {}, DynamicArray3 = {};

Hopefully that helps someone else who gets stuck. :)

palatis1 year ago

Hello, I'm having really small readings that's difficult to distinguish between different touch patterns (like one finger tip, multiple fingers, grab, palm... etc), the values are like:

untouched:

  • Top: 1.00
  • Interpolated: 21.00
  • Basline (no value)
  • Value: 21.00

palm:

  • Top: 1.00
  • Interpolated: 26.00
  • Baseline (no value)
  • Value: 26.00

I tried several differnt touch interface, including:

  • nothing (just the wire)
  • a glass of water (in a ceramics cup)
  • a piece of aluminum paper (~14x30 cm^2)
  • a tin can (empty milk powder can)

all giving similar results, almost indistinguishable.

I tried 2 types of inductors

  • axial lead (brown black black silver)
  • radial (103J)

I tried to play with different values of resistors, capacitors, and inductors, but nothing made a difference.

I'm stuck at here, can somebody help me?

螢幕截圖 2014-02-13 13.49.17.png螢幕截圖 2014-02-13 13.49.27.png

Thank you so much for sharing this.

I used it with plants in my graduation research.

If anyone interested and have some time, you are very welcome to visit my page at
http://www.instructables.com/id/Calm-Relaxed-Interaction-Plant-Plus-1

Thanks a lot for this instruction Mads!

Somehow I can't see any graph in processing. The original sketch just opens a blank window. Also tried your GUINO approach. The application only shows the setup bar on the left side nothing else.
I tried older versions of Processing still it didn't work.

I'm using an Arduino Duemilanove (ATmega128). Might that be the cause?

Any help would be highly appreciated. I really wanna get this running!
i meant ATmeaga168 of course.
madshobye (author)  fvon oertzen1 year ago
It should work. Sound like something is wrong with the serial communication. Wrong port comes to mind. I am not sure.
iziccoz1 year ago
What is the use of 3K3 pull down resistor in that circuit? (before inductor) In disney paper theres no pull down resistor in hardware description. Thanks for reply
I'm am trying to decipher the arduino code to figure out what frequencies are being swept. My understanding is that you are you are trying 160 different frequencies. The TCCR1A and TCCR1B registers indicate no scaling and a fast PWM setting. The system clock is 16 MHz and the timers are prescaled to system clock divided by 64 = 250kHz. The frequencies that are being swept are then 250/1 = 250kHz to 250/160 = 1563Hz. Is this correct?
Hi I'm interested in the same question you had -- did you ever figure out the frequency range being swept here?
sopon121 year ago
Hi, Thanks for sharing the super helpful source code.
The code works very well. I am finding a way to add more plant for touching.
I am planning to add more analog input and use only one Arduino.
Could you please suggest and guide me how to do?
Since the data sent to Processing is more complicated than normal way, so I have no idea how to make it. I am looking forward to any suggestion! Cheers!
Hi, thanks for your amazing idea. I want to extend it to work on the touch on a cardboard. I just wonder, if a bias inductor/capacitor (mentioned in disney's paper), or an amplifier can help to make it more sensitive about small variation, and gestures recognition?
http://forum.arduino.cc/index.php?topic=166747.0  

I have started a new topic on the arduino forms to help push this along. You can follow/contribute here.
1-40 of 117Next »