The HC-SR04 is an excellent low-cost ultrasonic sensor that works really well with Arduino micro-controllers.
How do they work?
These sensors are very easy to use. First connect the VCC and GND pins to the Arduino’s +5V and GND pins. Next connect the Trigger and Echo pins to two digital pins on the Arduino, perhaps pins 2 and 3 for example.
Setting the Trigger Pin to HIGH for 10 microseconds will activate a measurement reading and then the pulseIn() function can be called on the Echo Pin to determine the distance. The length of the incoming pulse is proportional to the distance measured.
However, rather than writing this code yourself, we recommend using the excellent NewPing library for the Arduino.
Why should I buy these from Super Awesome Robots?
We import these components from China and put them through quality control to ensure they are 100% working. We usually ship orders within 24 hours (from Colorado).
What if I need to connect lots of these to a single Arduino without using too many pins?
Check out our Octasonic breakout board for connecting 8 of these sensors to an Arduino using only one dedicated pin.
- • Power Supply :+5V DC
- • Working Current: 15mA
- • Effectual Angle: < 15 degree
- • Ranging Distance : 2cm - 400 cm/1 inch - 13ft
- • Resolution : 0.3 cm
- • Measuring Angle: 30 degree
- • Trigger Input Pulse width: 10uS
- 1pc *HC-SR04 Ultrasonic Sonar Sensor