1

I want to measure the density of object and I need to get the volume and weight of the object. What sensors do I use to measure density?

closed as off-topic by goobering, Steve Robillard Dec 23 '16 at 18:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be specific to the Raspberry Pi within the scope defined in the help center." – goobering, Steve Robillard
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    I can't see the relevance to the Raspberry Pi. – joan Nov 29 '16 at 20:01
2

There are different ways to do this depending on how big the objects are and what you intend to do with them.

Getting the weight is relatively simple, there are USB scales available. The volume is a little bit more involved. The simplest way would be to have a water-filled container with a sensor for the water level. You would submerge your object under the water, the change in water level according to your sensor would be the volume of the object.

Of course, this is straight up simple if your object has a greater density than water (it would sink). If it doesn't you'd need some way of holding the object underwater, either by putting a weight on them, or attaching it (little hooks). In this case, whatever you use, just put it in the tank without the object when you start, so that it's volume is taken into consideration by your sensor.

Now, water level sensors don't directly give you the volume of water, they only give you the height of water. You can do some simple high school math to get the volume. Then density is mass divided by volume. I haven't seen any USB water-level sensors, so you may need to use the GPIO pins for that. And when you code this, it would be nice if your software has a simple "tare" function, for both the scale and the water level. Since we are talking about submerging objects, get the mass first, since wet objects weigh more.

  • 1
    It's worth pointing out that the water container needs to be of a diameter that isn't unreasonably large or it'll be very difficult to measure. – Jacobm001 Nov 29 '16 at 19:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.