For your NXT or EV3
Accelerometer, Compass & Gyro
Motor Multiplexers & Controllers
Wireless Control
Sensor Adapters & Multiplexers
RC Servos, Mountings & Pneumatics

Sensor Kits
Flexi-Cables & Cable Extenders
Classroom packs of Flexi-Cables
Plugs and Connectors
Power Options
Other Robotics accessories

EV3 Console Adapter
EV3 Sensor Adapter for NXT or Arduino
EV3 Compatibility Info

Android App for NXT/EV3

Arduino Products
Shields and Controllers

Raspberry Pi Products
For your Raspberry Pi

Connect with us
Shopping Cart
Your cart is empty.

Ordering Information
Our Distributors
World Wide Shipping
How to Order and Pay
Paying by Credit Card
Your satisfaction is important to us
Site Map

Yondering ...
Coming Soon ...
End of Life Products
Robotics related Links

NXT Product Docs and Software
User Guides
EV3 Blocks
API's and Sample Programs
NXT-G Blocks
All Downloads

EV3 Programming Environment
Which Programming Environment do you prefer for EV3?
EV3 Home Edition
EV3 Edu Edition

[View Result]

Votes: 1239
Translate this site
Translate this site: (Courtesy of Google™)
Search Web Pages

Need Quote for your School?
Write e-mail to:
Need Technical Support?
Write e-mail to:
Note your order number in the support request.
You can find order number on your Packing-slip or Order confirmation e-mail.

Proud Supporter of:

Trinity College Fire Fighting Robot Contest.


8623 Mayland Drive
Henrico, VA 23294-4703 USA.
Phone: (804) 767-8116
Fax: (804) 747-5303
Official PayPal Seal
Motor powered Sharp GP2D120 infrared distance sensor interface
Dist sensor interface with GP2D120

This motor powered Sharp GP2D120 infrared distance sensor interface comes with Sharp GP2D120 sensor. Sharp GP2D120 can precisely and reliably read distance from 4cm-30cm. Sharp GP2D120 provides your RCX with capability of measuring distances from an obstacle.

Note that GP2D120 consumes more power than what RCX-active port can supply. Philo had suggested an idea to interface GP2D12 with RCX. His idea involved the concept of storing energy in a capacitor and using it once you have accumulated enough. However that costs speed and processing power. has come up this faster version of our GP2D120 interface due to requests from our customers.

This interface has a Power port, marked as 'P' and a sensor port, marked as 'S' to which you can attach standard lego wires from the bottom or wire with two pin female connector from top. The power port needs to be powerd in either direction in order to activate the sensor, you could also supply it with non-RCX power (i.e. external battery). The 'S' port would plug into any sensor port on RCX, and you can read it like a Light or a Touch sensor. Since the power supplied to this module is stable, it provides superior performance compared to non-powered interface.

This interface module can be attached to GP2D12 or GP2D120.
This interface module will work with NXT as light sensor attached using converter cables supplied with MINDSTORMS Education NXT set. Additionally, you may need external power source.

Using with ROBOLAB
Connect the 'P' port to motor port.
Connect the 'S' port to sensor port.

Write your program such that:
  • Motor Port is on with full power
  • Read from Sensor Port using Light Sensor Block
NQC Program
// Read FAST GP2D120 Sensor output and displays 
// raw value on RCX display (requires RCX 2 firmware)
// Connect Sensor wire to Motor B
// Mount Sensor on Port Sensor A

int value;

task main()
  SetUserDisplay(value,0); // Display "value" on LCD
  OnFwd(OUT_B); // Power Motor B 
  SetSensor(SENSOR_1,SENSOR_LIGHT); // Active mode: 

  until (false)
    value=SENSOR_1; // reads and display value
    Wait(5); // for 50 ms

Technical specifications
  • Power consumption 30mA.
  • Use as a LEGO light sensor.
  • Range: 4cm to 30cm.
  • Can be read once in 35 ms in normal operation mode.
  • Can be read continuously for any amount of time.
  • More sensitive and with more usable range.
  • Works with Active Sensor Multiplexer
  • Works with GP2D12 or GP2D120

For Application notes, data sheet, product details and technical bulletin for Sharp GP2D120, visit following URL:
GP2D120 Technical Information
Caliberation plot:
GP2D120 Calibration Plot

Use this plot to convert RCX reading to distance using GP2D120.
Note: Calibration may have 10% variation from sensor to sensor.
The sensor interface mounted on RCX:
GP2D120 interface on RCX

Photo of this sensor interface mounted on RCX.
What's Related
These might interest you as well
Photo Albums

Web Pages

Link Manager