Sharp Infrared Distance Sensor 2Y0A21
With this infrared distance sensor from Sharp, you can measure distances within the range of 10 to 80cm. Due to its small size and fast measurement times, the infrared sensor is perfect for robot projects where you want to dodge obstacles. The analog output can be easily evaluated on an Arduino. There, a voltage of 3.1 V corresponds to 10cm and falls proportionally to 0.3 V at 80cm. The distance can be easily calculated using the following formula: Distance (cm) = (3027.4 / AnalogValue)^1.2134. To achieve as precise values as possible, you should calibrate the sensor by taking comparison measurements before use. In our online shop, you can also buy many other components for your Arduino projects, just take a look around!
If you have any questions or problems with the control, or have suggestions for the product description, simply send us an email or use the rating function. We are happy to help.
Connections:
- Red = +5V
- Black = GND
- Yellow = Analog Voltage (3.1V to 0.3V)
Downloads:
Arduino UNO Code Example
int AnalogValue; int Distance; void setup() { Serial.begin(9600); } void loop() { AnalogValue=analogRead(0); Distance=pow((3027.4/AnalogValue), 1.2134); Serial.println(Distance); delay(100); }
Technical Details:
- Measurement range: 10 - 80cm
- Supply voltage: 4.5 - 5.5V
- Operating current: approx. 30mA
- Analog output: Non-linear to distance
- Time per measurement: 38.3ms ± 9.6ms
- Cable length: 20cm
- Weight: 8g
Delivery contents:
- 1x Sharp Infrared Distance Sensor 2Y0A21
- 1x Connection cable
Sharp Infrared Distance Sensor 2Y0A21
- Brand: purecrea
- Product Code: 420257
- Availability: In Stock
-
CHF12,90
- Ex Tax: CHF11,93
Related Products
Tags: Sharp, Module, Arduino, Sensor, Breakout, Distance, IR, Infrared, Distance sensor, Distance sensor, Robot, Analog, 2Y0A21, GP2Y0A21YK0F