7/24/2023 0 Comments Hc sr04 timing diagramUsed to avoid and detect obstacles with robots like biped robot, obstacle avoider robot, path finding robot etc.Using this information the distance is measured as explained in the above heading. The amount of time during which the Echo pin stays high is measured by the MCU/MPU as it gives the information about the time taken for the wave to return back to the Sensor. Once the wave is returned after it getting reflected by any object the Echo pin goes high for a particular amount of time which will be equal to the time taken for the wave to return back to the sensor. This action will trigger an ultrasonic wave at frequency of 40Hz from the transmitter and the receiver will wait for the wave to return. To start the measurement, the trigger pin has to be made high for 10uS and then turned off. The Trigger and the Echo pins are both I/O pins and hence they can be connected to I/O pins of the microcontroller. The current consumed by the sensor is less than 15mA and hence can be directly powered by the on board 5V pins (If available). Power the Sensor using a regulated +5V through the Vcc ad Ground pins of the sensor. The following guide is universally since it has to be followed irrespective of the type of computational device used. HC-SR04 distance sensor is commonly used with both microcontroller and microprocessor platforms like Arduino, ARM, PIC, Raspberry Pie etc. Now simply calculate the distance using a microcontroller or microprocessor. The circuitry inbuilt on the module will calculate the time taken for the US wave to come back and turns on the echo pin high for that same particular amount of time, this way we can also know the time taken. Since we are using the Ultrasonic wave we know the universal speed of US wave at room conditions which is 330m/s. The Echo is a distance object that is pulse width and the range in proportion. You only need to supply a short 10uS pulse to the trigger input to start the ranging, and then the module will send out an 8 cycle burst of ultrasound at 40 kHz and raise its echo. Now, to calculate the distance using the above formulae, we should know the Speed and time. Timing diagram The Timing diagram is shown below. The Ultrasonic transmitter transmits an ultrasonic wave, this wave travels in air and when it gets objected by any material it gets reflected back toward the sensor this reflected wave is observed by the Ultrasonic receiver module as shown in the picture below The sensor works with the simple high school formula that The module has two eyes like projects in the front which forms the Ultrasonic transmitter and Receiver. This sensor is a very popular sensor used in many applications where measuring distance or sensing objects are required. US transmitter Receiver pair, IR sensor module, IR sensor pair, IR Analog distance sensor,Īs shown above the HC-SR04 Ultrasonic (US) sensor is a 4 pin module, whose pin names are Vcc, Trigger, Echo and Ground respectively. More details can be found in the HC-SR04 ultrasonic sensor datasheet attached at the bottom of this article. HC-SR04 Timing diagram The circuit needs to supply a short 10uS pulse to the trigger input to start the ranging, and then the module will send out an 8 cycle. Practical Measuring Distance: 2cm to 80cm.Theoretical Measuring Distance: 2cm to 450cm.This pin is connected to the Ground of the system. Product features: Ultrasonic ranging module HC - SR04 provides 2cm - 40 0cm non-contact measurement function, the ra nging accuracy can reach to 3mm. This pin goes high for a period of time which will be equal to the time taken for the US wave to return back to the sensor. This pin has to be kept high for 10us to initialize measurement by sending US wave.Įcho pin is an Output pin. Sensor angle: Not more than 15 degreesħ.The Vcc pin powers the sensor, typically with +5V Output signal: Electric frequency signal, high level 5V, low level 0VĤ. Distance = (high level time * sound velocity / 2). In this example, the counter is preset to twelve: As you can see, the input data was present long before the load operation was triggered. Knowing this, let’s continue by looking at the counting process. The width of the pulse is in proportion to the distance measured. As you can see, the timing diagram is an addition to the textual description to make it easier to visualize the operation of the device. A TTL level pulse will be sent from ECHO pin of the module. Send a 10 µs high level pulse to the trigger (TRIG) pin of the module from a microcontroller.Ģ.The module will automatically send eight internally generated 40khz pulses from the transmitter and receive the echo at the receiver.ģ. The module includes ultrasonic transmitters, receiver and a control circuit.ġ. The HC-SR04 Ultrasonic Sensor is widely used for non-contact distance measuring from 2cm – 400cm.
0 Comments
Leave a Reply. |