Electronic – arduino – Measure diameter of a ball with Arduino

arduinoresistancesensortouch-panel

I'm trying to design a hand-held device which would allow to measure the weight and a size of a fruit (orange/apple).
For the weight I can use a load cell, but not sure how to measure the diameter.

What I'm thinking at the moment is a cone shape. The bigger the orange the farther it will be from the end of the cone.
What I can measure is the distance from the end of the cone to the orange or by measuring the distance from the end of the cone to where the orange touches the wall.

For the first one I could use some kind of resistive rod which the orange will push out and then measure the resistance.
For the second one I could use a touch bar sensor.

Any ideas what kind of elements I can use for either solution?
Can someone think of a better way to measure the diameter of an orange on the go with arduino?

orange

A little bit of a background: the quality of oranges in my local stores is not very good – you get a lot of dried out ones. The idea is that the heavier the orange given the same diameter the better it is (it contains more juice). I want to build a kind of hanging scale which you hold in your hand and put an orange in it – it will sense the diameter of an orange and it's weight and displays the "juiciness" of the orange. This way I can filter out the bad ones.

Best Answer

You might also consider measuring diameter using a linear encoder, which would add precision and accuracy at the cost of...cost. Or you could even go about it like digital calipers do - a mechanism based on varying capacitive and measuring phase shift of PWM signals (i.e. probably more complicated than is worthwhile).

But, better yet, use a slide pot, which is resistive and dead-simple to integrate. Sliders are relatively cheap and wouldn't necessarily require any external components - just reading voltage level through divider. You'd just need to be sure to get one longer than the greatest diameter fruit you expect to encounter.

On the other hand, the manufacturers who produce calipers and linear encoders opt for other methods - capacitance, inductance, Hall effect, magnetoresistive, optical, etc. - for increased precision (resolution) and accuracy. I expect that your application does not call for such precision, though.

In any event, you'd avoid the need for a cone, which adds a good deal of bulk to your portable device.