Tags:
tag this topic
create new tag
view all tags
---+ The Ultrasonic Distance Sensor HC-SR04 In order to measure the distance of the colored paper sheet from the sensors we use the [[http://www.micropik.com/PDF/HCSR04.pdf][HC-SR04]] ultra-sonic distance sensor. <img alt="" height="404" src="%ATTACHURL%/hc-sr04.png" width="480" /> As can be seen from the photo, the modules has 4 connections: * Vcc, which is 5V * Gnd * Trig * Echo The module is triggered with a 10us TTL trigger pulse. It then sends an 8 cycle sonic burst of 40 kHz and tries to detect the echo. The module sends an echo pulse whose length is proportional to the time the sound signals takes to the target and back. These are the connection we make: | Vcc | 5V | | Trig | gpio 23 | | Echo | gpio 24 via the level converter | | Gnd | Gnd | Here is a Python test program demonstrating the readout: %ATTACHURL%/hc-sr04.py.txt -- %USERSIG{UliRaich - 2018-02-08}% ---++ Comments <br />%COMMENT%
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
png
hc-sr04.png
r1
manage
172.8 K
2018-03-06 - 13:45
UliRaich
txt
hc-sr04.py.txt
r1
manage
0.9 K
2018-03-06 - 13:59
UliRaich
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r4 - 2018-03-08
-
UliRaich
Home
Site map
AFNOG web
Embedded_Systems web
IoT_Course_English web
IoT_Course_French web
Main web
Sandbox web
TWiki web
AFNOG Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
E
dit
A
ttach
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback