Pages: [1]   Go Down
Author Topic: problem with sharp sensor GP2Y0A02YK0F  (Read 517 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
   
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 597
Posts: 33328
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 158
Posts: 2882
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 211
Posts: 13488
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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?
Logged

Rob Tillaart

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

Pages: [1]   Go Up
Jump to: