To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 7313
7312  |  7314
Subject: 
Re: GP2D02 conversion
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sat, 15 Jan 2000 02:09:55 GMT
Viewed: 
682 times
  
In lugnet.robotics.handyboard, Ben Jackson writes:
In lugnet.robotics.handyboard, Jean-Michel Mongeau writes:
Does anyone how I could create a lookup table or an algorithm to convert the
output of the Sharp GP2D02 (0 to 255 = byte) to values between 10 and 80 cm,
which is the reading capability of the IR?

You mean like value = 10 + ((70 * b) / 256) ?

--Ben


Sorry for two messages about the same subject but after playing around a bit
more with it I got better results.  Here is the spreadsheet to calculate the
constants to convert the GP2D02 output to centimeters:

0.1233 1.0320 9.3078
GP2D02 Actual Calc Error^2
70 10 10.42 0.18
116 15 14.06 0.89
142 20 20.07 0.01
155 25 25.51 0.26
163 30 30.15 0.02
169 35 34.48 0.27
176 40 40.69 0.48
180 45 44.90 0.01
184 50 49.68 0.11
2.22

The cells from c3->c11 have an equation like: +$A$1*($B$1^(A3))+$C$1
The cells from d3->d11 have an equation like: +(B3-C3)*(B3-C3)
The cell D12 has the equation: +SUM($D3:$D11)
Use the Excel solver to minimize cell D12 by manipulating cells A1,B1, and C1

The IC lines to use the information would now look like:

float distance;
distance = 0.1233 * (1.0320^(float)GP2D02_15)+ 9.3078;

Barry



Message has 1 Reply:
  Distance Sensors
 
Hi All: Does anyone know of any good mini distance measuring sensors which can be used with a microprocessor? The required range is 0-30 mm and small size. Names of distributors would be greatly appreciated. Thank You. Raj (25 years ago, 25-Jan-00, to lugnet.robotics.handyboard)

Message is in Reply To:
  Re: GP2D02 conversion
 
(...) Actually, the GP2DO2's output is not at all linear. Plotting the output against the actual distance will show an exponential curve. Each one is slightly different so what I do is to make up a little table in Excel like: 0,0 70,10 116,15 142,20 (...) (25 years ago, 14-Jan-00, to lugnet.robotics.handyboard)

6 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR