[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-689901-105":59,"doc-detail-689901-en":130,"doc-similar-689901":154},{"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-distance-sensor-on-an-arduino-overview-specifications-and-code","HC-SR04 Ultrasonic Distance Sensor On an Arduino - Overview, Specifications, and Code","","HC-SR04 ultrasonic distance sensor overview with Arduino integration, covering typical use in obstacle-avoidance and key hardware parameters such as operating voltage/current, 40 kHz frequency, 2–400 cm measuring range, resolution, and trigger timing. Includes discussion of speed-of-sound dependence on air temperature (and limited humidity influence), along with practical measurement limitations like target distance, orientation, target size, and surface softness. Provides the process description from a 10 µs pulse to echo timing and Arduino code using DHT11, LCD, and NewPing.",{"@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-distance-sensor-on-an-arduino-overview-specifications-and-code/689901/",{"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-distance-sensor-on-an-arduino-overview-specifications-and-code/689901.png","ImageObject",300,407,{"name":92,"@type":93},"Adam","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-11","2026-11-08",true,{"@type":102,"interactionType":103,"userInteractionCount":81},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What are the HC-SR04 key specifications used in the document?","Question",{"text":112,"@type":113},"The document lists operating voltage 5 V, operating current 15 mA, operating frequency 40 kHz, measuring range 2–400 cm, and resolution (accuracy) 3 mm, along with the 10 µs trigger pulse requirement and a 15° measuring angle.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does air temperature affect distance measurement?",{"text":117,"@type":113},"The document explains that the speed of sound depends on air temperature and provides the expression V = 331.3 + (0.606 × T). It also notes that humidity has very little to no effect within 0–40°C.",{"name":119,"@type":110,"acceptedAnswer":120},"What causes inaccurate or missing distance readings?",{"text":121,"@type":113},"The document points out limitations such as targets farther than 4 m, the sensor not facing the target (reflections may not return), targets that are too small, and soft or irregular targets that absorb energy from the sound waves.","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},689901,1794133605,{"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":81,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":14,"preview_urls":145},1374404737137,"https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d","HC-SR04  \nUltrasonic Distance Sensor On an Arduino  \n(a)  \n(b)  \n(c)  \n(d)  \nFig 1: (a) HC-SR04 Sensor,(b) Circuit used to test the ultrasonic sensor,(c) Fritzing Circuit Diagram,(d) Serial monitor display of the acquired data  \n1. Introduction  \nThe HC-SR04 is the most popular, economical, easy to use ultrasonic distance sensor available to the general public and hobbyists. its range extends from 2 cm to 400 cm. The most commonly usage of this sensor is in obstacle-avoidance projects.  \nHC-SR04 Specifications  \nOperating voltage 5 V  \nOperating current 15 mA  \nOperating Frequency 40 kHz  \nMeasuring range 2 – 400 cm  \nResolution (accuracy) 3 mm Measuring angle 15 degrees Trigger input signal 10 µs high pulse  \nDimension 45 x 20 x 15mm  \nFig 2: Speed of sound vs. temperature and relative humidity according to [2], p = 101.3 kP a, 314 ppm CO 2  \nHigh Accuracy Acoustic Relative Humidity Measurement in Duct Flow with Air-Scientific Figure on ResearchGate. Available from: [https://www.researchgate.net/figure/Speed-of-sound](https://www.researchgate.net/figure/Speed-of-sound)vs-temperature-and-relative-humidity-according-to-2-p-1013-kP-a_fig9_51873087 [accessed 10 Jan, 2021]  \nWe can see that the humidity has very little to no effect on the speed of sound as long as we operate in the range 0-40˚C. beyond 60˚C, we may not want to ignore the variation in the speed of sound. However, for any level of humidity, there is a corrective term to be included in the relationship between the speed of sound and the temperature, where at 0˚C, the speed of sound is 331.3 m/s.  \nHence, for more accurate measurements ofthe speed of sound, one may want to use the following expression  \nV = 331.3 + (0.606 × T)  \nV = Speed of sound (m/s)  \nT = Air Temperature (°C)  \nDifficulties  \n• Targets cannot be more than 4m away from the sensor  \n• If the sensor is not facing the target, there could be the possibility that there will be no reflected wave reaching the sensor, and you may even get a measured reflection off the floor  \n• There will also be no measurable reflection if the target is too small  \n• If the target is soft, or has irregular contours, the measurements will be inaccurate as the target may even absorb some of the energy in the sound waves  \nDescription of the process and evaluations of desired parameters  \nThe start of the process requires the triggering of a 10- μs duration TTL rectangular pulse. When that is done, the sensor will transmit a 40-kHz burst of pulses (sound waves, which at this frequency is beyond the hearing range of a human being) .  \nWhen the reflected signal is received, the Echo pin produces a pulse whose duration is proportional to the time between the time the burst was generated, and the time the reflected wave was received.  \nCode  \n/*  \nHC-SR04 with Temp and Humidity Demonstration  \nDemonstrates range measurements through the HC-SR04 Ultrasonic Range Finder  \nenhanced by the availability of the temperature and humidity through DHT11 Displays results on Serial Monitor and LCD display  \n*/  \n// include libraries for the DHT11, HC-SR04, and the 1602A QAPASS display  \n\\#include \"DHT.h\" // helps interface with the DHT11 (valid also for DHT22)  \n\\#include \"NewPing.h\" // provides useful function to interact with the HC-SR04  \n\\#include \"LiquidCrystal.h\" // valid for most 16x2 LCD display  \n// Define Constants  \n\\#define DHTpin 6 // DHT-11 Signal pin connected to digital pin 6  \n\\#define DHTtype DHT11 // DHT Type is DHT11  \n\\#define Trigger_pin 13 // trigger pin of HC-SR04 connected to digital pin 13  \n\\#define Echo_pin 10 // Echo pin of HC-SR04 connected to digital pin 10  \n\\#define Max_distance 400  \n// There was a problem when the echo pin was connected to digital pin 13  \n// (possibly some interference with another Arduino internal component connected to it)  \n// Initialize the HC-SR04 Ultrasonic Distance Sensor  \nNewPing sonar(Trigger_pin, Echo_pin, Max_distance);  \n// Define Variables  \nconst int rs = 11, en = 12, d4 = ","cbCaiq3gAsQtzbCP","https://ap.wps.com/l/cbCaiq3gAsQtzbCP","pdf",3015608,13,"English","# Introduction\n# HC-SR04 Specifications\n# Speed of Sound and Environmental Factors\n## Temperature-based speed of sound equation\n# Difficulties and Measurement Limitations\n# Measurement Process and Parameter Evaluation\n# Code (Arduino Integration)","[{\"question\":\"What are the HC-SR04 key specifications used in the document?\",\"answer\":\"The document lists operating voltage 5 V, operating current 15 mA, operating frequency 40 kHz, measuring range 2–400 cm, and resolution (accuracy) 3 mm, along with the 10 µs trigger pulse requirement and a 15° measuring angle.\"},{\"question\":\"How does air temperature affect distance measurement?\",\"answer\":\"The document explains that the speed of sound depends on air temperature and provides the expression V = 331.3 + (0.606 × T). It also notes that humidity has very little to no effect within 0–40°C.\"},{\"question\":\"What causes inaccurate or missing distance readings?\",\"answer\":\"The document points out limitations such as targets farther than 4 m, the sensor not facing the target (reflections may not return), targets that are too small, and soft or irregular targets that absorb energy from the sound waves.\"}]","HC-SR04 Ultrasonic Distance Sensor On an Arduino - Overview, Specifications, and Code | PDF",33,[146,150],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/e3b32df2f2371cd56aab14594246cc17.webp",983,1272,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/385046aae9fc8e76a6897ce5d8c3c36a.webp",982,1270,{"list":155,"token":66},[156,162,168,174,180,186,192,198,204,210],{"doc_id":157,"doc_title":158,"file_type":137,"home_preview_img_url":159,"slug":160,"view_count":19,"category_name":30,"create_tm":161},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=1796111939&Signature=DNnkze6U2SAkyGJDaj7Ovm1mPxU%3D","hc-sr04-ultrasonic-sensor-users-manual-v10-may-2013",1794133650,{"doc_id":163,"doc_title":164,"file_type":137,"home_preview_img_url":165,"slug":166,"view_count":81,"category_name":30,"create_tm":167},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=1796111939&Signature=JGOjfYPsDpT%2B4WlBWPKuvCbXaA0%3D","ultrasonic-sonar-distance-sensors",1794133611,{"doc_id":169,"doc_title":170,"file_type":137,"home_preview_img_url":171,"slug":172,"view_count":19,"category_name":30,"create_tm":173},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=1796111939&Signature=3NDW4awWyQZGAKsfm%2FiSYg34qzs%3D","ultrasonic-ranging-module-hc-sr04-usage-notes",1793951567,{"doc_id":175,"doc_title":176,"file_type":137,"home_preview_img_url":177,"slug":178,"view_count":19,"category_name":30,"create_tm":179},689903,"HC SR04 Ultrasonic Sensor - How it works and wiring guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001443309/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=u%2BAnw0A5tJGGQPcRRNOSL%2BdboZg%3D","hc-sr04-ultrasonic-sensor-how-it-works-and-wiring-guide",1794133612,{"doc_id":181,"doc_title":182,"file_type":137,"home_preview_img_url":183,"slug":184,"view_count":81,"category_name":30,"create_tm":185},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=1796111939&Signature=xi0dEsx9Vy7Mw4PyRXg%2FCQzn2xM%3D","ultrasonic-sensor-module-specifications-wiring-and-testing",1794133617,{"doc_id":187,"doc_title":188,"file_type":137,"home_preview_img_url":189,"slug":190,"view_count":19,"category_name":30,"create_tm":191},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=1796111939&Signature=JgJy5uQ4o%2BSyhgVFJNCCGmJDa8g%3D","hc-sr04-ultrasonic-sensor-module-user-guide-user-guide-ultrasonic-sensor-v20",1794133600,{"doc_id":193,"doc_title":194,"file_type":137,"home_preview_img_url":195,"slug":196,"view_count":24,"category_name":30,"create_tm":197},720439,"Temperature and Humidity Sensor on an Arduino - Intro","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024396060/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=NEPr%2FZr%2Fn%2F6PlipdMB3PHwRNx%2Fk%3D","temperature-and-humidity-sensor-on-an-arduino-intro",1795037376,{"doc_id":199,"doc_title":200,"file_type":137,"home_preview_img_url":201,"slug":202,"view_count":29,"category_name":30,"create_tm":203},720441,"DHT11 Temperature and Humidity Sensor","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024396075/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=EYTLbgwNcGBTvjozSpW%2F7tMJ9%2FY%3D","dht11-temperature-and-humidity-sensor",1795037380,{"doc_id":205,"doc_title":206,"file_type":137,"home_preview_img_url":207,"slug":208,"view_count":81,"category_name":30,"create_tm":209},720435,"DHT11 Humidity & Temperature Sensor Module - User Guide - Operating Specifications and Arduino Example","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230024396025/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=5b1xoswyGG0XyMVk%2FpIJ%2BfLBE6E%3D","dht11-humidity-temperature-sensor-module-user-guide-operating-specifications-and-arduino-example",1795037368,{"doc_id":211,"doc_title":212,"file_type":137,"home_preview_img_url":213,"slug":214,"view_count":215,"category_name":30,"create_tm":216},118608,"REAR COLLISION AVOIDANCE SYSTEM USING MACHINE LEARNING INTEGRATED WITH ARDUINO - Abstract","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229834758786/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111939&Signature=bMsUohOYo59zoQr49xO3cncuj%2Fk%3D","rear-collision-avoidance-system-using-machine-learning-integrated-with-arduino-abstract",21,1785684490]