If you've ever visited a science museum, an exhibition, or stumbled across a viral video online, you've probably seen those interactive sandboxes where creating a mountain with your hand instantly turns it into a colorful topographical map. Independent creator UncleStem has now recreated that experience in a much more compact and affordable form. By combining a $20 refurbished mini projector, a miniature Time-of-Flight (ToF) sensor, an ESP32-C3 microcontroller, and AI-assisted programming, the project transforms sand into a portable Augmented Reality (AR) sandbox that reacts to every movement in real time.
The system relies on a compact Tof Sensor that continuously measures the height of the sand using an 8×8 matrix consisting of 64 independent sensing zones. Instead of capturing images like a conventional camera, the sensor emits infrared light pulses and calculates the time it takes for them to return, generating a live depth map of the terrain. Early attempts using an Arduino Nano quickly ran into memory and processing limitations, leading to a switch to an ESP32-C3 Mini board that could efficiently handle the incoming data and transfer it via I2C communication. To complete the setup, the creator refurbished a secondhand projector by replacing its swollen internal battery and mounted both the projector and sensor onto a custom 3D-printed articulated arm designed in Fusion 360, ensuring both systems remained perfectly aligned.
The versatility of the ToF sensor extends beyond augmented reality applications. In another project covered by Circuit Digest, a maker repurposed the same ToF sensor to build a compact 3D scanner that captures depth information, highlighting the sensor's potential for a wide range of low-cost spatial sensing projects.
One of the most interesting aspects of the build is how AI was used as an engineering assistant throughout development. The program automatically color-codes the terrain, displaying blue for valleys, green for plains, brown for mountains, and white for the highest elevations. Multiple optimization passes increased performance from just 1 frame per second to a much smoother 15 FPS. Additional calibration tools, including a four-point corner alignment system and a dedicated "zeroing" function to compensate for sensor tilt, helped create a seamless AR experience. The project is a good example of how affordable hardware and AI-assisted development are making technologies once limited to universities and research labs accessible to everyday makers and educators.