[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-689903-105":59,"doc-detail-689903-en":130,"doc-similar-689903":149},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","hc-sr04-ultrasonic-sensor-how-it-works-and-wiring-guide","HC SR04 Ultrasonic Sensor - How it works and wiring guide","","Explains how the HC-SR04 ultrasonic sensor operates to measure distance using high-frequency sound waves beyond human hearing. Describes the sending and receiving process, the role of TRIG and ECHO pins, and how to convert echo time into distance using the speed of sound and timing relationships. Provides key specifications such as operating voltage, current draw, ranging and resolution, and discusses common issues that lead to inaccurate or bad readings, including conditions affecting detection reliability.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/hc-sr04-ultrasonic-sensor-how-it-works-and-wiring-guide/689903/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/hc-sr04-ultrasonic-sensor-how-it-works-and-wiring-guide/689903.png","ImageObject",300,407,{"name":92,"@type":93},"McQueen","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-29","2026-11-08",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"How does the HC-SR04 determine the distance to an object?","Question",{"text":112,"@type":113},"The sensor emits an ultrasonic burst and measures the time until the reflected sound is detected on the ECHO pin. Using the echo travel time and the speed of sound, distance is calculated.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What are the functions of the HC-SR04 pins?",{"text":117,"@type":113},"VCC and GND supply power. TRIG initiates the ultrasonic burst, and ECHO provides a signal that stays HIGH for the duration the sound takes to travel to the object and back.",{"name":119,"@type":110,"acceptedAnswer":120},"Why can readings become inaccurate or bad?",{"text":121,"@type":113},"Ultrasonic sensing depends on object orientation and the sensor’s detection cone. If the sound wave reflects in a way that does not return to the sensor, or if environmental conditions change the effective speed of sound, measurements can be unreliable.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},689903,1794133612,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":29,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":129,"read_time":143,"preview_page_count":8,"preview_urls":144},5909890329169,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","HC SR04 Ultrasonic Sensor  \nElijah J. Morgan Nov. 16 2014  \nThe purpose of this file is to explain how the HC SR04 works. It will give a brief explanation of how ultrasonic sensors work in general. It will also explain how to wire the sensor up to a microcontroller and how to take/interpret readings. It will also discuss some sources of errors and bad readings.  \n1. How Ultrasonic Sensors Work  \n2. HC SR04 Specifications  \n3. Timing chart, Pin explanations and Taking Distance Measurements  \n4. Wiring HC SR04 with a microcontroller  \n5. Errors and Bad Readings  \n1. How Ultrasonic Sensors Work  \nUltrasonic sensors use sound to determine the distance between the sensor and the closest object in its path. How do ultrasonic sensors do this? Ultrasonic sensors are essentially sound sensors, but they operate at a frequency above human hearing.  \nThe sensor sends out a sound wave at a specific frequency. It then listens for that specific sound wave to bounce off of an object and come back (Figure 1) . The sensor keeps track of the time between sending the sound wave and the sound wave returning. If you knowhow fast something is going and how long it is traveling you can find the distance traveled with equation 1.  \nEquation 1. d = v × t  \nThe speed of sound can be calculated based on the a variety of atmospheric conditions, including temperature, humidity and pressure. Actually calculating the distance will be shown later on in this document.  \nIt should be noted that ultrasonic sensors have a cone of detection, the angle of this cone varies with distance, Figure 2 show this relation. The ability of a sensor to  \ndetect an object also depends on the objects orientation to the sensor. If an object doesn’t present a flat surface to the sensor then it is possible the sound wave will bounce off the object in a way that it does not return to the sensor.  \n2. HC SR04 Specifications  \nThe sensor chosen for the Firefighting Drone Project was the HC SR04. This section contains the specifications and why they are important to the sensor module. The sensor modules requirements are as follows.  \n● Cost  \n● Weight  \n● Community of hobbyists and support  \n● Accuracy of object detection  \n● Probability of working in a smoky environment  \n● Ease of use  \nThe HC SR04 Specifications are listed below. These specifications are from the Cytron Technologies HC SR04 User’s Manual (source 1) .  \n● Power Supply: +5V DC  \n● Quiescent Current: \u003C2mA  \n● Working current: 15mA  \n● Effectual Angle: \u003C 15º  \n● Ranging Distance: 2 400 cm  \n● Resolution: 0.3 cm  \n● Measuring Angle: 30º  \n● Trigger Input Pulse width: 10uS  \n● Dimension: 45mm x 20mm x 15mm  \n● Weight: approx. 10 g  \nThe HC SR04’s best selling point is its price; it can be purchased at around $2 per unit.  \n3. Timing Chart and Pin Explanations  \nThe HC SR04 has four pins, VCC, GND, TRIG and ECHO; these pins all have different functions. The VCC and GND pins are the simplest they power the HC SR04. These pins need to be attached to a +5 volt source and ground respectively. There is a single control pin: the TRIG pin. The TRIG pin is responsible for sending the ultrasonic burst. This pin should be set to HIGH for 10 μs, at which point the HC SR04 will send out an eight cycle sonic burst at 40 kHZ. After a sonic burst has been sent the ECHO pin will go HIGH. The ECHO pin is the data pin it is used in taking distance measurements. After an ultrasonic burst is sent the pin will go HIGH, it will stay high until an ultrasonic burst is detected back, at which point it will go LOW.  \nTaking Distance Measurements  \nThe HC SR04 can be triggered to send out an ultrasonic burst by setting the TRIG pin to HIGH. Once the burst is sent the ECHO pin will automatically go HIGH. This pin will remain HIGH until the the burst hits the sensor again. You can calculate the distance to the object by keeping track of how long the ECHO pin stays HIGH. The time ECHO stays HIGH is the time the burst spent traveling. Using this measur","cbCaibcQCxzxrAub","https://ap.wps.com/l/cbCaibcQCxzxrAub","pdf",522242,"English","# How Ultrasonic Sensors Work\n# HC SR04 Specifications\n# Timing Chart, Pin Explanations and Taking Distance Measurements\n# Wiring HC SR04 with a Microcontroller\n# Errors and Bad Readings","[{\"question\":\"How does the HC-SR04 determine the distance to an object?\",\"answer\":\"The sensor emits an ultrasonic burst and measures the time until the reflected sound is detected on the ECHO pin. Using the echo travel time and the speed of sound, distance is calculated.\"},{\"question\":\"What are the functions of the HC-SR04 pins?\",\"answer\":\"VCC and GND supply power. TRIG initiates the ultrasonic burst, and ECHO provides a signal that stays HIGH for the duration the sound takes to travel to the object and back.\"},{\"question\":\"Why can readings become inaccurate or bad?\",\"answer\":\"Ultrasonic sensing depends on object orientation and the sensor’s detection cone. If the sound wave reflects in a way that does not return to the sensor, or if environmental conditions change the effective speed of sound, measurements can be unreliable.\"}]","HC SR04 Ultrasonic Sensor - How it works and wiring guide | PDF",15,[145],{"page_no":8,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/bcb7652eb8ceb856688effd8d5d635d4.webp",983,1272,{"list":150,"token":66},[151,157,163,169,175,181,187,193,200,206],{"doc_id":152,"doc_title":153,"file_type":137,"home_preview_img_url":154,"slug":155,"view_count":19,"category_name":30,"create_tm":156},681644,"Ultrasonic Ranging Module HC-SR04 - Usage Notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229998373282/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796206919&Signature=d%2BBs2NsRC1PU5JBMoDSH6OpA5LY%3D","ultrasonic-ranging-module-hc-sr04-usage-notes",1793951567,{"doc_id":158,"doc_title":159,"file_type":137,"home_preview_img_url":160,"slug":161,"view_count":81,"category_name":30,"create_tm":162},689906,"Ultrasonic Sensor Module - Specifications, Wiring, and Testing","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001443357/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796206919&Signature=zgnftxalkQr2d9gFwF8NDf3wmek%3D","ultrasonic-sensor-module-specifications-wiring-and-testing",1794133617,{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":81,"category_name":30,"create_tm":168},689902,"Ultrasonic Sonar Distance Sensors","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001443304/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796206919&Signature=hFPsaIeNZjCsJXyJrzvXa%2BBmgtc%3D","ultrasonic-sonar-distance-sensors",1794133611,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":81,"category_name":30,"create_tm":174},689901,"HC-SR04 Ultrasonic Distance Sensor On an Arduino - Overview, Specifications, and Code","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001443281/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796206919&Signature=Dx81qvlCF1RvpMDDePojJTjrl2w%3D","hc-sr04-ultrasonic-distance-sensor-on-an-arduino-overview-specifications-and-code",1794133605,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":19,"category_name":30,"create_tm":180},689907,"HC SR04 Ultrasonic Sensor - User’s Manual - V1.0 - May 2013","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001443528/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796206919&Signature=SOqYVCpP5pKS22P3hidy%2F3vwVYM%3D","hc-sr04-ultrasonic-sensor-users-manual-v10-may-2013",1794133650,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":19,"category_name":30,"create_tm":186},689898,"HC-SR04 Ultrasonic Sensor Module User Guide - User Guide: Ultrasonic Sensor V2.0","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001443221/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796206919&Signature=%2FYuTPT1W%2B8PhmJr4OkiUPf2NkxI%3D","hc-sr04-ultrasonic-sensor-module-user-guide-user-guide-ultrasonic-sensor-v20",1794133600,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":52,"category_name":30,"create_tm":192},442607,"SCIENCE BASICS - Sound is a Wave - Intro","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229924329651/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796206919&Signature=RIG4IF5u2CgbsLSROUpps7cOQbo%3D","science-basics-sound-is-a-wave-intro",1790700949,{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":198,"category_name":30,"create_tm":199},448961,"LEA RN ICT - Communicating with Emails and Multimedia","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229924781705/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796206919&Signature=TEkzbNNWvB1SZMOs35SlNh3cMHU%3D","lea-rn-ict-communicating-with-emails-and-multimedia",14,1790729090,{"doc_id":201,"doc_title":202,"file_type":137,"home_preview_img_url":203,"slug":204,"view_count":19,"category_name":30,"create_tm":205},655275,"Electrical Controls - Technical Overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975076413/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796206919&Signature=3IFjTZFyDjKxkz9270uBmhkUwvU%3D","electrical-controls-technical-overview",1792960529,{"doc_id":207,"doc_title":208,"file_type":137,"home_preview_img_url":209,"slug":210,"view_count":211,"category_name":30,"create_tm":212},559169,"Ultrasonic Sensor Circuit Diagram - Technical Components","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229947445406/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796206919&Signature=p90C9MCdxtL%2BRgrU%2FaQ7iT38ypY%3D","ultrasonic-sensor-circuit-diagram-technical-components",11,1791800323]