View Single Post
  #5   Spotlight this post!  
Unread 20-02-2008, 00:39
pogenwurst pogenwurst is offline
Ubuntu User
AKA: Brian
FRC #2007 (Robots of the Round Table)
Team Role: Leadership
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Duluth, GA
Posts: 78
pogenwurst is on a distinguished road
Send a message via AIM to pogenwurst
Re: Parallax and Maxbotix ultrasonic sensors

Quote:
Originally Posted by Phalanx View Post
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.