Welcome

Results

So, does it work? See for yourself:

As you can see, the homebrew sensor works fairly well. It seems to have a bit of a problem when I ground myself a bit differently, for example when I'm touching a radiator with my feet, but that may just be because the SVM isn't trained on that kind of data. I haven't tested it with the other scenarios the Disney people used it on (pinch sensor, water-based, table sensor, ...) but I'm fairly sure it ought to work OK there too. My sensor does return less data points than theirs, so it may be a tad less accurate... this can be improved by using a faster processor. Even the ATMega88 used here may be able to do better: I forego half the frequencies the PWM-module can spit out because the duty cycle at these frequencies isn't 50%. Even more improvement can be gained by using e.g. an ATTiny84, which has a PLL allowing the PWM-module to run at 64MHz instead of the 20MHz used here.

Some more improvement may be gotten from taking a hard look at the envelope detector: this one is chosen for low part count, and the resistor and capacitor values are calculated using back-of-the-envelope guesstimates. I think the sampling frequency can be a bit higher with some fiddling with part values here. All in all, for a project done in the span of an evening, I'm fairly happy with the results.

As usual, all the software I've used is licensed under the GPLv3. Grab it here.

« Prev 4 

14 comments

Me wrote at 5 May 2016, 12.30:

Forget about the AI. If you show a simple frequency analysis, you must have some latch respond or a strong band pass filter according to the articles, means for one finger a max at 1Mhz and for 2 fingers a max at 2Mhz for instance. Your graph is flat for all frequencies (or maybe this is your AI graph and not a frequency respond)

Sprite_tm wrote at 4 May 2016, 15.14:

Tol: No, I would say that you are the one who doesn't get it. The graph has a few curves for just a few discrete touches. If I would touch the thing in a similar way but in a different place, or if the humidity is slightly different, or if my fingers are somewhat wetter or..., the graph changes. The SVM is trained on a lot of samples, and the thing it does is take out the features that are unique to one way of touching: while the graph of touching the thing with your pinky and your middle finger may be different, the SVM 'knows' what to look for that actively distinguishes that touch from the other methods of touching it.

Tol wrote at 3 May 2016, 17.16:

I saw your code, this is absolutely far from the original intention. Your graph shows the exact same respond for any frequency, so whats the point having all of them? any div point from your graph could represent the whole system. Moreover, you wait 40ms between swaps, this is why you get it all wrong. Each frequency(or div) should had give you a different respond for a different touch. You just get a flat respond for all f. So bottom line you did not show anything new (Arduino website already done the same, since you also dont have a real vector here). Disappointing .

avion23 wrote at 10 Oct 2015, 10.08:

The video doesn't embed for me. It's available at https://www.youtube.com/watch?v=Y9VPMiHnHFo

Fajensen wrote at 25 Sep 2014, 18.54:

Two improvements. The detector could be replaced by a direct conversion stage (synchronous rectifier/detector), more frequencies can be output at once by clever PWM-waveforms. Then one can extract each one by clocking the synchronous detector with the one we are measuring. This might be simpler than to sweep the frequencies directly.

Don undeen wrote at 26 Apr 2014, 14.10:

So cool! Has anyone pushed this project forward in the last couple years?

Hyratel wrote at 7 Apr 2013, 9.13:

can this detect different finger placements on a slider?

CapSwitch wrote at 18 Jun 2012, 10.13:

Great job ! I will add this to News on my site www.CapSwitch.nl

freekuh wrote at 23 May 2012, 16.47:

Great! Looking forward that someone replicate this with an arduino!!

Bostwickenator wrote at 14 May 2012, 2.33:

Very impressive. I expect Disney spend a few hundred thousand times more money on this than you did and you have 99% of the functionality already!

Sprite_tm wrote at 9 May 2012, 6.21:

ooblahman: Sorry, you can\'t use _that_ pin for the PWM output: you need to adjust both the top the timer will count to and the output compare value for the PWM pin and for timer2 on that avr, they both map to the same register.

oohblahman wrote at 8 May 2012, 22.33:

Hi there, I\'m currently trying to port this to an atMega2560 - and I\'m jiggered as to how to modify the pwmInit function to use PB4/pin 23/arduino pin 10 on the 2560. I\'m not very experienced with timer manipulation, and everywhere I looked uses a different implementation- and some even say that a 3.5mhz pulse isn\'t even possible. I\'d appreciate your feedback!

Roadieflip wrote at 8 May 2012, 19.07:

I can\'t believe you managed this already... I\'m still trying to get my head around the concept! Well done, Buddy.

deadbug wrote at 8 May 2012, 18.04:

awesome! congratulations :-)

Leave a comment:

Your name:

What does this picture say?
Sorry, this is a captcha

Your comment:


© 2006-2022 Sprite_tm - Contact