Skip to content

albertaizic/smart-shelf-sensor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP32 Shelf Sensing Prototype

V1 uses an ESP32-S3, an OLED screen, a button, and a VL53L1X distance sensor to estimate how much shelf depth is occupied by an object.

The idea is simple:

empty shelf back distance - object front distance = occupied shelf depth

The prototype works well with the current firmware.

What it does

  • reads distance from the VL53L1X sensor
  • shows live distance on the OLED
  • saves an empty shelf back reference
  • calculates occupied shelf depth in mm and percent
  • checks if the sensor reading is stable before saving
  • shows the measurement variation/span on the screen
  • saves measurements in ESP32 flash memory
  • exports CSV through Serial Monitor

Hardware

  • ESP32-S3
  • VL53L1X ToF distance sensor
  • SSD1306 128x64 I2C OLED
  • push button
  • breadboard / soldered wiring
  • USB power

Controls

Action Function
Short press before calibration Save empty shelf back distance
Short press after calibration Save current shelf measurement
Hold 2 seconds Dump CSV over Serial Monitor
Hold 5 seconds Clear calibration and logs

Why the stability check matters

The VL53L1X is very sensitive to movement, angle, and small disturbances. A simple validation system checks the variation of recent sensor readings.

The OLED shows the span of the recent readings, so you can see if the sensor is stable before saving a measurement. The sensor should be placed on a stable support for reliable measurements.

Building

This project uses PlatformIO for building. Install PlatformIO (via VS Code extension or CLI) and run:

pio run          # Build
pio run -t upload # Upload to ESP32
pio device monitor # Open serial monitor

Libraries are automatically installed via platformio.ini.

Photos

Circuit Build

Circuit view 1

Circuit view 2

Circuit view 3

OLED Display

Stable reading (span < 35mm):

Stable reading

Waiting for stable reading:

Wait stable

Firmware logic

The firmware keeps a small buffer of recent distance readings, uses a median-style filtered value, and calculates the span between the minimum and maximum recent values. A measurement is only accepted when the reading is inside the expected range and stable enough.

Status

V1 prototype is working.

About

ESP32 shelf depth sensing prototype using VL53L1X ToF sensor with OLED display. Counts products on shelf by measuring occupied depth. V2 will use mmWave radar for 3D depth perception and product counting.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages