0
Offline
Newbie
Karma: 0
Posts: 6
Arduino rocks
|
 |
« on: February 20, 2010, 05:23:31 pm » |
i'm wanting to make a simple touch sensor for the arduino, so i can create something similar to a lamp control module. i saw this video on youtube and a snippet of code on the arduino website.
but i couldn't get the code to work. any ideas?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 6
Arduino rocks
|
 |
« Reply #1 on: February 20, 2010, 05:23:43 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 313
Posts: 35507
Seattle, WA USA
|
 |
« Reply #2 on: February 20, 2010, 10:00:38 pm » |
What do you have hooked to the Arduino? Dry hands or wet?
|
|
|
|
|
Logged
|
|
|
|
|
B0100111001000011, USA
Offline
Edison Member
Karma: 0
Posts: 1503
I'm confused. Wait, maybe not..
|
 |
« Reply #3 on: February 20, 2010, 10:05:36 pm » |
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 6
Arduino rocks
|
 |
« Reply #4 on: February 20, 2010, 11:52:27 pm » |
i can't seem to get the code to even compile. with the capsense library, it doesn't seem to 'install' correctly. when i unzip it, i get errors in windows, and it doesn't compile correctly. so i can't get past step 1.
edit: i'm using arduino 0017
|
|
|
|
« Last Edit: February 20, 2010, 11:52:51 pm by cowanrg »
|
Logged
|
|
|
|
|
B0100111001000011, USA
Offline
Edison Member
Karma: 0
Posts: 1503
I'm confused. Wait, maybe not..
|
 |
« Reply #5 on: February 21, 2010, 12:04:02 am » |
Perhaps you should try the latest version, Arduino 0018?
|
|
|
|
|
Logged
|
|
|
|
|
North Yorkshire, UK
Offline
Faraday Member
Karma: 104
Posts: 5531
|
 |
« Reply #6 on: February 21, 2010, 11:04:15 am » |
Hmm, I had it working on 0017 before. Maybe you should have a look with google  Mowcius
|
|
|
|
|
Logged
|
|
|
|
|
North Yorkshire, UK
Offline
Faraday Member
Karma: 104
Posts: 5531
|
 |
« Reply #7 on: February 21, 2010, 11:26:02 am » |
I just tried on 0018 and it works fine.
It seems to compile ok, i'm not sure what issues you can be having. Just download - unzip and copy into hardware-libraries (in 0017) make sure it's in the correctly named folder and use the example downloaded with it.
Mowcius
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 6
Arduino rocks
|
 |
« Reply #8 on: March 01, 2010, 12:50:05 am » |
i figured out that vista doesn't like the file structure in the zip file. i extracted it on an xp machine and it works fine.
i got the basic sketch to work, and things are just fine with the example.
however, with that i'm trying to do, it doesn't work. i have a long square steel tube (0.5" square, 3 feet long) that i'm trying to use as a touch sensor. it doesn't work at all. its conductive, but i cannot get a capacitance reading reliably from it. it jumps all over the place. i've tried using as low as 100k ohm resistance up to about 2M ohm. the 100k makes the baseline values more stable, but it won't read a touch. any ideas?
|
|
|
|
|
Logged
|
|
|
|
|
North Yorkshire, UK
Offline
Faraday Member
Karma: 104
Posts: 5531
|
 |
« Reply #9 on: March 01, 2010, 11:19:14 am » |
Hmm, are you sure it is all wired up correctly, sounds like a floating pin (on a digital pin!?)
Try the code with a small piece of foil or something first to make sure it is working properly. I would not have thought that the tube would make much of a difference.
Mowcius
|
|
|
|
|
Logged
|
|
|
|
|
Manchester (England England)
Offline
Brattain Member
Karma: 277
Posts: 25501
Solder is electric glue
|
 |
« Reply #10 on: March 01, 2010, 11:30:12 am » |
but i cannot get a capacitance reading reliably from it. it jumps all over the place. This doesn't surprise me, you have a big conductor picking up all sorts of rubbish. This code / project is just a demonstration of a principal, it is not a solid robust technique that can be used with anything. As mowcius said it was made to work with small foil pieces, your problems do not surprise me at all.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 6
Arduino rocks
|
 |
« Reply #11 on: March 01, 2010, 11:42:19 am » |
Hmm, are you sure it is all wired up correctly, sounds like a floating pin (on a digital pin!?)
Try the code with a small piece of foil or something first to make sure it is working properly. I would not have thought that the tube would make much of a difference.
Mowcius it's quite reliable with a small bit of foil. it works VERY well actually. i would have thought the same about the tube, i didn't expect it to be that much different at all. i'm sure its hooked up right. i'm using an alligator clip to attach to the tube. when i just clip it on foil (or read directly from the alligator clip itselft), it's fine. but the tube doesn't work at all. seems strange to me.
|
|
|
|
|
Logged
|
|
|
|
|
North Yorkshire, UK
Offline
Faraday Member
Karma: 104
Posts: 5531
|
 |
« Reply #12 on: March 01, 2010, 03:45:03 pm » |
Could you stick in a nice cap somewhere to smooth that stuff out a bit?
Mowcius
|
|
|
|
|
Logged
|
|
|
|
|
|