Go Down

Topic: Arduino as Capacitive Sensor (Read 29 times) previous topic - next topic

madskoser

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

Thanx again

//Mads

madskoser

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?

mellis

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?

drh

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.








drh

P.S. Thanks for sharing this cool technique!

Go Up