Pages: 1 [2] 3 4 5   Go Down
Author Topic: Arduino as Capacitive Sensor  (Read 18465 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not sure I understand the last part you write.. But I tryed using pin13 and the small LED blinks..  smiley
How would I print the exact signal/numbers that is recieved - I need to use these numbers..

Thanx again

//Mads
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I got this error when I exported to the board::

Error inside Serial.<init>()

gnu.io.PortInUseException: Unknown Application

      at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)

      at processing.app.Serial.<init>(Serial.java:127)

      at processing.app.Serial.<init>(Serial.java:72)

      at processing.app.Uploader.flushSerialBuffer(Uploader.java:67)

      at processing.app.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:69)

      at processing.app.Sketch.upload(Sketch.java:1699)

      at processing.app.Sketch.exportApplet(Sketch.java:1761)

      at processing.app.Editor$42.run(Editor.java:1955)

      at java.awt.event.InvocationEvent.dispatch(Unknown Source)

      at java.awt.EventQueue.dispatchEvent(Unknown Source)

      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

      at java.awt.EventDispatchThread.run(Unknown Source)

java.lang.NullPointerException

      at processing.app.Serial.setDTR(Serial.java:480)

      at processing.app.Uploader.flushSerialBuffer(Uploader.java:76)

      at processing.app.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:69)

      at processing.app.Sketch.upload(Sketch.java:1699)

      at processing.app.Sketch.exportApplet(Sketch.java:1761)

      at processing.app.Editor$42.run(Editor.java:1955)

      at java.awt.event.InvocationEvent.dispatch(Unknown Source)

      at java.awt.EventQueue.dispatchEvent(Unknown Source)

      at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

      at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

      at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

      at java.awt.EventDispatchThread.run(Unknown Source)



What can this mean?
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 9
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It could mean a few things.  Is anything else running that might be using the serial port?  Have any over-aggressive firewalls?  Did you select the right serial port from the Tools > Serial Port menu?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
I love YaBB 1G - SP1!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a question about adding more capacitive touch sensors through a multiplexer. I'd like to add a bunch more sensors providing continuous data (i.e. not digital on-off buttons). The tests I've made make me concerned that I won't be able to get smooth, consistent data when reading this through a multiplexer (MC14067). I understand that with wires dangling and a breadboard one can pick up stray capacitance so it's not the best test but my tests have led me to be concerned anyway and I thought I'd ask if anyone can confirm the possibility (or impossibility) of this technique before I go through all the effort of getting a PCB made.

Here's the situation:

1) Connecting a sensor and the resistor directly to the Arduino pins produces smooth, continuous data as my finger moves across the sensor (as long as there's some insulation over the copper - scotch tape has worked fine for my prototypes).

2) Connecting the sensor and resistor into a breadboard and then on to the Arduino also produces smooth, continuous values (though slightly different than number 1).

3) Connecting the pins through a multiplexer to read multiple sensors produces approximately accurate results but the values jump around a bit. That is, it won't be completely random but with a constant finger position it will jump back and forth within a small range. Too much change to use smoothing in the code I think.


The fact that both 1 and 2 work well leads me to believe that it's the multiplexer, not the breadboard/dangling wires that is causing the problem.

Anyone have any thought on how/if this setup could work?

Thanks.







Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
I love YaBB 1G - SP1!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

P.S. Thanks for sharing this cool technique!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 10
I love YaBB 1G - SP1!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

P.P.S - Well, I just figured something out. If I reverse the order of the HIGH-to-LOW and LOW-to-HIGH transition sections, I get much smoother results. Still not quite as smooth as without the multiplexer, but I'm more optimistic about getting this to work.

Any further thoughts would still be appreciated.

Thanks.
Logged

Austin, TX
Offline Offline
Full Member
***
Karma: 1
Posts: 182
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
  A guy named Terry Fritz did some work on using multiple capacitance sensors together. It's not exactly an answer to the multiplexer question, but it could be helpful.  I'm not techy enough to know exactly how, but he found a way to clean up and amplify noisy signals from the antennas.
Check it out: http://thereminvision.com/version-2/TV-II-index.html

Logged

Chris J. Kiick
Robot builder and all around geek.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 smiley smiley smiley smiley

I've potentially saved a HELL of a lot of money coming across this forum! I'm wanting to toggle a switch like you would with one of those tactile lamps that you touch a few times to get different degrees of intensity. What I'd really, REALLY appreciate would be if someone pointed me in the right direction for achieving this using Max/MSP as the programming language (I'm using 'simplemessagesystem' to interface the Arduino with Max). Would it be too much of a challenge?

Thanks for your time,

Gennaro

 smiley smiley smiley smiley
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I'm a rookie to this Arduino game but I got this code working and it suits my project really well. However, I don't need to read various degrees of pressure, I merely need an on/off register. I know I need to add a boolean but I have no idea where... Any ideas?

Any help is a plus smiley
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am really interested in to get touch sensiting working together with max/msp, has anyone did that?
I am using the arduino2Max patch to get Arduino talk to max/msp.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hey,

i'm trying to do the same. i was initally using the capsense code but abandoned it because i couldn't seem to create multiply capacitive sensors from it. i'm not that hardcore a programmer you see.

instead, i found this code http://www.arduino.cc/playground/Code/CapacitiveSensor

which works perfectly in arduino, the numbers are outputting and i'm trying to use with the arduino2max patch but no joy. as the pins are declared in the arduino code, surely the max patch should read the digital pins? any help is really appreciated.

Cheers
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 12
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm currently building a capactive measurement system as part of my PHd, I've found, depending on what accuracy you want, that the best way is to use a sigma delta modulation technique. You can find this in Analog Devices AD774x series of Capacitive to Digital Converters. These chips go from one channel to 12 channels for mounting capacitive electrodes and have resolutions between 8 and 24 bits over full scale ranges of around 25pF with a bit of calibration, obviously, that gives a lot of sensitivity.

The chips communicate with a host through the i2c bus, so you ca use Arduino's wire library to get the data out of the slave chip (I sweated over a prototype function for a PIC i2c protocol for months when I found arduino!) and use that to manipulate the data anyway you want.

the only thing is that these chips are only available in TSSOP form so can be a bit of a pain in the arse to solder, however it's quite a nice solution as I am finding out.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 75
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the purpose of the guard pin (pin 10)?  The code seems to work just as well without it...
Logged

0
Offline Offline
Sr. Member
****
Karma: 0
Posts: 267
dinosaur cork
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You are correct that the guard pin doesn't do much and can easily be omitted. This was a klugy way to implement a technique which is used with op amps and other high impedance (low current) circuits.

You can now use the [[http://www.arduino.cc/playground/Main/CapSense| capSense library]]  and use any pins you want. The results will vary a bit from pin to pin though.

But if you do want to make the wire insensitive and only the foil at the end sensitive, use shielded audio wire and ground the shield on the duino end only. (Make sure the shield on the other end doesn't touch the sensor, or it won't work.

Paul
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the difference between this and http://www.arduino.cc/playground/Code/CapacitiveSensor? Is the one wire method only for direct touch, while this can sense a longer distance?
Logged

Pages: 1 [2] 3 4 5   Go Up
Jump to: