Polargraph
A vertical drawing machine that uses a polar coordinate system to create pen-on-paper art
Author: Alexandru-Vlad Bîrsan
GitHub Project Link: https://github.com/UPB-PMRust-Students/acs-project-2026-vldxndr
Description
Polargraph - Vertical Plotter
The Polargraph is a vertical DRP (Digital Reconstruction Plotter) that operates on a polar coordinate system. Unlike the traditional plotter or printer that works on a X Y axis the polargrah transforms polar coordinates into coordonates on the paper by using two motors fixed over the paper that hold wires that have variable lenghts so they can position the drawing tool where it needs to be.
Motivation
The idea came to me because I have previously studied architecture and have always wanted to have something that could draw using real writing utensils, because while a printer can draw exactly what you want using pin point accuracy it lacks the soul of a hand drawing. This project aims to have the accuracy of a printer while portraying a hand rendered drawing.
Architecture
Log
Week 27 - 30 April
Wrote initial documentation and made the first diagram while ordering the parts. Decided to use preexisting software for transforming drawings into lists of instructions.
Week 12 - 18 May
Received all hardware components. Assembled the physical frame using a 60x80cm wooden board and mounted the two NEMA 17 stepper motors at 51.8cm apart. Wired the A4988 drivers directly to the STM32 Nucleo using dupont wires and a breadboard. Successfully tested basic stepper motor movement using Embassy async Rust firmware.
Week 19 - 25 May
Implemented full polargraph kinematics (inverse kinematics using polar-to-cartesian conversion). Added G-Code parser over UART (USART1 at 115200 baud) using BufferedUart. Implemented line interpolation with 1mm segments for smooth curves. Added SG90 servo pen lift control (M3/M5 commands). Successfully tested drawing a square using a Python script to stream G-Code from a .ngc file.
Hardware
The Polargraph is powered by an external 12V DC source to ensure constant torque for the stepper motors. For development purposes, the STM32 Nucleo is tethered via USB for real-time G-Code streaming and debugging. I also used a buck converter to give a steady current to the servo motor directly from the outlet converted to 3v3 because the connection on the stm 3v3 did not give suffiecient current. 3D printed a gondola that houses the servo motor(pen lifter) and the pen itself that is held up by the belts with 2 anchor points. Built a frame for the panel to stay upright and the electronic equipment to be held onto the back of it.
Schematics
Bill of Materials
| Device | Usage | Price |
|---|---|---|
| STM32 Nucleo-U545 | Main Controller (Brain of the project) | Owned |
| NEMA 17 Stepper Motor (1.7A) | Axis movement (2 pieces required) | 130 RON |
| A4988 Stepper Driver | Motor control (2 pieces required) | 20 RON |
| A4988 Expansion Board | Driver carrier with DIP microstepping and terminal block | 10 RON |
| SG90 Micro Servo | Pen lift mechanism | 15 RON |
| 12V 5A Power Supply | External power for stepper motors | 55 RON |
| GT2 Pulleys & Belt Kit | Mechanical transmission system | 40 RON |
| Breadboard MB-102 | Prototyping and circuit connections | 15 RON |
| Jumper Wires M-M / F-M | Connecting components to Nucleo | 15 RON |
| DC Jack Adapter | Connecting the 12V supply | 5 RON |
| Capacitor 100uF | Power spike protection for drivers | 5 RON |
Software
| Library | Description | Usage |
|---|---|---|
| embassy-stm32 | Async HAL for STM32 | GPIO for motor control, BufferedUart for G-Code streaming, PWM for servo |
| embassy-executor | Async executor for embedded | Entry point and task runner |
| embassy-time | Async timers | Precise delays for step pulses |
| defmt | Logging framework | Debug logging via RTT |
| panic-probe | Panic handler | Sends panic info through probe-rs |
| libm | Math library for no_std | sqrtf and ceilf for inverse kinematics |
| embedded-io-async | Async IO traits | Read/Write on BufferedUart |
Host Software & Toolchain
To transform digital images into physical drawings, the project uses a multi-step toolchain:
- G-Code Generation: Inkscape with G-Code extensions convert images (JPG/PNG) into paths using algorithms to give out the .ngc file that is required the polargraph to know where it should go.
- G-Code Streaming: A Python script streams the generated
.ngcfile over USB serial (USART1 at 115200 baud) to the STM32, waiting forok\r\nacknowledgement after each command before sending the next.
Links
- Inkscape - Vector graphics editor used for G-Code generation.
- Inkscape G-Code Extension - Extension for exporting paths as G-Code (.ngc) files.
- Polargraph Physics - Detailed explanation of the inverse kinematics involved.
- A4988 Datasheet - Technical specifications for the motor drivers.
- Example - Working example