Tag: proximity

1 articles found.

Sharp IR Distance Sensor Library for Proteus V1.0: GP2Y0A21YK0F

Sharp IR Distance Sensor Library for Proteus V1.0: the GP2Y0A21YK0F with its STATUS panel and the Advance pop-up

Hello friends, I hope you all are doing great. Today, I am going to share the new Sharp IR Distance Sensor Library for Proteus V1.0. The Sharp GP2Y0A21YK0F is the small black sensor with two round eyes that robots use to see walls and obstacles: it measures the distance to an object from 10 to 80 cm with infrared light and gives it as an analog voltage, so any Arduino reads it with one analogRead(). Now you can test those projects in Proteus. Behind the part sits our own model, not a voltage source with a knob. It follows the datasheet: the output curve, a new measurement every 38.3 ms, the noise of each measurement, the 30 mA it draws, and its classic trap - an object closer than about 6 cm gives a voltage that looks like a farther object. You move the object in 5 cm steps, pick a preset, or run a sweep, an approach or a passing hand. You get two devices: a Simple device with a live STATUS panel and the object's controls, and an Advance device with a pop-up window and the test tools. The demo runs on our Arduino UNO V4.0 and needs no library. NOTICE: an analog distance sensor is easy to fake: one voltage source and a formula. We wanted more. Our GP2Y0A21YK0F measures in cycles like the real one, so a sketch that reads too fast, averages the wrong way or trusts an object that is too close fails exactly as it does on your desk. It took our team a lot of hard work. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the ...