Arduino Tutorial 53: Understanding and Connecting the HC-SR04 Sensor

preview_player
Показать описание
You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:

IN this lesson we begin to explore the HC-SR04 Ultrasonic Sensor, and show how you can connect and program the sensor. We will get our first sketch, which will measure the ping travel time.

You can get the kit I am using for this series at the following link:

I strongly suggest picking up an arduino nano, since it can plug directly into the breadboard, making a portable system more practical. You can pick one up here:

As projects get more complicated in these lessons, you guys really need to get a set of breadboard jumper wires which allow you to make neater connections on the board in your projects. You can pick a pack of these wires up here:

In addition as projects get more complicated, you are going to need a bigger breadboard. This is a reasonable one here:

Check out our lessons on our WEB site;

#Arduino
Рекомендации по теме
Комментарии
Автор

No-one hates you Paul, keep producing these LEGENDARY videos !!!

stephenmarshall
Автор

The concept of "we are not going to use canned codes" are exactly why I have watched ALL of these videos, moved on to your python videos and have come back to c++ between video releases. I will definitely have to check out the rest of the coding subjects. the knowledge you are sharing here is priceless.

blainecarvalho
Автор

With the current lockdown a fellow radio ham in our village has been playing with an arduino (he is over 80). He messaged me when he had a problem with it, he had been following one of your earlier tutorials. I was able to get him back on the right track but have also ordered an arduino for myself. I already have a selection of compatible sensors. I have a background in electronic design but have steered clear of microprocessors in my projects. Your videos have been very helpful already and I am already planning some practical applications. Thank you for the huge effort in making the videos, extremely useful.

gfvt
Автор

I want to make a tee shirt, of Paul cringing and holding his breath when uploading the sketch to the arduino.

DeeGeeDeFi
Автор

Our new, our epic, our legendary Arduino tutorial series

sobhitdas
Автор

I love how you connect these lessons with math! I have found the slope "0, 0175" for cm and the slope "0, 007" for inch.

ricklawitzky
Автор

I got a slope of 0.006. I do believe the important fact you are getting at, is the speed of sound! Great project!! Anyone that hates you for doing the math and explaining how things work can just skate by in life and keep doing it the easy way! There are plenty of us that enjoy learning from you!! Thank you, Paul!!

gilnasty
Автор

Slope is 0.0070 in/microsec. This is 2-way round trip speed. My measurement of the speed of sound becomes 2x583 feet/second = 1166 feet feet second. This was a good lab experiment. Thanks Paul. Keep up the most excellent work.

cbrombaugh
Автор

slope of the line is m=0.00757. Thank you for pushing and making us to think independently. In life, we need to solve our own problems, we are responsible for our lives . The teachers and coaches are only to help us guide. We have to walk our own path.

aungphyokyaw
Автор

PAUL: thank you from my heart for all these fantastic
Pls continue this series ❤❤❤

Gallardo
Автор

Hi Paul, thanks for all the tutorials, they are great. Here in Austria, the equation is y = 0, 0174x + 0, 365 [y in cm] // or equals y = 0, 0069x + 0, 1437 [ y in inches]
thanks for the good work!

scenicwild
Автор

No haters are allowed in this house. I REALLY appreciate the use of the oscilloscope in the video. It took me a while to observe the changes in pulse with. I recently purchased a small handheld oscilloscope so this is helping me learn the Arduino side of things and also how to use a new piece of test equipment. Thank you !!

ronkline
Автор

I ended up with .126, but after I read some of your comments (Thanks, gang!), I realized I had to divide for the two way travel and ended up at .063, which is perfect for my distance.
Thanks again for all of this, Paul!

libbytardalo
Автор

I'm 12 years old and me and my dad are so happy that we are learning this, and this helps me become

gogeta
Автор

The accuracy of the slope of the line is very important for converting the time data to distance. I did the homework assignment and attached an lcd which shows distance on display. Works perfectly! 👌🙏

mohsenr
Автор

Enjoyable tutorial and I'm slowly getting there, at last!!! Slope = 0.007 I intend to stay with it to the last, so please keep them coming. Many thanks

kevhopkins
Автор

Paul, if people hate you due to your content and making them think then they really aren't trying to be an engineer.

robertjennings
Автор

From Montreal, Canada my calculation for the slope is 0.0067 and the values for time and twicie the distance (ping must come back) seem to represent the speed of sound.

jimlabissonniere
Автор

Slope of the best fit line = 0.0061 inches/microS = 508.33 ft/s. We are measuring outgoing distance but measuring outgoing + incoming ping travel time. So, the slope is the half of the velocity of ultrasound. Velocity of ultrasonic sound in this experiment is 2*508.33ft/s = 1016.67 ft/s which is slightly less than the reported speed of 1120 ft/s, probably because of the measurement inaccuracy. Still it is quite impressive. Thanks for the great lessons again.

mubinahmed
Автор

I just appriciate your style of mistakes. Yes, I yell out when I see your mistakes, but I make mistakes also. So then I have to trouble shoot one line at a time. It is comforting to know how to handle errors.

gghutton