Vcc is the power supply for hc sr04 ultrasonic distance sensor which we connect the 5v pin on the arduino.
4 pin ultrasonic sensor.
The hc sr04 ultrasonic sensor uses sonar to determine the distance of an object just like the bats do.
Yes the advantage of 3 pin is that you can use many sensor it s won t consume as many as when you have 4 pins but problem is it s expensive 16 according to the 4 pins which is just 2 7 aiming for the unreachable.
To do this it sends a pulse to the sensor to initiate a reading then listens for a pulse to return.
Easy ultrasonic 4 pin sensor monitoring hc sr04.
Echo pin produces a pulse when the reflected signal is received.
Trigger es ist ein eingangspin der für 10us hoch gehalten werden muss um die messung durch senden einer us welle zu initialisieren.
I added the 4 int s to the beginning of the code so you can changes.
Trig trigger pin is used to trigger the ultrasonic sound pulses.
Connection and code for ultrasonic sensor 4 pins with arduino uno.
The supply voltage of vcc is 5v and you can attach trig and echo pin to any digital i o in your arduino board.
Vcc dieser pin versorgt den sensor normalerweise mit 5 v.
It offers excellent non contact range detection with high accuracy and stable readings in an easy to use package from 2 cm to 400 cm or 1 to 13 feet.
3 or 4 pins sensor are the same except that 3 pins sensor share trig and echo signals on the same pin.
Ultrasonic sensor hc sr04 configuration and specification ultrasonic sensor hc sr04 principle.
The length of the pulse is proportional to the time it took for the transmitted signal to be detected.
This sensor is a very popular sensor used in many applications where measuring distance or sensing objects are required.
How would i need to change the code and wiring if i am using the 4 pin.
Hc sr04 ultrasonic sensor working as shown above the hc sr04 ultrasonic us sensor is a 4 pin module whose pin names are vcc trigger echo and ground respectively.
Here is the code from the tutorial.
Hello instructables i have had some trouble with my cheap ultrasonic sensor hc sr04 and today i found a really easy solution.