Using VL53L0X With Arduino to Measure Height
Usually, when measuring a child’s height at home, a mark is drawn on the wall then the height is measured using a measuring tape. This process is not always easy and it may has low resolution. In an attempt to simplify this procedure, a new project was developed using an Arduino and a distance sensor.
The main parts which were used in this project are:
- Arduino Nano, the microcontroller which will read sensor’s values and display the results on the screen.
- MPU-6050, 3 axis gyroscope with 3 axis accelerometer
- VL53L0X, Distance Sensor
- RGB backlight LCD 16×2
- Wooden box and acrylic plate.
VL53L0X is a laser-ranging sensor that uses Time Of Flight (ToF) measurements of infrared pulses for calculating the distance of the facing surface. It can measure distances up to 2 meters with a resolution of 1 mm. This sensor works over an input voltage range of 2.6V to 5.5 V, and the measured values can be read through an I²C interface.
To get the best result, Vl53L0X must be attached on the bottom of the box as shown in this figure.
MPU-6050 is a low power, low cost, and high-performance motion tracking device, it contains 3-axis gyroscope and a 3-axis accelerometer with an onboard Digital Motion Processor (DMP™) which can be programmed with firmware and is able to do complex calculations with the sensor values and uses I²C interface. This sensor is used here for detecting the horizontal direction and for measuring X and Y axis acceleration.
This project has two working modes, Normal Mode and Measurement Mode.
In the Normal mode, the height is always displayed on the LCD, and the color of the LED indicates whether the measurement is horizontal or not. While in the Measurement mode, a button should be held while putting the device on the head, the LED will light blue and the value of the height will caught when the horizontal state is detected.
The code and more information about this project are available here.
Join 97,426 other subscribers