Distance Measurement Using Python & Tk Gui Tools

About the project

This project uses an ultrasonic sensor to indicate the distance of any object from it.

Project info

Difficulty: Easy

Platforms: AdafruitDFRobotRaspberry PiSparkFunPython

Estimated time: 1 hour

License: GNU General Public License, version 3 or later (GPL3+)

Items used in this project

Hardware components

Breadboard (generic) Breadboard (generic) x 1
Resistor 4.75k ohm Resistor 4.75k ohm x 1
Resistor 10k ohm Resistor 10k ohm x 1
Jumper wires (generic) Jumper wires (generic) x 1
Raspberry Pi 3 Model B Raspberry Pi 3 Model B x 1
Ultrasonic Sensor - HC-SR04 (Generic) Ultrasonic Sensor - HC-SR04 (Generic) x 1

Story

Ultrasonic ranging module HC-SR04 provides 2cm to 400cm non-contact distance measurement range. Its accuracy can reach ±3mm with a cycle period of 50ms, which is the minimum time delay recommended before measurements are taken. The module includes ultrasonic transmitter, receiver and control circuit. This project uses an ultrasonic ranging module with a Raspberry Pi to build an ultrasonic distance meter GUI.

Note:

The project can be developed by adding a button with a new function such as start function to repeat the measurment process:

Schematics, diagrams and documents

Connecting To The Pi

CAD, enclosures and custom parts

Measuring distance using Ultrasonic Sensor with Raspberry Pi

PDF :

Go to download

Code

The code 2 with start and stop button

Measuring distance using Ultrasonic Sensor with Raspberry Pi code

Measuring distance using Ultrasonic Sensor with Raspberry Pi – Python Toolkit interface – HC-SR04

Credits

Photo of Aula_Jazmati

Aula_Jazmati

https://www.hackster.io/aula-jazmati

   

Leave your feedback...