Unknown: Creation of dynamic property Request::$request is deprecated in /home/bastelga/public_html/74/system/library/request.php on line 26Unknown: Creation of dynamic property mysqli::$report_mode is deprecated in /home/bastelga/public_html/74/system/library/db/mysqli.php on line 15Unknown: Creation of dynamic property Session\DB::$db is deprecated in /home/bastelga/public_html/74/system/library/session/db.php on line 8Unknown: Creation of dynamic property Proxy::$getTranslations is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__construct is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__get is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__set is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: mysqli::real_escape_string(): Passing null to parameter #1 ($string) of type string is deprecated in /home/bastelga/public_html/74/system/library/db/mysqli.php on line 53Unknown: Creation of dynamic property Proxy::$getLanguage is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$getLanguages is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__construct is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__get is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__set is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Cart\Customer::$config is deprecated in /home/bastelga/public_html/74/system/library/cart/customer.php on line 14Unknown: Creation of dynamic property Cart\Customer::$db is deprecated in /home/bastelga/public_html/74/system/library/cart/customer.php on line 15Unknown: Creation of dynamic property Cart\Customer::$request is deprecated in /home/bastelga/public_html/74/system/library/cart/customer.php on line 16Unknown: Creation of dynamic property Cart\Customer::$session is deprecated in /home/bastelga/public_html/74/system/library/cart/customer.php on line 17Unknown: Creation of dynamic property Proxy::$getCurrencyByCode is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$getCurrencies is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__construct is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__get is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Proxy::$__set is deprecated in /home/bastelga/public_html/74/system/engine/proxy.php on line 30Unknown: Creation of dynamic property Cart\Currency::$db is deprecated in /home/bastelga/public_html/74/system/library/cart/currency.php on line 7Unknown: Creation of dynamic property Cart\Currency::$language is deprecated in /home/bastelga/public_html/74/system/library/cart/currency.php on line 8Unknown: Creation of dynamic property Cart\Tax::$config is deprecated in /home/bastelga/public_html/74/system/library/cart/tax.php on line 7Unknown: Creation of dynamic property Cart\Tax::$db is deprecated in /home/bastelga/public_html/74/system/library/cart/tax.php on line 8Unknown: Creation of dynamic property Cart\Weight::$db is deprecated in /home/bastelga/public_html/74/system/library/cart/weight.php on line 7Unknown: Creation of dynamic property Cart\Weight::$config is deprecated in /home/bastelga/public_html/74/system/library/cart/weight.php on line 8Unknown: Creation of dynamic property Cart\Length::$db is deprecated in /home/bastelga/public_html/74/system/library/cart/length.php on line 7Unknown: Creation of dynamic property Cart\Length::$config is deprecated in /home/bastelga/public_html/74/system/library/cart/length.php on line 8Unknown: Creation of dynamic property Cart\Cart::$config is deprecated in /home/bastelga/public_html/74/system/library/cart/cart.php on line 7Unknown: Creation of dynamic property Cart\Cart::$customer is deprecated in /home/bastelga/public_html/74/system/library/cart/cart.php on line 8Unknown: Creation of dynamic property Cart\Cart::$session is deprecated in /home/bastelga/public_html/74/system/library/cart/cart.php on line 9Unknown: Creation of dynamic property Cart\Cart::$db is deprecated in /home/bastelga/public_html/74/system/library/cart/cart.php on line 10Unknown: Creation of dynamic property Cart\Cart::$tax is deprecated in /home/bastelga/public_html/74/system/library/cart/cart.php on line 11Unknown: Creation of dynamic property Cart\Cart::$weight is deprecated in /home/bastelga/public_html/74/system/library/cart/cart.php on line 12 Sharp Infrared Distance Sensor 2Y0A21 - Bastelgarage Electronics Online Store

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:

Sharp_2Y0A21_Datasheet.pdf


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


Write a review

Note: HTML is not translated!
    Bad           Good

Sharp Infrared Distance Sensor 2Y0A21

  • Brand: purecrea
  • Product Code: 420257
  • Availability: In Stock
  • CHF12,90

  • Ex Tax: CHF11,93

Tags: Sharp, Module, Arduino, Sensor, Breakout, Distance, IR, Infrared, Distance sensor, Distance sensor, Robot, Analog, 2Y0A21, GP2Y0A21YK0F