Please note, circuit diagram at 0:56 should be: 5v to VCC, GND to GND, D10 to Trig, D9 to Echo.
https://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/ ► More details, circuit schematics and codes from my official website.
In this Arduino Tutorial you will learn how to use the HC-SR04 Ultrasonic sensor. It can measure distance from 2 cm to 4 meters with a ranging accuracy up to 3mm. The working principle of this module is quite simple.
Visit HowToMechatronics.com for more Tutorials, Tips, Projects and How It Works videos:
► https://howtomechatronics.com/
Like my page on Facebook:
► https://www.facebook.com/howtomechatronics
Add me on Google+:
►https://plus.google.com/+Howtomechatronics
Music: Aduro by Jens Kiilstofte (machinimasound.com/music)
, https://i.ytimg.com/vi/ZejQOX69K5M/hqdefault.jpg
source
Please note, circuit diagram at 0:56 should be: 5v to VCC, GND to GND, D10 to Trig, D9 to Echo.
I did everything exactly as said but my serial monitor just returns 0
can it measure mm ? or only sm
i have a question. i tried the ultrasonic buzzer but the distance kept on showing 0 for me… i looked at all my steps and also verified the code and the code works… im not actually sure what i did wrong, but if anyone knows how to help me pls tell me.
Good and simple… ! Nice video, keep on man!
It Helped Me THNX =)
Can anyone send the code used
oh god your english
This is amazing
Delete kr video
Can somebody pls tell me the range of this sensor? Want to build a rangefinder with it but only if it can measure longer distances
Hi, im thinking about build this for my car. do i need more then one sensor for front and back or is the angle of this sensor to small?
Who owns this patent? I would like to work with them ASAP
lmfao i tought this shit was a speaker….
Nice Video…
is this detects 1cm small objects
It just keeps saying distance 0 and sometimes shows random numbers
Sir ,The distance formula given by you is not showing accurate distance
More ultrasonic theory than Arduino project. Useless for beginners.
hello my sensor us – 015, it does not detect less than <11cm even when the distance is between 2 and 11cm. Do you know why it could be? Thank you.
Which program language is this
Hope this measurement can not be accurate. because speed of sound is not constant. Speed of sound vary based on temperature of air.
Great tutorial dude!
Does this work with liquids, like water, for example?
OMG all the stupid youtubers give their website and not the diagram in the video with LCD, thumbs up if u agree
hi , can someone say hi?
hi
Excuse me and hello. I tried doing this but found it saying the distance as 0 in all cases
Can we connect ultrasonic sensors with laptop directly instead of arduino.
the ultrasonic sensor IS A PROGRAMMED BAT
Can it sense the color of the object?
Is there something like an expansion of this code on the timetravel?
duration=pulsIn(echoPin, HIGH);
Because i’m planning to use other radio frequency module but still same concept of getting distance as ultrasonic
on my serial monitor only zeros show up (and sometimes numbers like 890 and 1238) what did i do wrong.
how do you do the wiring for the display thing?
Could you somehow code a trigger for when the distance is shorter than a certain length, then have a count of how many times that happens on the lcd
my distance values are displaying zeros. Can someone please help me out
For people who keep getting 0000000,
If you did exactly like the video you properly burned the ultrasonic sensor because the circuit in the video is wrong.
thank you but why you didnt tell us thelcd
Inferad carmara
i am gonna use this and putt it on my sister's door every time the door opens i will program it to remind her that her name is " Precious "
I broke my ultrasonic sensor cause of your diagram ?
why dont you tell the connections with lcd pin
i have an arduino nano 33 iot, that works at 3.3V, is there a way to use this sensor with it?
have a pseudocode for this project?
why my serial monitor show the wrong value of distance? even I put the barrier in front of the sensor but it shows 120++