KS0328 Keyestudio HR-SR04 Blue Ultrasonic Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
(Created page with " == Keyestudio HR-SR04 Blue Ultrasonic Module 3PCS == <br>500px|frameless|thumb<br> == Introduction == This kit includes three HR-SR04 ultrasoni...")
 
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
<br>[[File:Ks0328图片1.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0328图片1.png|500px|frameless|thumb]]<br>


 
<br>
== Introduction ==
== Introduction ==
This kit includes three HR-SR04 ultrasonic modules. As the ultrasonic has strong directivity, slow energy consumption and far spread distance in the media, so it is commonly used in the measurement of distance, such as range finder and position measuring instrument. Using ultrasonic is more rapid, convenient, simple to calculate and more easier to achieve real-time control, so it has also been widely used in the development of mobile robots. <br>
This kit includes three HR-SR04 ultrasonic modules. As the ultrasonic has strong directivity, slow energy consumption and far spread distance in the media, so it is commonly used in the measurement of distance, such as range finder and position measuring instrument. Using ultrasonic is more rapid, convenient, simple to calculate and more easier to achieve real-time control, so it has also been widely used in the development of mobile robots. <br>
Ultrasonic detector module can provide 2cm-450cm non-contact sensing distance, and its ranging accuracy is up to 3mm, very good to meet the normal requirements. The module includes an ultrasonic transmitter and receiver as well as the corresponding control circuit.
Ultrasonic detector module can provide 2cm-450cm non-contact sensing distance, and its ranging accuracy is up to 3mm, very good to meet the normal requirements. The module includes an ultrasonic transmitter and receiver as well as the corresponding control circuit.


 
<br>
== Working Schematics ==
== Working Schematics ==
 
Please refer to the working sequence as below:<br>
Please refer to the working sequence as below:


<br>[[File:Ks0328图片2.png|700px|frameless|thumb]]<br>
<br>[[File:Ks0328图片2.png|700px|frameless|thumb]]<br>
Line 20: Line 19:
* 2. After triggering, the module will automatically transmit eight 40KHZ square waves, and automatically detect whether there is a signal to return.
* 2. After triggering, the module will automatically transmit eight 40KHZ square waves, and automatically detect whether there is a signal to return.
* 3. If there is a signal return, through the ECHO to output a high level, the duration time of high level is actually the time from emission to reception of ultrasonic.
* 3. If there is a signal return, through the ECHO to output a high level, the duration time of high level is actually the time from emission to reception of ultrasonic.
* Test distance = high level duration * 340m/s * 0.5.
<span style=color:red> Test distance = high level duration * 340m/s * 0.5.   </span><br>


<br>
== Parameters ==
== Parameters ==
* 1)Working Voltage: 0.5V(DC)    
* 1)Working Voltage: 0.5V(DC)    
Line 30: Line 30:
* 6)Output Echo Signal: output TTL level signal (HIGH), proportional to range.
* 6)Output Echo Signal: output TTL level signal (HIGH), proportional to range.


<br>
== Dimensions ==
== Dimensions ==
<br>[[File:KS0328 (8).jpg|500px|frameless|thumb]]<br>
<br>[[File:KS0328 (8).jpg|500px|frameless|thumb]]<br>


<br>
== Connection Diagram ==  
== Connection Diagram ==  
<br>[[File:Ks0328图片3.png|800px|frameless|thumb]]<br>
<br>[[File:Ks0328图片3.png|800px|frameless|thumb]]<br>


<br>
== Test Code ==
== Test Code ==
Copy and paste the test code below to Arduino software:   
Copy and paste the test code below to Arduino software:  <br>
<pre>
<pre>
int inputPin=4; // define ultrasonic signal receiver pin ECHO to D4  
int inputPin=4; // define ultrasonic signal receiver pin ECHO to D4  
Line 63: Line 65:
</pre>
</pre>


 
<br>
== Example Result ==
== Example Result ==
<br>[[File:Ks0328图片4.png|800px|frameless|thumb]]<br>
<br>[[File:Ks0328图片4.png|800px|frameless|thumb]]<br>
Line 70: Line 72:
<br>[[File:Ks0328图片6.png|700px|frameless|thumb]]<br>
<br>[[File:Ks0328图片6.png|700px|frameless|thumb]]<br>


