| Electronic Components Datasheet Search |
|
HCSR04 Datasheet(PDF) 4 Page - List of Unclassifed Manufacturers |
|
|
|||||||||||||||||||||||||||||
HCSR04 Datasheet(HTML) 4 Page - List of Unclassifed Manufacturers |
|
4 / 6 page ![]() 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 HCSR04 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 HCSR04 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 HCSR04 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 |
|
|
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 |
| 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 |