5x5x5 Rubik’s Cube solving robot

flyboy74
Sun Jan 27, 2019 2:32 am
I will post this project here as it may interest some members of this forum.

I have got all the base mechanics working on the 5x5x5 Rubik’s cube solving robot that I am building see https://www.youtube.com/watch?v=H8SNoDKHWy0

I have designed everything. I created all the grabbers in fusion 360 then cut them out with my laser cutter. I designed the PCB in eagle cad and it features an ESP32 Wrover module as the MCU.

I plan to run the solving algorithm on my PC then it sends the solution to the robot via WiFi then robot will solve the cube.


BennehBoy
Sun Jan 27, 2019 9:25 am
Fantastic work, can’t wait to see it solving the cube.

ahull
Sun Jan 27, 2019 11:41 am
[BennehBoy – Sun Jan 27, 2019 9:25 am] –
Fantastic work, can’t wait to see it solving the cube.

+1 What he said. :D


flyboy74
Sun Jan 27, 2019 12:43 pm
I will use Daniel walton’s NxNxN cube solving algorithm see https://github.com/dwalton76/rubiks-cub … MM9dDYakGU

fpiSTM
Sun Jan 27, 2019 1:12 pm
Nice work! This will help me to solve it properly instead of disassemble it :lol:

Just4Fun
Sun Jan 27, 2019 4:08 pm
Great!!! :D

zoomx
Mon Jan 28, 2019 8:30 am
+1 !!!

flyboy74
Sun Feb 03, 2019 6:25 am
Got my robot to the stage it can solve a 5x5x5 cube although it isn’t the fastest. I will now spend some time to optimize the movements as I want to get it under 3mins

https://www.youtube.com/watch?v=9ORa0B_ … e=youtu.be


BennehBoy
Sun Feb 03, 2019 10:55 am
May not be fast but it’s pretty damned cool, and it’s a big cube compared to the ones I first had in the 80’s :D

flyboy74
Mon Feb 04, 2019 7:21 am
Spent the day optimizing some of the movements and also making it smoother and more accurate so that I can go faster.

My first solve was over 14mins, I now have it down to over 7mins https://www.youtube.com/watch?v=dQmz-K5 … e=youtu.be


MoDu
Mon Feb 04, 2019 12:57 pm
Very nice, keep going!

My suggestion for the next step, would be to implement some form low-level movement control, i.e. don’t just scream at the servos “GO THERE” but provide a smooth path with body mass inertia accounted for (loosely).

A simple low pass filter would yield better results right away.
The results will be less jittery, noisy and you’ll have less overshoot and less chances of misalignments.


flyboy74
Mon Feb 04, 2019 9:27 pm
[MoDu – Mon Feb 04, 2019 12:57 pm] –
Very nice, keep going!

My suggestion for the next step, would be to implement some form low-level movement control, i.e. don’t just scream at the servos “GO THERE” but provide a smooth path with body mass inertia accounted for (loosely).

A simple low pass filter would yield better results right away.
The results will be less jittery, noisy and you’ll have less overshoot and less chances of misalignments.

ATM the servos are the slowest bit, I want them to go faster, I have ordered faster servos. I don’t really have to worry about over shoot as the servos r only doing 1 of 2 things: getting out of the way(fully open) or closing to hold the cube as tight as possible

The steppers have nice acceleration and I also though they had nice deceleration until I notice that I was getting extra steps when I increased top speed of the stepper, I have found a bug in my stepper functions that meant it never started the deceleration but rather went to to correct amount of steps at full speed then tried to just stop. I fixed the bug now so can go faster without over shooting and getting extra steps.

ATM the robot returns to an exact state after each turn of a face meaning it is doing about 30% extra movements than needed. I will work on that next. My goal would be to get it to solve the 5x5x5 in under 3mins. Out of all the people that I have meet online in the cube community that have been building these robots, 5.5mins is about the fastest robot that I know of and that was using the crane cuber design. My design is a new approach never used before.


BennehBoy
Mon Feb 04, 2019 9:46 pm
Could we have a peep at the various bits of code, robot code, solving code etc or is it all secret squirrel? Obviously would understand if you want to pip the record first :D

RogerClark
Mon Feb 04, 2019 10:09 pm
I think the mass (weight) of the servos which gab the blocks is important, because you have to rotate that mass using your other motors.
Making the grabber assembly as light as possible would make speeding up the operations easier.

Making the 2 gantry / towers on the left and right, more rigid would probably also help


flyboy74
Tue Feb 05, 2019 3:11 am
[RogerClark – Mon Feb 04, 2019 10:09 pm] –
I think the mass (weight) of the servos which gab the blocks is important, because you have to rotate that mass using your other motors.
Making the grabber assembly as light as possible would make speeding up the operations easier.

