Project tutorial
How Tall Are You?

How Tall Are You? © CC BY

A digital stadiometer for human height measurement.

  • 4,536 views
  • 0 comments
  • 26 respects

Components and supplies

Ard nano
Arduino Nano R3
×1
CJMCU 530 (VL53L0x) laser sensor
×1
KY-040 Rotary Encoder
×1
SSD1306 OLED 128x64 display
×1
Adafruit industries ada1536 image
Buzzer
×1

About this project

Follow your child's growth with a digital stadiometer!

During my childhood, my mother was used to periodically take my height and write it down on a block notes to follow my growth. Of course, not having a stadiometer at home, I was standing against the wall or the door jamb while she took the measure with a tape. Now I have a newborn grandaughter and when she starts walking, her parents will certainly be interested in following her growth in height. So, the idea of a digital stadiometer was born.

It is made around an Arduino Nano and a "Time of Flight" sensor which measures how long the tiny laser light takes to bounce back to the sensor.

Step 1: Parts and Components

Step 2: The Sensor

The ST Microelectronics VL53L0X is a new generation Time-of-Flight (ToF) laser-ranging module housed in a tiny package, providing accurate distance measurement whatever the target reflectances unlike conventional technologies.

It can measure absolute distances up to 2m. The internal laser is totally invisible to the human eye (wavelenght 940 nm) and complies with the latest standard in terms of safety. It integrates an array of SPADs (Single Photon Avalanche Diodes)

Communicating to the sensor is done over I2C. As the project includes also another I2C installed (the OLED), 2 x 10KΩ pullup resistors are needed on the SCL and SDA lines.

I have used the CJMCU-530, which is a breakout module featuring the VL53L0X by ST Microelectronics.

Step 3: Operations and Sensor Positioning

Once built and tested, the device should be mounted on the center of a door frame top; this is because if you mount it too close to a wall or an obstacle, the IR laser beam will be interfered and create a crosstalk phenomenum on the measure. Another option would be to install the device through an extension rod to move it away from the wall, but it is more inconvenient.

Carefully take the correct lenght measure between floor and the sensor (offset to be set) and calibrate the device (see next step). Once calibrated, the device can be used without need to calibrate again, unless you move it into another position.

Switch on the device and place yourself below it, in a straight and firm position. The measure will be taken when the device detects a steady lenght for more than 2.5 seconds. At that point it will emit a "success" music sound and keep the measure held on the display.

Step 4: Offset Calibration

As mentioned before, you need to set the correct value (in centimeters) for the offset, the distance between the measuring device and the floor. This can be achieved by pressing the rotary encoder knob (which has a pushbutton switch). Once activated the calibration mode, set the right distance by rotating the knob (clockwise adds centimeters, counterclockwise subtracts). Offset ranges from 0 to 2.55 m.

When done, just press the knob again. Two different tones will be generated by the internal buzzer to give you an acustic feedback. The calibration mode has a timeout of 1 minute: if you don’t set the offset within this timeout, the device exits from calibration mode and falls back to measuring mode, without changing the stored offset. The offset is stored into Arduino’s EEPROM memory, to keep it through subsequent shutdowns.

Step 5: Code

ST Microelectronics has released a full API library for the VL53L0X, including gestures detection. For the purpose of my device, I have found easier to use Pololu's VL53L0X library for Arduino. This library is intended to provide a quicker and easier way to get started using the VL53L0X with an Arduino-compatible controller, in contrast to customizing and compiling ST's API for the Arduino.

I have set the sensor in HIGH ACCURACY and LONG RANGE mode, in order to have more freedom on installation height and offset setting. This will result in a slower speed of detection, which is anyway enough for the purpose of this device.

The offset is stored in Arduino's EEPROM memory, whose values are kept when the board is turned off.

In the loop section, the new measure is compared with the previous one and if 2.5 seconds are passed on the same measure (and if it is NOT an Offrange or Timeout value), the measure is subtracted from the offset and steadly shown on the display. A "successful" short music is played by the piezo buzzer, to aurally notify the user.

Step 6: Schematics

Step 7: Enclosure/Case and Assembling

As my inability to cut rectangular windows on commercial boxes is very well known, I took the path to design a case with a CAD and send it for 3D printing. It is not the cheapest choice, but it is still a convenient solution because it offers the possibility of being very precise and flexible on the positioning of all the components.

The small laser chip is mounted without any cover glass, in order to avoid crosstalk and erratic measures. If you want to install the laser behind a cover, you'll need to undertake a complex calibration procedure as reported in ST Microelectronics' documentation.

Code

HTAY.inoArduino
No preview (download only).
Github
https://github.com/pololu/vl53l0x-arduino

Custom parts and enclosures

HTAY.stl
HTAY.stl

Schematics

Schematics
Htay schematic 67sdq8tqci

Comments

Similar projects you might like

Event Monitor for Independent Senior Citizens

Project tutorial by Team Rethink IoT

  • 4,010 views
  • 4 comments
  • 27 respects

OttoDIY Build Your Own Robot in One Hour!

Project tutorial by Camilo Parra Palacio

  • 111,673 views
  • 133 comments
  • 331 respects

Soldering Iron Controller for Hakko 907

Project tutorial by Alexander

  • 30,526 views
  • 22 comments
  • 68 respects

Temperature & Humidity Data Logging

Project tutorial by MatrixOrbital

  • 2,445 views
  • 0 comments
  • 16 respects

Light Intensity and Solar Panel Energy Detector

Project tutorial by Kutluhan Aktar

  • 2,074 views
  • 3 comments
  • 13 respects

UltraV: A Portable UV-Index Meter

Project tutorial by fmarzocca

  • 1,600 views
  • 1 comment
  • 12 respects
Add projectSign up / Login