Go Down

Topic: Capacitive sensing (Read 1 time) previous topic - next topic

sciguy

Nov 15, 2009, 04:10 am Last Edit: Nov 15, 2009, 07:43 pm by amacmullen14 Reason: 1


Can I use the capacitive sensing library for 11 sensors?  Each with one recieving pin, but all with a common send pin?
Soundcloud page: http://soundcloud.com/beefinator-2
Youtube channel: http://www.youtube.com/user/beefinator14
Old soundcloud page (ran out o

Grumpy_Mike

Probably not. They tend to interact with each other unless kept far apart. Even then the wires have to come close to go into the chip so unless you are using a PCB you will have trouble controlling the stray capacitance.
What exactly do you want to do?

sciguy

I play recorder, which isn't considered the coolest instrument, so I want to make a midi controller thatcan be played like a recorder.  Capacitive sensing would be best, because on a recorder, you don't put much pressure on the holes.
So, if it helps, I would want contact with the sensor to trigger,
Soundcloud page: http://soundcloud.com/beefinator-2
Youtube channel: http://www.youtube.com/user/beefinator14
Old soundcloud page (ran out o

Grumpy_Mike

The problem with that is that capacitive sensors go off just before you touch them. For this project you need something that will allow your fingers to rest on the switch and only register a contact when you push. This means some form of contact or micro switch.

sciguy

Hmmmm...  Contact switches need too much force.  Are there other typeS of switches the right size that require little force to trigger, and are cheap?
Capacitive sensing seemed like a good idea.  Cheap, and relatively simple using the library.
Soundcloud page: http://soundcloud.com/beefinator-2
Youtube channel: http://www.youtube.com/user/beefinator14
Old soundcloud page (ran out o

Grumpy_Mike

Quote
Capacitive sensing seemed like a good idea.


Yes the seem to be but actually they are not. Believe me I have tried it.

RIDDICK

#6
Nov 15, 2009, 09:22 pm Last Edit: Nov 15, 2009, 10:33 pm by RIDDICK Reason: 1
i use currently a 13 keys one-hand-keyboard...
the keys r made of metal foil on cardboard covered with duct tape...
then i measure the charge-time via a thin wire and a mux (4067)...

i can even estimate the surface that is touched by my finger...
the surface is related to the pressure...

-arne
-Arne

PaulS

Quote
Contact switches need too much force


Depends on the contact switch. Might be interesting to attach copper foil around the holes on the recorder, and copper pads on the fingers of gloves. Add thin flexible wires to the pads on the gloves, and to the foil on the recorder. Run all the wires to the Arduino. Homemade contact switches requiring very little force to operate.

Grumpy_Mike

Why not use a sandwich of conducting foam between conducting plates. They don't click and don't need much force. Measure them with an analogue input.

sciguy

Thanks for all the ideas.

RIDDICK:  could you explain how this works?

PaulS:  awesome idea!  I would need to get flat black gloves, and I could use conductive thread sewn into the fingertips.
Then I could put EL wire along the fingers and along the recorder.  Then, make a robot helmet, and use a vocoder controlled by the recorder.
Voilà!  Daft Punk playing recorder!  That would be totally epic.

Grumpymike:  how much does this conductive foam cost?  And where can I get it?
Soundcloud page: http://soundcloud.com/beefinator-2
Youtube channel: http://www.youtube.com/user/beefinator14
Old soundcloud page (ran out o

RIDDICK

#10
Nov 16, 2009, 12:44 am Last Edit: Nov 16, 2009, 12:48 am by RIDDICK Reason: 1
this is the circuit, that i use at the MUX output:

and here r some ideas about my little project.

nota bene:
the electrode must be covered with an insulator,
so that in case of an accident nothing happens to ur finger.

the "pulse" contact is 0V for discharging the sensor plate ("finger")
(u can use a diode to accelerate that process).
the "pulse" contact is 5V for charging the sensor plate.

here is the code, that i use:
Code: [Select]
const uint8_t kbd_pln = 2; // pulse pin
const uint8_t kbd_sln = 7; // sense pin
const uint8_t kbd_mln = 3; // 3..6
 const uint16_t now = time();
 if (now - kbd_last < 1000)
   return;
 kbd_last = now;
 while (PIND & (1<<kbd_sln)); // be sure that we r half-ways ready
 noInterrupts(); // intr disabled
 PORTD |= 1<<kbd_pln; // pulse line HIGH
 uint16_t i = 0;
 while (!(PIND & (1<<kbd_sln))) // count
   if (!(++i))
     break;
 interrupts(); // intr enabled
// 12:329 11:331 10:335 9:328 8:331 7:331 6:313
// 5:320 4:324 3:329 2:324 1:329 0:319
 kbd_mux_line = (kbd_mux_line>0) ? kbd_mux_line-1 : (kbd_c-1); // select next kbd mux line
 PORTD = (PORTD&~((((1<<4)-1)<<kbd_mln)|(1<<kbd_pln))) | (kbd_mux_line<<kbd_mln); // pulse line LOW (discharge cap)


-arne
-Arne

RIDDICK

"conductive foam":
ICs stick in it sometimes...
so that voltages r removed from the pins in order to avoid ESD...

ur supplier gives it away for free possibly...  ;)

-arne
-Arne

Go Up