Making the 2 gantry / towers on the left and right, more rigid would probably also help

Yes these r all things that I tried to achieve during the many iterations of the mechanical design. The weight if the grippers is a big governor of how fast I can accelerate and top speed of the rotations of the grippers. I did originally start with smaller servos and lighter gripper design but the gripper was flexing leading to inaccurate turning of the faces and the servos didn’t hold the cube tight enough and the cube would slip in the gripper. Once the faces don’t turn exactly then the cube will jam and leading to bits of acrylic flying through the air :(

It was easier with the 3x3x3 cube solving robot that I build because u can buy 3x3x3 speed cube that can be adjusted how tight they r and I loosen them to turn very fast. No one make a 5x5x5 speed cube

The gantry is pretty stiff and I haven’t had problem with it flexing so far.


flyboy74
Tue Feb 05, 2019 3:17 am
[BennehBoy – Mon Feb 04, 2019 9:46 pm] –
Could we have a peep at the various bits of code, robot code, solving code etc or is it all secret squirrel? Obviously would understand if you want to pip the record first :D

I did link Daniel Walton’s code that finds the solution in an earlier post. The code that I have for taking the output solution then executing it on the robot is fairly simple atm but it will continue to become more complex as I optimize it to not do unnecessary movements. ATM I am developing the code in Micro-Python as it makes for much faster development. Once I have it fully optimized I will port it to C. I plan to make all code and hardware design open source when finished.


flyboy74
Tue Feb 05, 2019 3:24 am
Here is Daniel Walton NxNxN cube solver https://github.com/dwalton76/rubiks-cub … MM9dDYakGU

I have uploaded my current version of code. Do beware it is development code so nothing commented out and the code is quite unorganized atm. cube.py is the main program and Steeper.py has a class for driving the stepper. https://github.com/OutOfTheBots/5x5x5_cube_robot


BennehBoy
Tue Feb 05, 2019 7:56 am
Cheers, buddy.

MoDu
Tue Feb 05, 2019 11:35 am
[flyboy74 – Mon Feb 04, 2019 9:27 pm] – I have found a bug in my stepper functions that meant it never started the deceleration but rather went to to correct amount of steps at full speed then tried to just stop. I fixed the bug now so can go faster without over shooting and getting extra steps.

Ah, this was the most jarring movement I was seeing. Sorry, the robotics engineers in me can’t let a jerky robot movement go by unfixed!


flyboy74
Sat Feb 09, 2019 12:58 pm
I have spent a bit if time optimizing the robot it is now solving the cube in 4:45mins. see https://www.youtube.com/watch?v=sD4bG8h … e=youtu.be

I uploaded the code that runs on the robot to GitHub https://github.com/OutOfTheBots/5x5x5_cube_robot

I will also upload the DXF files for cutting out all the components with a laser cutter before too long as well.


BennehBoy
Sat Feb 09, 2019 1:14 pm
Fantastic progress.

MoDu
Sun Feb 10, 2019 12:58 pm
Nice, much smoother!

flyboy74
Sun Feb 10, 2019 9:14 pm
[MoDu – Sun Feb 10, 2019 12:58 pm] –
Nice, much smoother!

I am finding lots of problems with using really cheap drv8825 step sticks from aliexpress. They don’t seem to get remotely close to the specs in the ti datasheet. The DRV8825 chip gets ever hot at even quite low currents then the stepping becomes unstable. I found increasing capacitance on the power supply to reduce noise helped a lot and also a fan blowing on the heat sink on the chip also helped.

I have order some TB6600 as a better stepper driver https://www.aliexpress.com/item/1pcs-TB … 89130.html

I have found some other small optimizations and now have it solving in 4:30mins, notice just how much smoother and more accurate the steppeing is now since the extras caps and fan https://www.youtube.com/watch?v=N-yAnfo … GCuRygga3k


BennehBoy
Sun Feb 10, 2019 9:17 pm
Yup, it’s looking great…

…for even more speedup, does the gripper arm travel need to be as wide – presumably this is to guarantee clearance, but I suspect not all moves need as much clearance?


flyboy74
Sun Feb 10, 2019 9:24 pm
There is certainly scope for reducing gripper travel. In the beginning I wasn’t worried about speed just wanted to make it work without colliding.

I have mainly been working on optimizing the movements so that I wasn’t doing any extra movements that wasn’t needed. I don’t think there is much more scope for too much more improvements in that now.

The steppers are now moving much faster than the grippers so the grippers are becoming a bottle neck. I have ordered some faster severos and when they arrive I will work on tuning gripper travel and maxing out the servos then.


BennehBoy
Sun Feb 10, 2019 9:26 pm
Brilliant.

Leave a Reply

Your email address will not be published. Required fields are marked *