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


I2C-It Y-Cable Harness

The I2C-It is a great sensor, and is only more so when used as part of a greater chain. Use the I2C-It Cable harness to hook them up!

$2.50 USD


LaserPING 2m Rangefinder Sensor Module

This is a Near-IR Laser Distance Sensor with 2M range, and 100% compatible to a PING))) Ultrasonic Distance Sensor.

$29.99 USD


SYSTEM 6-in-1 Universal Remote Control

A remote! Control! For controllify-ing all your remotes! Now this remote could be used as the classic universal type remote but hey what fun it that?!?! Use this remote to control Robots, scorpions, and other ThingMs....er...things! Well maybe not scorpions but snakes for sure!

$5.00 USD


Synapse LP201-002 Series Indoor Motion Light Sensor

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

$18.01 USD


QTR-1A Reflectance Sensor (2-Pack)

The QTR-1A reflectance sensor carries a single infrared LED and phototransistor pair in an inexpensive, tiny 0.5" x 0.3" module that can be mounted almost anywhere and is great for edge detection and line following applications. This sensor is sold in packs of two units.

$4.25 USD


LED Cube 3x3x3

This is a kit for a 3x3x3 cube of RGB LEDs. You can create a colour cube show with this kit, it actually look quite impressive, especially at night! You could always attach one of these suckers to your alarm clock and blast yourself awake with a multi-coloured spectacle!

$56.00 USD


Male Strip Pins - 11 per

Male Strip - 11 per Strip, gold flash surface on 0.1" spacing

$0.27 USD





Remember Me

Forgot Your Password?

Don't Have an Account?
Sign Up!