<br>
== Packaging Display ==
== Packaging Display ==
<br>[[File:Ks0328图片7.png|500px|frameless|thumb]]<br>
<br>[[File:Ks0328图片7.png|500px|frameless|thumb]]<br>
    
    


 
<br>
== Resource ==
== Resource ==


[https://drive.google.com/open?id=1eQnowUm-D3smr4gNvCTVAJzWtLlgMTqC  File Download  ]
*Click the link below to download the datasheet: <br>
https://fs.keyestudio.com/KS0328


<br>


== Get One Now ==
== Get One Now ==


'''Official website:'''
*[https://www.keyestudio.com/3pcs-hc-sr04-ultrasonic-module-ultrasonic-sensor-distance-measuring-module-for-arduino-uno-robot-car-p0452-p0452.html '''Official website''' ] 
http://www.keyestudio.com/ks0328.html


[https://www.amazon.com/keyestudio-Ultrasonic-Hc-Sr04-Distance-Arduino/dp/B07DRGHN7V  From Amazon]
*[https://www.amazon.com/keyestudio-Ultrasonic-Hc-Sr04-Distance-Arduino/dp/B07DRGHN7V  From Amazon]
      
      
*[https://www.aliexpress.com/store/product/1-PCS-HC-SR04-Ultrasonic-Module-Ultrasonic-Sensor-Distance-Measuring-Module-for-Arduino-UNO-ROBOT-CAR/1452162_32820232597.html?spm=2114.12010615.8148356.3.3c644407NZx4kq    Shop on aliexpress ]


   [[Category: Accessories]]
   [[Category: Accessories]]

Latest revision as of 12:06, 27 April 2021


Keyestudio HR-SR04 Blue Ultrasonic Module 3PCS


thumb


Introduction

This kit includes three HR-SR04 ultrasonic modules. As the ultrasonic has strong directivity, slow energy consumption and far spread distance in the media, so it is commonly used in the measurement of distance, such as range finder and position measuring instrument. Using ultrasonic is more rapid, convenient, simple to calculate and more easier to achieve real-time control, so it has also been widely used in the development of mobile robots.
Ultrasonic detector module can provide 2cm-450cm non-contact sensing distance, and its ranging accuracy is up to 3mm, very good to meet the normal requirements. The module includes an ultrasonic transmitter and receiver as well as the corresponding control circuit.


Working Schematics

Please refer to the working sequence as below:


thumb

  • 1. First pull down the TRIG, and then trigger it with at least 10us high level signal;
  • 2. After triggering, the module will automatically transmit eight 40KHZ square waves, and automatically detect whether there is a signal to return.
  • 3. If there is a signal return, through the ECHO to output a high level, the duration time of high level is actually the time from emission to reception of ultrasonic.

Test distance = high level duration * 340m/s * 0.5.


Parameters

  • 1)Working Voltage: 0.5V(DC)
  • 2)Working Current: 15mA
  • 3)Detecting Range: 2-450cm
  • 4)Detecting Angle: 15 degrees
  • 5)Input Trigger Pulse: 10us TTL Level
  • 6)Output Echo Signal: output TTL level signal (HIGH), proportional to range.


Dimensions


thumb


Connection Diagram


thumb


Test Code

Copy and paste the test code below to Arduino software:

int inputPin=4; // define ultrasonic signal receiver pin ECHO to D4 
int outputPin=5; // define ultrasonic signal transmitter pin TRIG to D5
 void setup()

{
Serial.begin(9600); 
pinMode(inputPin, INPUT); 
pinMode(outputPin, OUTPUT);
}

void loop()
{
digitalWrite(outputPin, LOW); delayMicroseconds(2);
digitalWrite(outputPin, HIGH); // Pulse for 10μ s to trigger ultrasonic detection
delayMicroseconds(10); 
digitalWrite(outputPin, LOW);
int distance = pulseIn(inputPin, HIGH); // Read receiver pulse time 
distance= distance/58; // Transform pulse time to distance 
Serial.println(distance); //Output distance
delay(50);
}


Example Result


thumb
After upload well the code to UNO board, then open the serial monitor. When place an object in front of ultrasonic sensor (from near and far), it will detect the distance of object. You should see the value is displayed on the monitor shown below.
thumb

thumb


Packaging Display


thumb



Resource

  • Click the link below to download the datasheet:

https://fs.keyestudio.com/KS0328


Get One Now