TWO MIT STUDENTS BUILT A MACHINE THAT SOLVES A RUBIK'S CUBE IN 0.38 SECONDS

Six motors, two cameras, and a solve faster than you can blink — this held the world record.

by Ben Katz and Jared Di Carlo

FULL CAD BOM FIRMWARE DOCS

RoboticsOpen-hardware

difficulty
●●●●●
time
a month
license
none
repo
repo INACTIVE (NO COMMITS SINCE MARCH 2019)171 stars
1
Jump to section

COMPAREE VERDICT

This is one of the best-known ultra-fast cube solvers with open-source code. Jared Di Carlo published the software — the C++ vision and control code and the min2phase solver server — and Ben Katz described the hardware on his blog; there are no CAD files, BOM or motor-driver schematics in the repository. The 0.38-second solve beat the 0.637-second record of the time in 2018, and newer machines have since gone faster. It is a five-out-of-five build for a reason: six surplus ServoDisc DC motors with optical encoders, six custom motor drivers, two PlayStation Eye cameras run at about 150 fps, and a lot of tuning — the authors say mistakes often broke the cube or blew up FETs. Without published mechanical or electrical files, you are designing most of the hardware yourself. If you have machine-shop access, motor-control experience and a month to spend, it is a fantastic study; if not, start with a slower solver.

GOOD TO KNOW

  • —The repository contains the software only (vision, serial control and the min2phase solver); no CAD files are published there.
  • —No BOM in the repository — the hardware is described in Ben Katz's blog posts.
  • —The repo has the host-side C++ code (cameras, cube-state detection, serial link to the mbed motor controllers) and a Java min2phase solver server.
  • —Documentation is a one-paragraph README, the solve video and Ben Katz's blog post — no step-by-step guide.
  • —No licence is stated in the repository, so reuse rights are not granted — ask the authors.
  • —This was the 2018 record holder; newer machines have gone faster since.

Parts to buy

6 items

From our check of the build. Exact quantities and part numbers are in the creator’s BOM.

  • Six low-inertia DC servo motors with optical encodersFind
  • Parts for six custom motor driversfrom the repo files
  • Two PlayStation Eye camerasFind
  • Linux host computerFind
  • Acrylic sheet and 80/20 extrusionFind
  • High-voltage DC supply and a cheap speed cubeFind

BUILDS OF THE WEEK

Five open-source builds worth your weekend, every week.

Checked like this one: what’s really in the repo, what it costs, how hard it is. One email, unsubscribe anytime.

Can I build this?

PrintNothing printed in the original: the couplings were machined and the box was laser-cut acrylic on 80/20 extrusion. No CAD or STL files are published.
BuySix low-inertia DC servo motors (the original used Kollmorgen ServoDisc) with optical encoders, parts for six custom motor drivers, two PlayStation Eye cameras, a Linux host computer, acrylic sheet and 80/20 extrusion, a high-voltage DC supply and a cheap speed cube
ToolsLathe and mill access for couplings and motor shafts, a laser cutter for the acrylic box, a soldering station for the motor drivers, a high-speed camera for debugging moves, and a Linux machine for the vision code and solver
SkillsAdvanced — machining, motor-driver PCB design and assembly, DC servo control with encoders, real-time embedded programming and computer vision setup. This is not a first robotics project.
TimeA month if you have all the tools and skills; longer if you are learning motor control or machining as you go
Cost$$$ — no total is published; the original relied on surplus ServoDisc motors and encoders bargained on eBay, so your cost depends heavily on what you can scavenge.
SafetyThe motors spin cube faces at extreme speed — a mistimed move can break the cube and send pieces flying, so wear safety glasses during tuning. The drivers run from a high-voltage DC bus (the authors went up to 60 V and blew FETs when the cube locked up), so treat the power electronics with respect.

Build at your own risk. Projects involve tools, electronics and sometimes mains voltage — follow the creator’s safety notes.

Videos

0.38 Second Rubik's Cube Solve

Ben Katz's record-solve video, linked from the README; there is no build walkthrough.

More builds like this

All projects

Gallery

Ben Katz and Jared Di Carlo

Start here

