Drift Drawing Table
A kinetic sand table that draws using a magnet-controlled ball.
Author: Aliu Maria-Denisa
GitHub Project Link: Drift Drawing Table
Description
An interactive coffee table that draws patterns in sand using a steel ball moved by a magnet underneath. It features an automatic mode with predefined patterns and a manual mode controlled by a joystick. The user can pause the drawing to admire the current shape or press a reset button and start fresh.
Motivation
I wanted to create a relaxing and visually engaging project that combines artistic expression with embedded systems. The idea of a kinetic sand table felt like a unique way to explore motion control, user interaction, and creative design. It's a great opportunity to learn more about stepper motor control and real-time input handling, while also building something people can enjoy watching and interacting with.
Architecture
The system is composed of the following main components:
-
Controller Core: Raspberry Pi Pico 2 runs the main control loop and manages motor drivers, input handling and, optionally, display output.
-
Motion Controller: Two stepper motors control the X and Y position of the magnet beneath the table, based on trajectory data.
-
User Input Manager: A joystick is used to switch between modes and control the ball in manual mode. Additional buttons allow the user to pause the drawing or clear the sand.
-
Drawing Engine: In automatic mode, a pattern generator creates coordinate sequences (e.g., circles, spirals) sent to the motion controller.
These components communicate in an event-driven and partially asynchronous manner using Embassy's async runtime on the microcontroller.
Log
Week 5 - 11 May
- Defined the project scope and functionality (manual + automatic drawing modes).
- Designed system architecture and created component diagram.
- Selected core hardware components (RP Pico 2, NEMA 17, A4988).
- Started basic Rust setup for Pico alone using Embassy framework.
Week 12 - 18 May
Week 19 - 25 May
Hardware
Raspberry Pi Pico 2W
- Purpose: Central controller
- Function: Coordinates the operation of all components, including stepper motors, input buttons, joystick, and optional display. Runs the control logic for both automatic and manual drawing modes.
Stepper Motors (2x NEMA 17 – 17HS4401)
- Purpose: Drives the magnetic drawing mechanism
- Function: Moves a strong magnet in X and Y directions underneath the sand surface. The magnet guides a steel ball placed on top, forming visible patterns.
A4988 Stepper Motor Drivers (2x)
- Purpose: Motor control interface
- Function: Controls the power and step timing of the stepper motors, based on signals received from the Raspberry Pi Pico.
Joystick (with X/Y movement and click)
- Purpose: User interaction (manual mode + mode switching)
- Function: Allows users to directly control the ball's position or switch between automatic and manual drawing modes via button press.
Push Buttons ("Pause" and "Reset")
-
Purpose: Additional user input
-
Function:
-
Pause Button: Freezes the drawing to let users admire the current shape.
-
Reset Button: Moves the magnet in a cleaning pattern to flatten the sand for a new design.
-
Optional LCD or OLED Display (or LEDs for status indication, if no display is used)
- Purpose: Displays system status / User feedback
- Function: Shows current mode (Manual / Automatic), drawing pattern name, and progress. If the LCD is not used, LED indicators will be added to signal the current mode and status (e.g., "Drawing", "Paused", "Clearing").
Metal Bar + Mechanical Structure
- Purpose: Physical movement support
- Function: Guides the motors and magnet system along defined X and Y axes, ensuring smooth and accurate motion beneath the sand layer.
Schematics
Place your KiCAD schematics here.
Note: The schematics are not yet available, but they will be created using KiCAD at a later stage of the project. The current focus is on the software and hardware integration.
Bill of Materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico W | The microcontroller | 35 RON |
2 x NEMA 17HS4401 Stepper Motor | The motor that moves the ball | 2 x 34 RON |
2 x A4988 Stepper Motor Driver | The driver for the stepper motors | 2 x 8 RON |
Joystick Module | The joystick used to control the ball | 20 RON |
HQ830 Breadboard + Jumper Wires | Prototyping connections | 22 RON |
Steel Ball | The ball that draws in the sand | 8 RON |
Metal bar for Ox and Oy | Movement of the ball | 2 x 90 RON |
Software
Library | Description | Usage |
---|---|---|
embassy | Async embedded framework for Rust | Main framework for handling async tasks like motor control, button input, and joystick |
embassy-rp | RP2350 support for Embassy | Provides access to GPIO, I2C, and timers for Raspberry Pi Pico 2 |
embedded-hal-async | Async traits for embedded drivers | Used to write generic and portable async code for GPIO and I2C devices |
hd44780-driver optionally(*) | LCD text display driver | Used for 1602 LCD with I2C backpack, to show mode, pattern, or pause state |
micromath | Lightweight math utilities | Used to generate circular, spiral, or custom paths for drawing |
defmt | Logging framework for embedded Rust | Debugging tool for monitoring runtime behavior over RTT |
tiny-skia | 2D drawing and rasterization library | Optional, used offline (on PC) to convert images or vector art to point paths for the table |
heapless | Fixed-size data structures | Used to buffer the X/Y coordinate queue for the ball to follow |
(*) Note: Either an LCD (text) or LEDs will be used to show system state.
Links
- Sisyphus Table – The original kinetic sand table that inspired this project
- Embassy (Async Embedded Framework) – Used for multitasking, motor control, and async I/O
- Rust Embedded Book – Useful for understanding how embedded Rust works
- Stepper Motor Basics – Overview of how stepper motors work
- tiny-skia – (Optional) For offline conversion of images to paths