I2C-It Sharp IR Distance Sensor (10 to 80cm range)


This Product Has Been Discontinued, This Page Is For Reference Only.

16.45 USD
$16.45 ea.

We've turned this excellent standard-range Sharp IR sensor into something faster, and I2C compatible!

Description [Hide]

The Sharp GP2Y0A21YK0F is an excellent, well proven sensor, designed for giving you an analog voltage output for you to read into your microcontroller as an analog value. But it isn't a linear value, so there's some funky math or complex lookup-tables to generate to make this data useful. And being analog, it will eat up an analog channel of your microcontroller.

The I2C-It uses this great sensor mated to a smart add-on board that does the math and gives it back to you on an I2C interface! Simply ask the sensor for a distance reading in raw, inches, or centimeters, and it will pop the answer back immediately. No additional coding, and you can chain up to 8 of the same sensors together to your I2C bus (the bus supports up to 127 devices total). Being an open-source project, you can leverage our several man-days of testing multiple sensors and make your I2C-It behave any way you wish!

Check the resources tab for code examples on how to use the I2C-It with your microcontroller.

Technical Data

Operating Voltage Vcc 4.5 to 5.5 V
Operating Temperature Topr -10 to +40 C
Maximum Cable Length CLmax 35/14 cm/in
I2C Clock Frequency SCL 100 kHz
Bus pull-up Resistance Rline 1.2k to 10k ohms
Required Current Icc 35 to 55 mA


Some popular Microcontrollers that support I2C in hardware ("bit-bang" emulation is possible) include:

18A ATmega8 12F675 BS2p24
18X ATmega8L 16F876A BS2p40
28X1 ATmega32L 16F877A BS2pe
40X1 ATmega48V 18F4525 BS2px24

ATmega88V   Propeller
  ATmega328   Spin Stamp


Devices Addresses

Now, it's a simple set of I2C commands to send or receive data to your desired sensor. By default, the sensor's address is DEC 32 (0x20). Each sensor supports four basic commands. To receive the distance reading from the specified sensor, you need to send 1, 2 or 3 (DEC code) to the spec address. The sensor will respond with distance in inches, cm or RAW code accordingly. Also you can change the default address to any address from: 32 (0x20), 34 (0x22), 36 (0x24), 38 (0x24), 40 (0x28), 42 (0x2A), 44 (0x2C) or 46 (0x2E) by sending 5 (DEC code) + new address (2 bytes) to the target sensor.

I.e. Using Arduino, to change the address from decimal address 32 to 42, your sketch would use:

Wire.beginTransmission(32); //Starting address
Wire.write(byte(42)); //Address is changed to this

Note: After changing the address please remove power from the sensor and power it back up for the address change to take effect, you may also have to reset your microcontroller in order to communicate via I2C again.

The I2C-It is configured to only read a single distance sample and return that result to you - it is not spending time watching multiple samples to average out the distance to the object. It is generally a good idea to request multiple samples from the I2C-It to make sure you're seeing what you think you're seeing, but we figured we'd leave that up to you to decide. We designed the I2C-It to give you back a single measurement, as quick as it can!

Please Note: With our latest update, you no longer have to select your address via solder-jumpers on the back of the device. Jumper 3 being soldered will actually now keep the ATtiny45 chips in a constant reset state if soldered so the sensor will not work as long as this jumper is soldered. As an added bonus for this update, the ATtiny45 on-board now has the ability to be ISP re-programmed if one were to want to change the firmware.

Documentation [Hide]

You Might Also Like [Hide]


Sharp Sensor Cable, 20cm

You'll save tons of time and won't need the soldering iron for these Sharp infrared sensor cables! These cables allow you to easily interface Sharp infrared sensors to your robotics project without the need for soldering.

$1.95 USD


Servo S03N

The GWS S03N servo is a good, solid workhorse if you have a need for inexpensive reliable servos.

$11.95 USD


Motor Driver

The SGS Thompson L293D is one of the most common motor driver chips, with built-in protection from the abuse motors can create.

$3.50 USD

BHoldAA 4 Cell

4 x AA Battery Holder

It's a nice quad-AA battery holder, with 6" leads.

$2.75 USD


GM Series Plastic Wheels

2-5/8" diameter wheels for the GM2/3/8/9 gear motor.

$3.25 USD


Solarbotics I2C Shift Leveler

This little I2C adapter will have you shifting signals with ease in no time flat.

$8.95 USD


I2C Real-Time Clock

The I2C-RTC board is a 6-pin CMOS Real-time Clock device using I2C bus. There are no external components required.

$17.99 USD


Synapse LP201-002 Series Indoor Motion Light Sensor

Synapse modules with built-in light and occupancy sensor. Small, tidy, and battery powered.

$75.00 USD


Ardweeny BackPack with Blue LEDs

The BLUE LED Ardweeny BackPack - free your Ardweeny from the breadboard, and set it free to the world!

$16.85 USD


Dual Comparator

The LM393 is a dual-comparator chip that is the heart of the popular "Sandwich bot" project in the book "Robot Building for Beginners"

$0.50 USD





Remember Me

Forgot Your Password?

Don't Have an Account?
Sign Up!