Pages: [1]   Go Down
Author Topic: Capacative Pressure Sensor  (Read 1372 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everyone, I'm trying to put together a "pressure sensing pad", my goal for is to detect if I'm still lying in bed sleeping when I should be up.

My pad would consist of two metal plates(foil) with foam in between them, when a weight is applied the foam is compressed and the two plates moves closer to one another. This would change the capacitance right?

What I need is for my Arduino to measure the change in capacitance. Is this possible?
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
my goal for is to detect if I'm still lying in bed sleeping when I should be up.

I thought that was managed by something called "will power".
Logged

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12169
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, sounds pretty plausible - you could use a capacitive bridge using the sensor and a fixed capacitor of roughly equal value.

join the two capacitors and connect to an analog input.  The other lead of each cap goes to a digital pin via a 150ohm resistor, and you feed the digital pins in anti-phase.  To centre the analog pin connect it to both GND and 5V via two 10M ohm resistors.

The amplitude and phase of the signal on the analog pin depends on the relative capacitance values.  Code something like this might do the job (well I haven't tested this, so a pinch of salt advised):
Code:
void  loop ()
{
  digitalWrite (dpin1, LOW) ;
  digitalWrite (dpin2, HIGH) ;
  int difference = analogRead (apin) ;
  digitalWrite (dpin2, LOW) ;
  digitalWrite (dpin1, HIGH) ;
  difference -= analogRead (apin) ;
  if (difference > threshold)
    digitalWrite (outpin, HIGH) ;
  else
    digitalWrite (outpin, LOW) ;
}
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
my goal for is to detect if I'm still lying in bed sleeping when I should be up.

I thought that was managed by something called "will power".


Yeah not for me, I use two and sometimes three alarm clocks, I sleep through them all on occasion.
This is actually a serious problem for me.
Logged

Pages: [1]   Go Up
Jump to: