Maker Pro
Maker Pro

Touch sensor

  • Thread starter Nicholas Sherlock
  • Start date
N

Nicholas Sherlock

Jan 1, 1970
0
Hey all,

I'm working on my first microcontroller project, with the AT90USBKEY
demonstration board from Atmel. I want to build a USB keyboard emulator
whose buttons are four touch sensitive panels. The user will be using
their feet and jumping on these panels (playing Dance Dance
Revolution). My skills lie firmly in electronics, not woodworking or
materials skills, so the simplest option (Building mechanical switches
for the panels) is out for me. Anyway, then I wouldn't get to play with
a microcontroller!

At the moment, I have one of my IO pins hooked up through a couple of
metres of ribbon cable to a 20cm*20cm single-sided blank fibreglass
board, which is my prototype touch sensor. My microcontroller switches
that pin to an input and enables the pull up resistor. This slowly
charges the pad up. I keep sampling the (digital) input pin until it
reaches the HIGH level. Based on how long the pad took to charge, I can
distinguish between a hand on the traces of the pad and nothing touching
the pad. When I'm done, I switch the pin to an output with a low logic
level, which discharges the pin.

However, the timing difference between these two states is not very
large. I probably don't have any safety margin to correct for a dirty
sensor, for instance. If my touch pad acted like a variable capacitor to
ground, I thought I could add a resistor between the microcontroller and
the pad to increase the time taken to charge. I added a 4K7 resistor
(After the ribbon cable), and the pad did take a little longer to
charge, but the difference between the "Hand on" and "Hand off" state
was smaller, if anything. I tried a 10M resistor, and now putting a hand
on the sensor makes no difference to the timing. So obviously my "Pad as
a capacitor" idea isn't quite right. What am I missing?

Cheers,
Nicholas Sherlock
 
P

Phil Endecott

Jan 1, 1970
0
Nicholas said:
Hey all,

I'm working on my first microcontroller project, with the AT90USBKEY
demonstration board from Atmel. I want to build a USB keyboard emulator
whose buttons are four touch sensitive panels.
At the moment, I have one of my IO pins hooked up through a couple of
metres of ribbon cable to a 20cm*20cm single-sided blank fibreglass
board, which is my prototype touch sensor. My microcontroller switches
that pin to an input and enables the pull up resistor. This slowly
charges the pad up. I keep sampling the (digital) input pin until it
reaches the HIGH level. Based on how long the pad took to charge, I can
distinguish between a hand on the traces of the pad and nothing touching
the pad. When I'm done, I switch the pin to an output with a low logic
level, which discharges the pin.

However, the timing difference between these two states is not very
large.

Try looking for the 50/60Hz hum that the user injects when they touch
the pad.


Phil.
 
N

Nicholas Sherlock

Jan 1, 1970
0
Phil said:
Try looking for the 50/60Hz hum that the user injects when they touch
the pad.

Would the user be as good of an antenna for mains hum as the cables and
metal pad themselves, though?

Cheers,
Nicholas Sherlock
 
R

Rich Grise

Jan 1, 1970
0
Would the user be as good of an antenna for mains hum as the cables and
metal pad themselves, though?

Yeah, if you use two pads back-to-back (like double-sided board) and
a differential input.

Cheers!
Rich
 
N

Nicholas Sherlock

Jan 1, 1970
0
Rich said:
Yeah, if you use two pads back-to-back (like double-sided board) and
a differential input.

Neat idea, thanks. :).

Cheers,
Nicholas Sherlock
 
Top