Quote:
Originally Posted by Phalanx
We used the Maxbotics EZ-1 last season using analog with good results.
The formula we used:
Mv =( (adc * 5000) / 1024 )
Inches = Mv / 10
Gave use the distance in inches for the version that used 10mV per inch.
It was changed from 10mV to 9.8mV
So in your case you might want to try:
Mv =( (adc * 5000) / 1024 )
Inches = Mv * 10 / 98
|
I was just looking at the datasheet for the newer versions with 9.8 mV / in. scaling, and it does not specify "9.8" but rather "
~9.8". The exact scaling factor for 5V power is (5000 / 512) mV / in.
It shouldn't make much of a difference, but that sort of thing bothers me.