BREAKING NEWS

27 October 2015

Touche for Arduino: Advanced touch sensing



I had the respect to fulfill them at CHI2012 in Texas and i discussed with them whether it'd be possible to convert their machine into the Arduino platform. Their instant response turned into that the Arduino might not be capable of generate correct enough frequencies. I requested my buddy DZL if he may want to clear up this trouble and this became his method 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.


Step 1: Components neded


  • Arduino
  • Usb cable
  • Shield
  • pin headers
  • Resister: 10k, 1MOmh, 3,3k
  • Capacitor: 100pf, 10nf
  • Diode: 1N4148 diode
  • Coil / inductor: 10mH (cypax.dk  part no: 07.055.0510)
  • Water bottle as sensing object.
If you do not have the inductor, it is basically a coil. You should be able to roll your own. Grab an empty roll of toilet paper wind very thin wire around a couple of hundred times. You have to experiment until you get a peak on the graph.

Step 2: Build the hardware




The shield should be build according to the diagram included here. I have included a picture of the finished shield so you can look at the actual prototype.

Step 3: Upload code to the Arduino board


here are lots of tutorials who have already explained how to program an Arduino and they do a much better job than we could. So we will just give you a couple of links:
  • http://arduino.cc/en/Guide/HomePage
  • http://www.youtube.com/watch?v=4HqXAmV_Ock
  • http://www.ladyada.net/learn/arduino/lesson1.html

The 3 things that usually cause trouble:
  • On windows you have to install the proper drivers (sometimes also on mac).
  • Remember to select the right serial port in the gui.
  • Remember to select the right board in the gui.

Below are the simplified steps to uploading the code to your Arduino board:

Step 4: Run the Processing sketch

You will need processing to visualize the graph. Here are the general steps to get it up and running:
  • Download and install Processing (http://www.processing.org)
  • Get the sketch from github (https://github.com/Illutron/AdvancedTouchSensing - same link as the Arduino sketch)
  • Open the sketch in processing and run it. You will need to choose the right serial port in setup method. It is usually the lowest number.
  • At pointed out in the comments. Arduino uno has problems with high speed serial and you need to reset the board (or unplug) it every time you run the processing sketch. If you get an error please unplug and plug it in again for it to work. 

The graphing sketch is a modified version of Bool Scotts graphing example:

http://boolscott.wordpress.com/2010/10/23/sneak-preview-of-my-open-source-project/

Step 5: Update: Alternative visualizer


Some of you have problem with the processing sketch. This is due to a crappy graphing interface written in processing. I have made an alternative version. It is based on my new Guino interface - which has much faster graphing. You have to do the following steps:

Download the arduino code here:
https://www.dropbox.com/sh/jxkno1vgka7yisf/MZe8m3G4br




Share this:

Post a Comment

 
Back To Top
Distributed By Blogger Templates | Designed By OddThemes