LO RUSSO
Resume
Resume
Back to Projects

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.

See pipelineTop-turn trick
Motors
5
R, L, F, B, D
Solver moves
~20
near-optimal Kociemba plan
Solve time
<1s
local Python compute
Physical
~55
5-axis motor commands
DemoOverviewPipelineTop turnBuildStack
Overview

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.

U = R L F2 B2 R' L' D L' R' B2 F2 L R
Pipeline

From colour input to physical motion

Click the images to inspect each stage.

01

Paint the cube state

The browser checks colour counts before solving.

02

Kociemba plans the solve

Python computes a near-optimal plan of roughly 20 moves in under 1 second.

03

Serial talks to ESP32

The plan expands to roughly 55 physical motor commands for the 5-axis rig.

04

The chassis does the work

Five steppers turn the gripped faces.

Interactive

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.

R
Right face clockwise
L
Left face clockwise
F2 / B2
Front or back half-turn
D
Bottom face clockwise
'
Prime: turn counter-clockwise
Objective
U moveU
Replicated by 13 physical moves on the surrounding faces (no top-face motor).
Step 1 / 13
Right face clockwiseR
TargetTop face clockwise
ConstraintNo top motor
Step 1 of 13

Right face clockwise

The right motor turns its face 90 deg clockwise, viewed from the right side.

Build

Mechanical iteration gallery

Click any image to inspect the chassis, wiring, and fitment details.

Results

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.

Stack

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
Next steps
  • 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.
Previous project
Custom Watch Build
Next project
Residential Construction & Renovation