Sharp GP2D120 IR Sensor

OrdinaryDave

New Member
Sharp GP2D120 IR Sensor Problems

Hi there. I'm completely new to the forum, and completely new to building robots, too.

I'm trying to connect a Sharp GP2D120 to a Picaxe 28x1, but I'm having trouble. The readings I get for it just fluctuate around 120 - 140, and bare no correlation to how far away something is (which is what it should be measuring).

Here's a picture of the analogue in part of the board, where the white line represents the signal cable from the sensor. The power and ground cables are connected elsewhere. The blue lines are short wires.

http://www.b3tards.com/u/a4ccb79cb7aa28350d3d/circuit.gif

As I say, I'm a complete novice, so I've probably done something really, really stupid. Any help would be really appreciated. :)

[Edit] I've been following this tutorial, by the way: http://letsmakerobots.com/start
 
Last edited:

OrdinaryDave

New Member
Ok, an update. I switched the signal wire from the hole it's in the the pin next to it. But now get a solid reading of 225.

I really wish they'd supplied a manual with the sensor. -_-

Any help much appreciated.
 

OrdinaryDave

New Member
Welcome to the Forum.

Perhaps

http://www.picaxeforum.co.uk/showthread.php?t=8921&highlight=Sharp+GP2D120

http://document.sharpsma.com/files/GP2D120-DATA-SHEET.PDF

But, most importantly,
please post:

Your complete circuit/schematic
Your complete program

e
Thanks a lot, I'll have a browse through those.

Here's a picture of my whole circuit board, with labels: http://www.b3tards.com/u/a4ccb79cb7aa28350d3d/circuitphoto.jpg

The program is simply

Code:
main:

readadc1, B1
debug

goto main
I'm a complete noob, so I've probably done something in the circuit which you can't do, but I'm too stupid to realise...

Thanks a lot. :)

[Edit] IT'S FIXED! Turns out it was just my dodgy soldering skills. :D

I HAVE MY FIRST ROBOT! *Does a happy dance*
 
Last edited:
Top