Author Options:

Can you turn the metal frame of a mattress into a giant capitative sensor? Answered

Can you turn the metal frame of a mattress into a giant capitative sensor? Like can you detect if someone lies down on the mattress. What do i need to get this to work? 


The Ideanator

Best Answer 8 years ago

Why capacitive though? You would be better off with pressure sensors.

The Ideanatororksecurity

Answer 8 years ago

strain gauges hadn't crossed my mind, but it had occoured to me that a contact mic (piezo element) could be used

orksecurityThe Ideanator

Answer 8 years ago


If you want something cheaper than straingauges: Switches with springs strong enough to hold them open against the weight of the bed... barely. Add human weight and switches close. You'd probably have to build your own spring-and-switch assembly, but...

Making this insensitive to a cat or dog jumping onto the bed is left as an exercise for the reader.

Luigi Pizzolito

4 years ago

I did this before!

however It did not use capacitance it just NOISE!

all you have to do is put a long wire(antenna) on top of your bed, and one side on pin A0. Then put a buzzer from pin 12 to gnd. upload the sketch below, and when ever your lay/sit/touch/press a computer key/jump/etc.. you will hear a change in tone!


void setup() {


void loop() {

int val = analogRead(A0);

int vald = val + 500;

tone(12, vald);




8 years ago

Yes, you could do it. classic methods would be to make the "C" into part of an oscillator, and measure the change in frequency when a great big water tank lies on top of it.


Jack A Lopez

8 years ago

To get this to work, the object being sensed must lie within the electric field of the sensor, and you choose the geometry of your electrodes (or plates) based on that.  One trick is to make the electrodes of your sensing capacitor out of alternating parallel wires.  

However, as Id suggested, I think a pressure sensor, or switch, might be easier to implement, and it would achieve the same goal.