Sriracha Drawing Machine
A 2+ DoF CNC-style drawing machine that uses sauce to plot AI-generated vector art onto food
Project Concept
Our goal was to build a 2-axis CNC drawing machine with a custom end-effector: a sauce pump that could dispense sriracha, ketchup, or other condiments to draw AI-generated artwork onto food like pancakes and tortillas. The system would use text-to-image AI to generate SVG vector art, convert it to motor commands, and stream them over WiFi to an ESP32 controller.
Hardware Components
- •2-axis gantry with stepper motors (X/Y)
- •XIAO ESP32C3 microcontroller
- •Limit switches for homing/calibration
- •PWM-controlled sauce pump end-effector
- •Laser-cut wooden frame
Software Pipeline
- •OpenAI GPT for SVG generation from prompts
- •SSG compiler (SVG → motor commands)
- •Path optimization & simplification
- •WiFi streaming to ESP32
- •Simulation/visualization tools
Hardware Build

Our Drawing Machine - Close-up
Close-up view of our 2-axis gantry system featuring stepper motors, linear rails, belt drive mechanism, and laser-cut wooden mounting pieces. The carriage holds the end-effector mount.

Full Machine Setup
Wider view showing the complete machine setup with the gantry system, power supply, and wiring. The sauce pump end-effector is visible at the top of the image.

Electronics & Early Testing
One of our test setups showing the breadboard with stepper motor drivers (A4988), microcontroller, and wiring.

Troubleshooting Session
Multiple rigs on the lab tables during one of our troubleshooting sessions. Our machine is in the center. We had to disassemble other groups' machines to find working parts and test stepper motor wiring configurations.
Hardware Challenges
⚠️Project Status: Incomplete Due to Hardware Issues
Unfortunately, we were unable to complete a fully working demonstration due to a series of hardware setbacks. While the software pipeline was fully functional, we could not reliably integrate it with the physical machine.
Faulty Laser-Cut Parts
Our wooden frame pieces were faulty and had to be re-laser-cut three times. This set the team back significantly in the timeline.
Repeated Rebuilds
The machine had to be taken apart and rebuilt at least 8 times during debugging, each time requiring re-wiring and re-calibration.
Missing Circuit Board
After getting the rig moving, our entire breadboard with all the circuitry went missing (stolen or misplaced). Since we had a fully built system, we couldn't easily identify the correct wiring pairs for the stepper motors to rebuild it.
Motor Issues
The stepper motors were jiggling when powered, and we were unable to integrate the limit switches for proper homing. We attempted to use parts from other groups' machines but ran out of time to get everything working together.
What DID work: We had a working pump, the motors did move at one point before the circuitry went missing, and the entire software pipeline was fully functional and tested with the simulator.
▶Working Pump Demo
Video showing our PWM-controlled sauce pump successfully dispensing.
Software Pipeline (Working!)
While the hardware integration failed, we successfully built a complete software pipeline from text prompt to motor commands. The code is available on GitHub.
TEXT PROMPT "a frog in a pond"
│
▼
┌──────────────────┐
│ 1. AI GENERATOR │ OpenAI GPT → SVG vector art
└────────┬─────────┘
▼
┌──────────────────┐
│ 2. SSG COMPILER │ SVG → Motor commands (.ssg)
│ - Tessellate │ Bezier curves → line segments
│ - Simplify │ Douglas-Peucker algorithm
│ - Optimize │ Nearest-neighbor path order
└────────┬─────────┘
│
┌────┴────┐
▼ ▼
SIMULATOR HARDWARE
(preview) (ESP32 + motors)G0 - Rapid Move
Travel without dispensing sauce
G0 X10 Y20G1 - Draw Move
Move while dispensing sauce
G1 X50 Y30 F600M3/M5 - Sauce
Turn sauce pump on/off
M3 S75 / M5🎨AI Art Generation Demo
Text Prompt
"a frog in a pond"
Using OpenAI GPT-5.1, we generate stroke-only SVG vector art optimized for single-line drawing. The AI is constrained to produce paths suitable for plotting within a 220×220mm area.
Generated SVG: "a frog in a pond"
Compiled SSG Commands (Sample)
The SVG is compiled into 221 sequential motor commands. Here's a sample showing the homing sequence and the start of the first drawing path (the pond outline):
N1 G28 ; Home machine (calibrate position) N2 M3 S60 ; Prime pump at 60% flow N3 M5 ; Pump off N4 G0 X80.00 Y17.00 F3000 ; Rapid move to start of pond outline N5 M3 S60 ; Sauce ON N6 G1 X78.78 Y23.95 F600 ; Draw move (begin pond ellipse) N7 G1 X75.18 Y30.68 F600 ; Continue drawing... N8 G1 X69.28 Y37.00 F600 N9 G1 X61.28 Y42.71 F600 N10 G1 X51.42 Y47.64 F600 ... N41 G1 X80.00 Y17.00 F600 ; Complete the pond outline N42 M5 ; Sauce OFF N43 M3 S60 ; (prepare for next shape) ... N221 M114 ; Report final position
Full file contains 221 commands that draw the complete frog design.

Simulation: Path Preview
AI-generated frog design compiled to SSG commands. Red lines show drawing moves (sauce ON), blue dashed lines show travel moves (sauce OFF). The gray circle represents the plate boundary (220mm).

Simulation: Drawing Sequence
Same design but color-coded by time: cyan (start) → red (end). This shows the optimized path order that minimizes travel distance between strokes.
Source Code
The complete software pipeline including AI image generation, SSG compiler, simulator, and ESP32 firmware is available on GitHub.
mmattyV/sriracha-drawing-machineReflection
This project was a humbling lesson in the unpredictability of hardware development. Despite having a solid concept, complete software pipeline, and many hours of work, we couldn't overcome the cascade of hardware failures and lost components.
The biggest takeaway is the importance of documentation and redundancy. When our breadboard went missing, we had no wiring diagram to rebuild from. In future projects, I'll take photos of every circuit and document pin connections before moving on.
Despite not achieving a working demo, I'm proud of the software pipeline we built. The AI-to-SVG-to-motor-commands system worked flawlessly in simulation, and the codebase is well-documented for future iterations. Sometimes learning what NOT to do is just as valuable.