Navigation into the creator’s own docs — we don’t rewrite the guide, we route you to the source.

  1. 1.Read the README and Ben Katz's blog post (Ben Katz's post 'The Rubik's Contraption' (build-its-inprogress.blogspot.com, March 2018) explains the motors, drivers and cameras; the README itself only links the solve video.)
  2. 2.Work out the parts from the blog posts and source the motors(The six ServoDisc DC motors with optical encoders are the hardest parts to find: the originals came from an old robot arm and eBay surplus, so confirm you can get equivalent low-inertia motors before committing to the build.)
  3. 3.Design the frame and machine the motor-to-cube couplings(No CAD files are published. The original is a laser-cut acrylic box on 80/20 extrusion with machined couplings and square drives that press into the cube's centre caps.)
  4. 4.Build and test the motor drivers(Six custom DC motor drivers, each with an STM32F303K8, commanded over differential serial — test each one individually before integrating into the full system.)

KNOWN ISSUES

  • The original uses six Kollmorgen ServoDisc DC motors (4 N9M4T, 2 UD9-E) with US Digital optical encoders, mostly found cheaply on eBay. They are discontinued surplus parts, so sourcing an equivalent low-inertia motor is your first real hurdle.
  • Tuning is the hard part: the authors debugged with a high-speed camera, and mistakes often broke the cube or blew up FETs in the motor drivers.
  • The two PlayStation Eye cameras point at opposite corners of the cube and were run at about 150 fps with low latency under Linux. That is not plug-and-play: expect to work on webcam configuration yourself.
  • The motor-to-cube couplings and square drives were machined, and the motor shafts were modified on a lathe to mount the encoders, so you need machine-shop access or a friend with one.
  • There is no Beaglebone in this design: the min2phase solver runs as a Java server on the host computer, and the C++ program talks to the mbed motor controllers over a serial port.
  • This is a 2018 one-off: the custom motor drivers (STM32F303K8, no current sensing) are only described on the blog, with no published schematics, so you will be designing your own drivers.

Is 0.38 seconds still the world record?

No — newer machines have since gone faster. In 2018 the 0.38-second solve beat the previous 0.637-second record; the code is still public, but the hardware is only described in a blog post.

Can I use different motors?

You will almost certainly have to: the original ServoDisc motors are surplus parts. The authors chose them for high torque-to-inertia, so pick motors with similar characteristics and expect to retune the controllers.

What is the frame made of?

Neither, really: the original frame is a box of laser-cut acrylic on scavenged 80/20 aluminium extrusion. The parts that were machined are the motor-to-cube couplings and square drives that press into the cube's centre caps. No CAD is published, so you would design your own.

What is the single most likely failure mode?

Motor timing. If the control loop is not perfectly tuned, one motor will lag, the cube will bind mid-turn, and the whole thing jams or breaks. This is where most of the month goes.

Community builds

No community builds yet — be the first, we feature the best ones.

Discussion1

FROM THE COMPAREE TEAM

The code is public, but the motors, mechanics and electronics behind the 0.38-second solve are not in the repository. If you tried to rebuild it, which part would you tackle first — the vision, the solver, or the motors?

CompareeTEAM2mo agoedited

Practical notes from our verification: this repository is software only. It holds the C++ control code (with an mbed serial link and webcam image acquisition) and a Java solver server based on the min2phase algorithm — there are no CAD files, motor driver schematics or PCB files here, so the mechanical and electrical side of the robot that the repo author built with Ben Katz is not documented in this repo. The repo has not been updated since 2019 and has no licence file, which means you cannot assume you are allowed to reuse the code. The README links the 0.38-second solve video. Treat this as a reference for how the vision and solving pipeline was structured, not as a build kit — reproducing the robot means designing the hardware yourself. Correction (4 October 2026): we re-checked this page line by line against the project's own repository, documentation and videos, and fixed errors in earlier versions.

Ben Katz and Jared Di Carlo

Ben Katz and Jared Di Carlo built the Rubik's Contraption at MIT in 2018. Ben built the motors, motor controllers and mechanics and documented them on his blog; Jared wrote the vision, synchronisation and solving software, which is the code in this repository. Their 0.38-second solve beat the 0.637-second record of the time.

GitHub

Star the project on GitHub

DISCLAIMER

  • Comparee is not the author of the projects featured here. All rights to each project belong to its creator — every page links to the original source, and we never host creators’ files.
  • Information is provided without warranty and may become outdated as projects evolve. Prices are indicative bands only — always check the creator’s parts list for current costs.
  • Building and operating any project is at your own responsibility. Protective equipment, safe workshop practice and compliance with local regulations are the builder’s responsibility.