A 5-motor robot that solves a Rubik's cube end-to-end.
Browser input, local solving, serial commands, and ESP32-driven stepper motion in one compact pipeline.
5 motors. Open top. Full solve.
Python runs Kociemba locally: a fast two-phase solver used in speed-solving software to compute a near-optimal solution of roughly 20 moves in under 1 second.
Kociemba assumes all six faces can turn. This robot keeps the top open, so U and U' moves are expanded into a workaround using the surrounding motors.
The ESP32 still follows the same solve plan, but top-face requests are expanded for the 5-axis configuration, producing roughly 55 physical motor commands.
From colour input to physical motion
Click the images to inspect each stage.
Paint the cube state
The browser checks colour counts before solving.
Kociemba plans the solve
Python computes a near-optimal plan of roughly 20 moves in under 1 second.
Serial talks to ESP32
The plan expands to roughly 55 physical motor commands for the 5-axis rig.
The chassis does the work
Five steppers turn the gripped faces.
What is a U move?
U rotates the upper face. This robot has no top motor, so the cube below carries 13 physical turns forward until the same top-turn outcome appears.
Right face clockwise
The right motor turns its face 90 deg clockwise, viewed from the right side.
Mechanical iteration gallery
Click any image to inspect the chassis, wiring, and fitment details.
How V1 landed
End-to-end pipeline works on arbitrary valid scrambles: state is typed into the browser, solved locally in Python, and pushed to the ESP32 over Serial. Kociemba computes a near-optimal solution of roughly 20 moves in under 1 second, then the 5-axis configuration expands it to roughly 55 physical motor commands.
The open-top, manual-input design has been a clear win for V1: it keeps the mechanical envelope small, makes cube changes trivial, and lets the focus stay on solver correctness and motor control rather than on a vision pipeline. Computer-vision colour detection and a 6th U-face motor are the obvious next steps for V2.
firmware
- ESP32 DevKitC
- C++ / Arduino
- AccelStepper library
- TMC2209 V2.0 stepper drivers
- Serial command protocol
solver
- Python
- Kociemba two-phase algorithm
- Localhost Python service
- Numeric + prime move notation
frontend
- HTML / JavaScript
- Colour-palette cube input
- Real-time state validation
- Solve timing + move list display
mechanical
- 5× NEMA 17 stepper motors
- Fusion 360 CAD
- Bambu Studio slicing
- PLA+ filament
- 12V 8A bench supply
- A cleaner manual-input interface where the cube state is entered on-screen, then solved and executed from one button.
- Computer-vision colour capture to remove manual state entry.
- A 6th U-face mechanism for shorter physical solutions.
- A custom PCB design to replace the breadboard wiring with a cleaner, more reliable electronics stack.