FSR - the best bed occupancy sensor

I ordered a sensor from Amazon that is 60 cm and looked similar but not exactly the same as ops. The range spec was 10g to 10kg. Without mattress, with mattress or with mattress and person on top of the sensor, the resistance was out of range with my multimeter set in the mega ohm range. Only if I am pushing directly on the sensor with my finger was I able to bring the resistance down to the 50k ohm range.

I wonder if it’s because my bed (memory foam) has really good weigh distribution so the sensor is not feeling any significant weight. My solution is to prop up the sensor by elevating it on the slates using a strip of ply wood. With that I am able to get sensor to produce a resistance of 10k ohm. I would suggest trying that to see if you can lower the resistance down that way.

1 Like

Updated the first post to use a number entity instead of an input number.

3 Likes

Hi all, I’m trying to build my sensor. I already have all the components and have measured the resistance of the FSR in and out of the bed.

My values are .50 out of the bed and .25 in bed using the multimeter in the 2M mode.

With this values, what is the resistance value that I need to use? I’m pretty noob in electronics.

Any help will be really appreciated.

Put the numbers into the equation in the first post.

I bought a bunch of different round ones for another use but haven’t played with them yet.

I was planning on investigating if they could be coupled with a Xiaomi door sensor (but sounds like this is unlikely to be reliable, as per some discussions in this thread). I was going to try using them for seat occupancy.

I was thinking about trying to use one for bed occupancy, since I have a bunch of them. Perhaps one with the right rating may work ok. Maybe they could go under just your head etc? I guess they’re unlikely to work as well as a long linear one.

I bought from here with no problems.

AU $2.42 7%OFF | 1kg 3kg 5kg 10KG 20KG 30kg 50KG 100KG 150KG Film Pressure Sensor Resistive Force Sensitive Plantar Flexible Robot FSR Insole

1 Like

3 posts were split to a new topic: Tasmota Bed Sesor

Thanks for the project idea, I just finished mine up and installed it this morning. I’m trying to keep everything zigbee so went with an aqara door sensor instead. It’s designed so I can pick up which side of the bed is occupied, but only had one door sensor on hand, so it’s tied together for now.


7 Likes

Keen to hear how reliable this is with the Aqara sensor. Could you add a little detail about your battery upgrade too please?

I can’t speak to reliability; I just installed it today. In testing it has been 100% repeatable, triggers on my body weight but not the dogs, no false triggers and clears instantly.

Due to the low resistance when the FSR is compressed, I was concerned about battery life, with the stock battery I estimated the battery lasting less then 30 days with the voltage divider alone, not including whatever draw the door sensor has. With the CR123A it should be several years. They are both 3v, so it’s a 1 to 1 swap.

I used a LM393 as a voltage comparator, when the FSR is compressed the voltage to the LM393 increases which causes the output to pull the 1v line to ground on the door sensor which registers as closed. The set point can be adjusted using the 50K pot.

This is the circuit, half of it anyways, the LN393 has two channels, so I’m using on for each FSR.

7 Likes

Great post. Quick question. I followed the instructions and my side if the bed there is no issues at all. But my partner is a lot lighter than me and sensor does not detect her at all when she is on bed. I put the sensor between mattress and slat box spring base. Any suggestions to get lighter folks with this set up ?

How did you choose R1?

With your weight or hers?

That is a good point. With mine. Maybe I should calculate it properly. I just tried higher and higher resistors but that was probably not a good idea.

Yeah. The instructions were written like that for a reason.

1 Like

Great contribution! I have already received the 60cm fsr and have tested it with a wemos d1 mini. Is this circuit sure correct? I’ve tried it and it doesn’t work for me. I have seen other circuits with Arduino and esp8266 but there are quite different, it may work better? I’ll try it if that works. This would be the example:

2 Likes

I’ve managed to get this sort of working but would like some advice if possible.

I had the issue where I was getting infinite resistance up to 2M ohms so through trial and error I’ve discovered a working resistor for at least one side.

I have 2 sides set up and my side is working very well whereas my partners side is a little trickier. For my side, I have a 100K resistor and the voltage stays steady at 3.15v and drops to <1V when I’m in bed, perfect.

My partner is a lot lighter than me so due to the resistors I have, I’ve got a 100K and 2 18K in series and this seems to be working ok. It could be better but the next size I have is 47K and this just makes the empty bed voltage fluctuate. I don’t really want to keep linking resistors in series a it’s going to get messy when I add it to a soldered board.

I bought a 100K potentiometer as I think this would be a good option to tune the resistance but not thinking, this would need a 100K before it so not ideal. My plan is to buy a 200K potentiometer but I’m not 100% sure about how to wire it. There will be 3 pins so I’m just wondering how it would all connect using the potentiometer and to make sure this plan is sound.

My next plan is to solder this all together on a soldered breadboard so that it is a more permanent solution and 3d print an enclosure.

I’ve also got a 4 channel relay board connected to this controlling my TV bed, I don’t know if it’s coincidence but 2 of the relays have failed since I setup the bed sensor so I don’t know if that’s related.

Either way, I’ve ordered a new ESP32 and a new 4 channel relay board and a soldered breadboard as I want to make this permanent.

Should I order a 200k potentiometer and could someone please advise how it connects? Thank you :slight_smile:

All the way clockwise it will be 200K, all the way counter-clockwise it will be 100K.

Untitled

Just performing the calculations in the first post would be easier.

1 Like

Thank you so much :slight_smile:

I tried the first calc but it didn’t work for me, my multimeter only reads up to 2M and with the bed empty and under the matress, the meter was reading infinite and bed loaded was reading around 15K. It’s memory foam so must spread the load very well as it’s a very heavy! I read somewhere to assume 5M based on someone having a similar issue and that was a good place to start. That works out to be around 273K but whenever I used anything close to this, it would be very sensitive but the voltage when the bed is empty would not stay stable.

Basically it would read 3.15V then steadily drop to about 0.5V over about 20 seconds, rise back up to 3.15V and repeat.

I tried a few different combos and basically went blind until I settled on 100K which is ideal for my side as it stays steady at 3.15 and drops to <1 with me in bed and fluctuates around 0.2 to 1. Using the same 100K on my partners side, only drops to about 2.9 and fluctuates back to 3.15.

At 136K, my partners side goes to about 2V but ideally I could get it lower.

Unless I connect a lot of resistors in series I’m limited to how close I can get as 147K makes the voltage fluctuate too much when empty so the sweet spot is somewhere between 136K and 147K (I hope!)

Using the potentiometer also makes it easy to adjust if one of us changes weight.

Thanks for the advice :slight_smile:

I calculated the R1 as suggested in instructions and i get 750k i would need. Not sure how to find such resistor but I’ll look into the potentiometer as suggested.

Wondering if this high resistors are due to foam mattress are deformed less than spring mattress so light people just cause very minor changes in mattress structure. Wondering if anyone has experimented putting the sensors in top of mattress inside of a topper that way it takes out the need to use huge resistors.

R1 could be several resistors in series.
So R1 = R11+R12+R13…
I have never bothered to learn the values of resistors so I can’t advice on the resistors to use but if you put the in series then you should be able to get close (enough).

750K is a standard value in the E24 series.

1 Like