Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Ultrasonic Height Measurement System with I2C LCD & Arduino UNO

An embedded height measurement system developed for Biomedical Engineering applications. The system utilizes an HC-SR04 Ultrasonic Sensor to measure distance and calculates human/object height dynamically, displaying real-time results on a 16x2 I2C Liquid Crystal Display (LCD).


📐 Working Principle

  1. Distance Measurement: The HC-SR04 sensor emits a 40 kHz ultrasonic wave from TRIG_PIN. The echo pulse duration is measured at ECHO_PIN.

  2. Speed of Sound Calculation: Using sound velocity in air (~0.0343 cm/µs):

    Distance (cm) = (Duration × 0.0343) / 2

  3. Height Deduction: Knowing the fixed sensor height from the floor (SENSOR_HEIGHT = 30 cm):

    Height = SENSOR_HEIGHT - Distance


🛠️ Hardware Components

  • Arduino UNO Microcontroller Board
  • HC-SR04 Ultrasonic Distance Sensor
  • 16x2 LCD Display with I2C Backpack Module (PCF8574)
  • Breadboard & Jumper Wires
  • 5V Power Supply / USB Cable

🔌 Circuit Pin Wiring Diagram

Component Pin / Terminal Arduino Pin
HC-SR04 Sensor VCC 5V
GND GND
Trig Pin 9
Echo Pin 10
I2C LCD Display VCC 5V
GND GND
SDA A4 (or SDA Pin)
SCL A5 (or SCL Pin)

💻 Software Dependencies & Setup

  1. Download and install the Arduino IDE.
  2. Install the LiquidCrystal_I2C library via Arduino Library Manager (Sketch -> Include Library -> Manage Libraries...).
  3. Connect the Arduino board to your PC via USB.
  4. Upload HeightMeter.ino to your Arduino UNO.
  5. Adjust the SENSOR_HEIGHT constant in the code according to your physical setup height in centimeters.

📄 License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages