Electronic Components Datasheet Search
  English  ▼

X  

HCSR04 Datasheet(PDF) 4 Page - List of Unclassifed Manufacturers

Part # HCSR04
Description  Ultrasonic Sensor
PDF  6 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  ETC2 [List of Unclassifed Manufacturers]
Direct Link  
Logo ETC2 - List of Unclassifed Manufacturers

HCSR04 Datasheet(HTML) 4 Page - List of Unclassifed Manufacturers

  HCSR04 Datasheet HTML 1Page - List of Unclassifed Manufacturers HCSR04 Datasheet HTML 2Page - List of Unclassifed Manufacturers HCSR04 Datasheet HTML 3Page - List of Unclassifed Manufacturers HCSR04 Datasheet HTML 4Page - List of Unclassifed Manufacturers HCSR04 Datasheet HTML 5Page - List of Unclassifed Manufacturers HCSR04 Datasheet HTML 6Page - List of Unclassifed Manufacturers  
Zoom Inzoom in Zoom Outzoom out
 4 / 6 page
background image
To interpret the time reading into a distance you need to change equation 1. The 
clock on the device you are using will probably count in microseconds or smaller. To use 
equation 1 the speed of sound needs to determined,which is 343 meters per second at 
standard temperature and pressure. To convert this into more useful form use equation 2 
to change from meters per second to microseconds per centimeter. Then equation 3 can 
be used to easily compute the distance in centimeters. 
 
Equation 2.  istance 
D
=  
Speed
170.15 m × 100 cm
Meters × 1e6 μS
170.15 m ×
cm
58.772 μS  
 
Equation 3.  istance 
m
D
=  
58
time = μs
μs/cm = c
 
 
 
4. Wiring the HC­SR04 to a Microcontroller 
This section only covers the hardware side.  For information on how to integrate 
the software side, look at one of the links below or look into the specific microcontroller 
you are using. 
 
The HC­SR04 has 4 pins: VCC, GND, TRIG and ECHO.  
1. VCC is a 5v power supply. This should come from the microcontroller 
2. GND is a ground pin. Attach to ground on the microcontroller. 
3. TRIG should be attached to a GPIO pin that can be set to HIGH 
4. ECHO is a little more difficult. The HC­SR04 outputs 5v, which could destroy 
many microcontroller GPIO pins (the maximum allowed voltage varies). In order 
to step down the voltage use a single resistor or a voltage divider circuit. Once 
again this depends on the specific microcontroller you are using, you will need to 
find out its GPIO maximum voltage and make sure you are below that. 
5. Errors and Bad Readings 
Ultrasonic sensors are great sensors ­­ they work well for many applications 
where other types of sensors fall short. Unfortunately, they do have weaknesses. These 
weaknesses can be mitigated and worked around, but first they must be understood. The 



Html Pages

1 2 3 4 5 6


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com