Projects / Growth chart wall

Growth chart wall

Beginner1.5 hGuided buildReviewed

Build it step by step

0 of 7 done
  1. ESP32

    Mount the sensor

    Top of the frame, pointing down.

  2. ESP32

    Read the distance

    Print millimetres.

  3. ESP32

    Calibrate the floor

    Save the empty-floor reading.

  4. ESP32

    Measure a person

    Compare with a tape measure.

  5. ESP32

    Save by name

    Store height and date.

  6. ESP32

    Show the change

    Difference from the last entry.

  7. ESP3219.4 mASSD1306

    Add a chart

    Draw the last few heights on the OLED.

In short

How do you build a growth chart wall?

A ToF sensor on the doorframe measures a child's height and saves it by name. You need ESP32 DevKit V1, VL53L1X long-range ToF sensor, SSD1306 OLED Display and Tactile push button 6 mm × 3. It takes 7 steps and about 90 minutes.

Level
Beginner
Time
About 90 min
Parts
4

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
VL53L1X SDA and SCLESP32 GPIO21 and GPIO22Distance sensor
OLED SDA and SCLESP32 GPIO21 and GPIO22Display (shared I2C bus)
Sensor and OLED VCC and GNDESP32 3V3 and GNDPower
Child buttonESP32 GPIO25 to groundChoose a child
Measure buttonESP32 GPIO26 to groundSave a height
Floor buttonESP32 GPIO27 to groundCalibrate the floor distance (hold)

Code

The sensor sits at the top of a doorframe and measures down to the head; height equals the floor distance minus that reading. Hold the floor button with nobody standing there once to save the floor distance, then everyone is measured against it. Hold a flat card level on the child's head so the beam reads a flat surface instead of hair. The median of 15 readings removes jumps. Each entry stores the height and the date by child name in the ESP32's own flash, so the data stays when the power goes off. Wi-Fi is used only for the date, so put your own network name and password in the placeholders and never share the sketch with them filled in. Arduino IDE with the ESP32 boards package 2.0.x, board "ESP32 Dev Module". Only record heights with the child's and parents' agreement and keep the device indoors; this is a family keepsake, not a medical growth assessment.

Runs on a virtual ESP32 Dev Module in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

// Growth chart: sensor looks down from the top of a doorframe. Libraries: Adafruit_VL53L1X, Adafruit SSD1306, Preferences.
#include <Wire.h>
#include <Adafruit_VL53L1X.h>
#include <Adafruit_SSD1306.h>
#include <Preferences.h>
#include <WiFi.h>
#include <time.h>
const char* SSID = "YOUR_WIFI_NAME";
const char* PASS = "YOUR_WIFI_PASSWORD";
Adafruit_VL53L1X tof;
Adafruit_SSD1306 oled(128, 64, &Wire, -1);
Preferences prefs;
const char* NAMES[3] = {"Aanya", "Dev", "Mira"};     // your children's names
int child = 0;
float floorMm = 2100;
int medianDistance() {
  int v[15];
  for (int i = 0; i < 15; i++) {
    while (!tof.dataReady()) delay(5);
    v[i] = tof.distance(); tof.clearInterrupt();
  }
  for (int i = 0; i < 14; i++) for (int j = i + 1; j < 15; j++) if (v[j] < v[i]) { int t = v[i]; v[i] = v[j]; v[j] = t; }
  return v[7];
}
void screen(String a, String b, String c) {
  oled.clearDisplay(); oled.setTextColor(WHITE); oled.setTextSize(1);
  oled.setCursor(0, 0); oled.println(a); oled.println(b); oled.println(c); oled.display();
}
void setup() {
  pinMode(25, INPUT_PULLUP); pinMode(26, INPUT_PULLUP); pinMode(27, INPUT_PULLUP);
  Wire.begin(21, 22);
  oled.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  tof.begin(0x29, &Wire); tof.startRanging();
  prefs.begin("growth", false);
  floorMm = prefs.getFloat("floor", 2100);
  WiFi.begin(SSID, PASS);                            // only used to get the date from the internet
  unsigned long t0 = millis();
  while (WiFi.status() != WL_CONNECTED && millis() - t0 < 8000) delay(200);
  configTime(19800, 0, "pool.ntp.org");              // India time (UTC+5:30)
  screen(NAMES[child], "Press MEASURE", "");
}
void loop() {
  if (digitalRead(25) == LOW) { child = (child + 1) % 3; screen(NAMES[child], "Press MEASURE", ""); delay(400); }
  if (digitalRead(27) == LOW) {                      // hold with nobody standing there
    delay(1500);
    if (digitalRead(27) == LOW) { floorMm = medianDistance(); prefs.putFloat("floor", floorMm); screen("Floor saved", String(floorMm / 10.0, 1) + " cm", ""); delay(1500); }
  }
  if (digitalRead(26) == LOW) {
    float h = (floorMm - medianDistance()) / 10.0;   // centimetres
    String key = "n" + String(child);
    int n = prefs.getInt(key.c_str(), 0);
    float prev = n ? prefs.getFloat(("h" + String(child) + "_" + String(n - 1)).c_str(), 0) : 0;
    prefs.putFloat(("h" + String(child) + "_" + String(n)).c_str(), h);
    prefs.putUInt(("t" + String(child) + "_" + String(n)).c_str(), (uint32_t)time(nullptr));
    prefs.putInt(key.c_str(), n + 1);
    screen(NAMES[child], String(h, 1) + " cm", n ? "Since last: " + String(h - prev, 1) + " cm" : "First entry");
    delay(1500);
  }
}

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Empty doorwayFloor distance saved
Child under the sensorHeight within 1 cm of a tape measure
Press measure twiceTwo saved entries
Power off and onHistory is still there

If it does not work

Readings jump

Use a flat card and the median setting.

Height too high or low

Recalibrate the floor.

No date

Check the Wi-Fi details.

OLED blank

Check the address 0x3C.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the growth chart wall?

ESP32 DevKit V1, VL53L1X long-range ToF sensor, SSD1306 OLED Display and Tactile push button 6 mm × 3.

How long does the growth chart wall take to build?

About 90 minutes for a beginner maker, in 7 steps.

How do I know the growth chart wall works?

Empty doorway: Floor distance saved. Child under the sensor: Height within 1 cm of a tape measure. Press measure twice: Two saved entries.

Readings jump: what should I check?

Use a flat card and the median setting.

Height too high or low: what should I check?

Recalibrate the floor.

No date: what should I check?

Check the Wi-Fi details.

OLED blank: what should I check?

Check the address 0x3C.