Measure diameter of a ball with Arduino

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.