Tags:
create new tag
view all tags

The HC-SR04 ultrasonic distance meter

The HC-SR04 emits an ultrasonic sound wave and measures the time it takes to travel to a target and back. Knowing that sound waves travel at 330m/s the distance between the sensor and the target can be calculated

The cabling is done as described in the following table

TCS3200Sorted ascending !WeMos bus GPIO
ECHO D1 22*
GND GND  
TRIG D2 21
Vcc 5V  
* Because the signal emitted by the HC-SR04 has a 5V level and the ESP32 CPU accepts only 3.3V signals, the ECHO signal is passed through a 1kOhms / 2kOhms voltage divider.

-- Uli Raich - 2022-05-30

Comments

Topic revision: r1 - 2022-05-30 - UliRaich
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback