Go Down

Topic: Need help with sharp ir GP2Y0A02YK0F distance sensor (Read 4 times) previous topic - next topic

GS88

Thank you very much. I will try as explained in the datasheet.

Could you please help me in another thing? I'm working with 9*1.2V battery for arduino power totale 9.6V.

The sharp ir sensor work from 4.5 to 5.5V. Do I need to stabilize the power out of arduino for my sensor?

Regards.

robtillaart

The Arduino makes 5V from the 9.6V by means of an LM7805 (voltage regulator) If you connect the rangefinder to the Arduino 5V pin it should work.

Have played with a rangefinder too, resulted in the multiMap() function for interpolation of the distances, see - http://arduino.cc/playground/Main/MultiMap
might be usefull,
Rob Tillaart

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

GS88

Unfortunatly no luck  :smiley-slim:

Spikes remain as you can see from serial output after adding 10uF capacitor as described in the ddaatasheet. Any hints?

I'm not doing any calculation, only value from sensor.

236
236
228 <--
238
237
236
236
238
237
236
238
236
236
237
236
236
238
228 <--
236
237
263 <---
237
236
237
236
236
237
239
236
236
236
237
228 <--
236
237
237
237
237
236
236
237
237
236
237
237
237
237
245 <--
237
237
236
237
241 <--
248 <--
237
236
236
237
237
237
232
236
236
236
237
237
237
243 <--
256 <--
237
236
236
236
236
237
237
237
237
236
237
236
237
237
237
237
238
237
243 <--

jraskell

Mid to low 200 values are in the range of voltages which correspond to the bottom of the non-linear range of readings from the Sharp sensor.  As a result, even moderate jumps in ADC values only correspond to relatively small changes in distance readings.  Perform the conversion calculations and see what kind of variation you are getting in terms of actual distance readings.

If you're within +/- 1 cm in real world operation, you're doing excellent.  If it's worse than around +/-3-5cm, then there's likely room for improvement.  Don't expect too much from these sensors.

Here's a good resource for linearizing the output from these sensors:
http://www.acroname.com/robotics/info/articles/irlinear/irlinear.html

GS88

Thank's a lot. Very good info you give.

I will try with distance calculation as soon as I can.
Below the distance formula used for this sensor in the shop where I bought it.

Distance (cm) = 9462/(SensorValue - 16.92)

You said to not expect too much from this sensor. Do you know any other Ir sensor with a range from 20 to 150cm or more?

Regards.

Go Up