Skip to main content
Version: ACS CC

Drift Drawing Table

A kinetic sand table that draws using a magnet-controlled ball.

info

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.

alt text

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

DeviceUsagePrice
Raspberry Pi Pico WThe microcontroller35 RON
2 x NEMA 17HS4401 Stepper MotorThe motor that moves the ball2 x 34 RON
2 x A4988 Stepper Motor DriverThe driver for the stepper motors2 x 8 RON
Joystick ModuleThe joystick used to control the ball20 RON
HQ830 Breadboard + Jumper WiresPrototyping connections22 RON
Steel BallThe ball that draws in the sand8 RON
Metal bar for Ox and OyMovement of the ball2 x 90 RON

Software

LibraryDescriptionUsage
embassyAsync embedded framework for RustMain framework for handling async tasks like motor control, button input, and joystick
embassy-rpRP2350 support for EmbassyProvides access to GPIO, I2C, and timers for Raspberry Pi Pico 2
embedded-hal-asyncAsync traits for embedded driversUsed to write generic and portable async code for GPIO and I2C devices
hd44780-driver optionally(*)LCD text display driverUsed for 1602 LCD with I2C backpack, to show mode, pattern, or pause state
micromathLightweight math utilitiesUsed to generate circular, spiral, or custom paths for drawing
defmtLogging framework for embedded RustDebugging tool for monitoring runtime behavior over RTT
tiny-skia2D drawing and rasterization libraryOptional, used offline (on PC) to convert images or vector art to point paths for the table
heaplessFixed-size data structuresUsed 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.

  1. Sisyphus Table – The original kinetic sand table that inspired this project
  2. Embassy (Async Embedded Framework) – Used for multitasking, motor control, and async I/O
  3. Rust Embedded Book – Useful for understanding how embedded Rust works
  4. Stepper Motor Basics – Overview of how stepper motors work
  5. tiny-skia – (Optional) For offline conversion of images to paths