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).
-
Distance Measurement: The HC-SR04 sensor emits a 40 kHz ultrasonic wave from
TRIG_PIN. The echo pulse duration is measured atECHO_PIN. -
Speed of Sound Calculation: Using sound velocity in air (~0.0343 cm/µs):
Distance (cm) = (Duration × 0.0343) / 2
-
Height Deduction: Knowing the fixed sensor height from the floor (
SENSOR_HEIGHT= 30 cm):Height = SENSOR_HEIGHT - Distance
- 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
| 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) |
- Download and install the Arduino IDE.
- Install the LiquidCrystal_I2C library via Arduino Library Manager (
Sketch -> Include Library -> Manage Libraries...). - Connect the Arduino board to your PC via USB.
- Upload
HeightMeter.inoto your Arduino UNO. - Adjust the
SENSOR_HEIGHTconstant in the code according to your physical setup height in centimeters.
This project is licensed under the MIT License.