Skip to Content
Learning Robotics using Python - Second Edition
book

Learning Robotics using Python - Second Edition

by Lentin Joseph
June 2018
Beginner to intermediate
280 pages
6h 58m
English
Packt Publishing
Content preview from Learning Robotics using Python - Second Edition

Working of HC-SR04

The timing of the waveform on each pin is shown in the following diagram. We need to apply a short 10 µs pulse to the trigger input to start the ranging and then the module will send out an eight-cycle burst of ultrasound at 40 KHz and raise its echo. The echo is a distance object that is the pulse width and the range in proportion. You can calculate the range through the time interval between sending trigger signals and receiving echo signals using the following formula:

Range = high level time of echo pin output * velocity (340 M/S) / 2.

It will be better to use a delay of 60 ms before each trigger to avoid overlapping between trigger and echo:

Input and output waveform of ultrasound sensor
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Robotics using Python

Learning Robotics using Python

Lentin Joseph
Python Robotics Projects

Python Robotics Projects

Prof. Diwakar Vaish

Publisher Resources

ISBN: 9781788623315Supplemental Content