Go Down

Topic: problem with sharp sensor GP2Y0A02YK0F (Read 603 times) previous topic - next topic

softname

all power connections are given as per datasheet..and Vo of sensor wired with arduino A0(analog pin) .i measured three times of volts across A0 and Gnd with various distance of object from 20cm to 150cm. and i plotted graph for it .but its not matched with graph given by datasheet. what is the problem..how to rectify it. how to convert volts into perfect centimetre.

following datas i measured

distance in cm                volts in V
10                                  2.72
20                                  2.47
30                                  1.92
40                                  1.73
50                                  1.70
60                                  1.80
70                                  1.91
80                                  2.05
90                                  2.12
100                                2.18 
110                                2.24
120                                2.29   
130                                2.36
140                                2.39
150                                2.42
   

Grumpy_Mike

It looks like your readings have little correlation with the distance at less than 30 cm. Have you seen what the minimum detection distance is?

How stable are the readings? It could help if you put a 0.1uF capacitor between the analogue input and ground.

Quote
how to convert volts into perfect centimetre.

You can't.
Distance sensors like this are not very accurate. You can try taking 10 readings and averaging them to get a more consistent result.

oric_dan

The Sharp rangers already perform averaging internally, on multiple readings taken
over 50-msec. This is why they're not super good for use on fast moving robots, etc.

OP, were your readings taken via the Arduino ADC, or measured using a DMM directly?
They seems all backwards. The other thing to remember is, these sensors all have a
fold back in their response curves for short distances.

robtillaart


how did you measure the voltage?
a voltmeter or with an Arduino?
Is your power source constant enough?

If measured with an Arduino can you post your code?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up