View unanswered posts | View active topics It is currently Thu Sep 18, 2014 9:59 pm






Reply to topic  [ 2 posts ] 
How to connect a Sharp GP2D12 to an NXT 
Author Message
Rookie

Joined: Thu Nov 25, 2010 12:20 pm
Posts: 1
Post How to connect a Sharp GP2D12 to an NXT
If you want to connect a GP2D12 Sharp IR sensor to an NXT cable, you'll need something to increase the signal, otherwise you will continually get the value "900" or something around there. (Where you should actually be receiving a value 0-1023 scaling to this distance).

You can solve this problem with a transistor or resistor. I got this working using a "2N 3906 PNP General Purpose Amplifier".

To wire this connect as follows.


Sharp sensor yellow wire <---> Middle transistor pin (Base)
NXT white wire <---> Left transistor pin with the flat side facing you (Emitter)
Sharp sensor black wire <---> Right transistor pin with the flat side facing you (Collector)
NXT green wire <---> Sharp sensor red wire
NXT black wire <---> Right transistor pin with the flat side facing you (Collector)

Don't use the other NXT wires.

With these 5 solder points, your GP2D12 should now give you values between 0-1023. Happy Soldering!


Thu Nov 25, 2010 12:34 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3223
Location: Rotterdam, The Netherlands
Post Re: How to connect a Sharp GP2D12 to an NXT
Thanks for that! If you have some pictures, that would be great :)

- Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Thu Nov 25, 2010 12:36 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.