FSR - the best bed occupancy sensor

Here’s my sensor output

Your sensors are 17cm wide compared to the 60cm sensors used in this project, but if it works for you go for it.

What was the measured in and out of bed resistance?

Are your FSRs resting on a hard surface?

They do need to.

not really sure that works for me ?

your using a long length ‘yes’ but which is NOT very wind at all so your area of coverage isn’t a lot

where I’ve chained two sensor pad as one covering a lot larger area

at the end of the day it works and that’s all that matters

It works for everyone here. You don’t need to measure down the bed, just across it. And this covers a lot more.

Hi, I was playing around and did manage to get it working without using any resistors!
I am reading the value of A0, when not in bed, it reads around 7-10, when in bed, 1024.
I am curious, what is the use of R1?
Using ESP8266 (nodemcu v2)

image

The nodemcu has an on board voltage divider. The ESP ADC has a 0-1v input range. This voltage divider allows 0-3.3v input to the board.

You are placing the FSR variable resistor in series with one of these resistors.

Sounds like you have quite a wide resistance range from in to out of bed compared to the values of the on-board resistors, so this will work but if that were not the case you would see a poor voltage response. Additionally some boards do not have this voltage divider. In which case you would just be pulling the ADC input high and you would see no input variation.

Untitled

Brief question regarding the calculation of R1: Unoccupied, my FSR has a very high resistance - too high for my multimeter to measure it. Occupied it’s more like 3 kΩ to 10 kΩ.

Assuming 100 MΩ (for infinity), the equation yields around 500 kΩ for R1:

R1 = sqrt(3000*100000000) = 547722

Does that make sense?

What is the maximum your meter can read?

In bed it’s probably MegOhms.

According to its manual (it’s a Voltcraft VC270): 40 MΩ. It also has a low impedance mode, then it measures ~ 400 kΩ when unoccupied…

Which FSR did you buy?

The Sparkfun one has a 10M off resistance.

But yeah anywhere between 500k and 300k should do.

A China knockoff from eBay: SF15-600 10 Kg Widerstands-Dünnfilm-Drucksensor Kraftsensor | eBay

Do you have more information on the Grove Port you used and the wiring, etc? I’d love to steal this setup! I’ve been using Withing Sleep units and they work great, just WAY TOO SLOW.

Just came around to update the documentation for my final installation if anyone wants to use my pcb and case design: GitHub - fhb/FSR-bed-sensor-Lolin-ESP32-C3: FSR Sensor using an Lolin ESP32-C3 pico (pin compatible to Login ESP32-C3 mini)

4 Likes

At the basic level I’d probably agree with you, however, this setup provides a nice level of adjustability to compensate for different people’s weights without having to mess around with different hardware. Something that picks up a 250lb person may not accurately pick up a 150lb person. Or may be sensitive enough to pick up both but also gets triggered by the dog being on the bed.

Different requirements for different use cases.

Interesting side benefit to this setup that my wife and I discovered is that we can look at the sensor trace and get an idea of the quality of our sleep. It’s sensitive enough that you can pick out when you toss and turn through the night. It’s come in handy having that information to help diagnose sleep quality issues.

Hi, thanks for this project! I’m currently using it to turn my room light on if my grandpa got up from his bed, so I can check on him at very late hours. Very useful for taking care of old people.

For what is worth, instead of using regular resistors I opted for a 100k potentiometer (I used a preset) so I can calibrate after installation and even after changing mattress or if other person will use it.

Has anyone tested it on a bed without a slat?
My bed looks like this:

if have a boxspring with 3 parts. will this work or do i need another setup?

upper lvl: Topper foam (8cm)
milde lvl: Spring mattress (28cm)
lower lvl: Bedframe - spring Box (30cm)

Hi all, any electrical advice. My FSR is almost at infinity or at least 5+Mohms when no one is in the bed and when someone is in the bed it drops to 0.5Mohms. Any advice on what R1 should be for the voltage divider to work?

Cheers

I bought 2 sensors, and both have a very large variation without anyone in the bed. Readings between 0.800 and 20+ megohm with empty bed.
I don’t have much experience in electronics, but I’m thinking of putting a 600k resistor between the sensor tips. That way when you don’t have anyone in bed the maximum will be 600k. And then I do the math:

R1 = SQRT( Rin_bed * 600000)

Would this work or am I missing something?