What is the code to have my sensor measure weight of glass water?

I am using a JOY IT sen-pressure sensor and I am trying to set it up as a weight measurement for a glass of water. Is there a possible code for this?

Post a link.

I'm sure there is. It's the one that you write :slight_smile:

Have you looked at the datasheet of the sensor to find out how it works?
Have you looked for examples that show how to do a reading with that sensor?

Would this be what you have? If not how about a link to what you have including a data sheet? Nobody here, despite some very smart folks, is a mind reader.

Can it be done? Likely but a poor choice for your objective. You would do better with a sensor to measure the weight of the glass like a compression type load cell (a scale). Tare out the weight of the glass which only leaves the water in the glass.

Ron

Yes. But now I ordered a new FSR which square-shaped to see if that work.

The one that I currently have can only measure weight when I press the sensor very hard. It doesn't seem to react to my bottle of water due to how light it is.

I wrote the code from the manual of this sensor. But with this one, it seems to measure weight only when I press it very hard with my thumb. A glass of water doesn't seem to work due to how light it is, even filled fully.

Well, if it measures up to 10 kg and a glass of water weighs 0.2 kg plus the glass, the precision range of the sensor might be way higher than the weigh of the water glass.

That is a force-sensitive resistor. They are not generally useful as a pressure sensor, or to weigh things.

This diagram from the data sheet helps to see why:

Capture

Based on the formula in https://joy-it.net/files/files/Produkte/SEN-Pressure10/SEN-Pressure_Manual_2023-04-04.pdf, the board is nothing more than a voltage divider.

I think you wired it incorrectly; what happens if you swap Vcc and GND around?

I don't have experience with FSRs but I'm not surprised... :frowning:

I'm not sure if a strain gauge will work with light loads either.

I found this about lab balances which can precisely weigh a very-small mass.

I have a postal scale but I don't know how it works. It CAN"T be TOO complicated because it wasn't expensive and you can buy a little pocket scale (like drug dealers might carry) for about $10 USD.

You can also buy a little digital kitchen scale (more like what you want) inexpensively.

OK in the interest of making things simple if I wanted to measure the weight of a glass of water I would use, as I mentioned, a compression type load cell.

Something like this which includes a HX711 amplifier module. I would get the 1 Kg flavor.

Load cells come in a dozen designs so you choose one that fits your design plan.

Above is pictured a load cell similar to what I linked to. The scale platen would sit atop the cell. The platen being your platform.

Ron

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.