Arduino #10 - Ultrasonic HC-SR04 Range Sensor - Robotics Arduino Tutorial

preview_player
Показать описание
Relevant Tutorials:

In the 10th Tutorial we take a look at the HC-SR04 ultrasonic sensor. The sensor is a four pin device capable of sending an ultra sonic wave and capturing the returning signal. Based on the duration of the input signal, the user is able to figure out what the distance to the nearest device is.

The important functions in this tutorial are delayMicroseconds() and pulseIn().

- delayMicroseconds():
- pulseIn():

Get in touch:

Keywords & Search Terms:
Servo
Hobbyist Servo
RC Servo
RC Car
RC Plane
Servo Control
Motion Control
Robotics
Software Debouncing
Software De bouncing
Hardware Debouncing
Arduino Tutorial
Arduino Button
Arduino Debouncing
Hardware Button
LED Toggling
LED Blinking
LED Arduino
Speaker
Arduino Tone
Tone
Buzzer
Piezzo Speaker
Piezzo Buzzer
Arduino Sound
Arduino Music
Mario Arduino
Super Mario Theme
Mario on Arduino
Ultrasonic
Range Sensor
Range Detection
Range Finder
Robot Movement
Movement Detection
Movement Sensor
Arduino Movement
Рекомендации по теме
Комментарии
Автор

I don't care how old this video is - excellent! Thank you!!

johnx
Автор

Thanks for the video!

Is there a posted schematic diagram anywhere?

katelastoskie
Автор

You're right about the ultrasonic not moving in a straight line. It follows an inverse square law. 1/distance squared

tejara
Автор

do you have a downloadable version of your code? I copied it down and it seems to have errors for some reason?

johnathan
Автор

Thank you the tutorial was really helpful!
But please repair the microphone I lost three minutes of my life while I checked my headset LOL 

Автор

can you talk about how long does the sensor has 4 or 5 meter ?
also please talk about the range how can the sensor cover the the area in front of it ?is it 180 degree or not more 45 degree wide

alialghamdi
Автор

Thanks for this helpful video. Can it work as a water level sensor?

mohammedalaidaroos
Автор

Great tutorial! But can u plz tell me what's the value for the resistor u used ?

marouenebenameur
Автор

I can see that you're using a blue resistor. The image is too blurry to see which one it is. Can you please tell me? Thanks

missbittersweetcutie
Автор

where i can get ur all videos??please it really good

AlokKumar-kmpi
Автор

I have heard they use these in bowling alleys to detect strikes . What about half scale bowling with about a 20 inch triangle ? Would these be good for that ? I can't seem to find any information about it .

wilson
Автор

really nice tutorial! Can u tell me how to calculate distance using Radio frequency(433Mhz) using Arduino?

AvinashRavi
Автор

PLZ COMMENT GUYS -> can i power all these just a mobile 5v charger or pc usb or i need more ? i have ardiuno uno r3 @EEEnthusiast

pawanist
Автор

PulsIn(echo, HIGH), but what if no waves come back? Will the PulseIn keep waiting then?

king_SAM_
Автор

i have a question about pulseIn() function. Why does it measure the time when the pin is recieving a HIGH signal?Shouldn't it measure the time is recieving a LOW signal because from what i heard i understood that the sensor triggers an ultrasound and waits for the ultrasound to come back.So the time from the nearest object for the ultrasound to travel is the time the ultrasound travels until it returns to the sensor divided by 2.

adriantoth
Автор

Good video! But sometimes, the sound was bit weird...

king_SAM_
Автор

Are PWM pins required for the connection?

JohnSmith-wvmo
Автор

You say you're using PWM for the LED brightness, but you used analogWrite. Im pretty sure PWM is digitalWrite, and analogWrite varies voltage and only works on analog pins.

griffin
Автор

Man, thanks for the explanations :D, abt the range of detection, i've read in a website that it can detect objects even in 3meters, is it true ? and is there' r anyways to limit it's detection angle, for example to limit it in 30 degree ? thanks a lot

anassjouhri
Автор

my sr04 sensor stop transmitting ultrasonic sound when a quick distance change occure or out of range. Then i plug it back then it start working and same thing happpen. give me some solution....

ranickpatra