When I saw this project, I knew: I wanted to build one!
First, it can do something I am not capable of.
Second, it involves computer vision, mechanics, some sort of artificial intelligence, and
3D printing.
And third: It’s so cool that I can show it to friends and brag about it.
What do you want more?
I know: It should be easy to build and not be too expensive.
So, let’s build one.
I can’t wait.
Grüezi YouTubers.
Here is the guy with the Swiss accent.
With a new episode and fresh ideas around sensors and microcontrollers.
Remember: If you subscribe, you will always sit in the first row.
I have always admired people capable of solving Rubik’s Cubes, invented in 1974 by a Hungarian.
I never had the time nor endurance to learn it.
Look at this marvel: It solves every pattern in less than 20 moves.
Guaranteed.
If you are interested in the algorithm behind it, feel free to visit Herbert Kociemba’s
site.
I am glad that brighter people than I wrote an algorithm to solve this problem.
They already started in 1981, when the best needed a maximum of 52 moves.
In 2010 they were down to 20.
And after investing a lot of computing power, it is clear that this is the lowest number.
This is why they call it “God’s Number.”
And our bot will be able to solve all patterns within the limit of “God’s number.”
May I introduce you to CUBOTino, the tiny cube solver?
First question: What do we need?
For a head start, I strongly suggest downloading and “read the fine manual.”
Why?
Because I did not do it and lost a lot of time.
Andrea, the creator of this marvelous project, wrote a pdf that contains everything.
Before you start your 3D printer, download his repository and save it to your disk.
It contains all the needed files, also the STL files.
For printing, switch “generate support” off.
It is not needed because Andrea did a marvelous construction job, and it clogged my screw
holes.
Next, we need an ESP32.
Any board works.
But if you want to fit it into the bot, it should not be too big.
You will find links to most parts I used in the video description.
We only need three pins and ground.
Pin 22 and 23 for the servos and pin 32 for a touch sensor for the emergency stop.
Because we will use powerful 25kg servos, they draw a lot of current.
This is the reason for these capacitors.
I went a different way and completely separated the supply voltage of the servos from the
ESP32 and power the ESP32 via the USB cable of the computer.
Now I can power the servos with 6 volts and gain some speed.
Here is my proposal for the wiring.
I used a smaller protoboard because I had no bigger one in my assortment.
If you connect the servos to the connectors on the ESP32 board, the power cable of the
board to your lab power supply or a strong USB power brick, and the ESP32 USB to your
PC, the first part of the project is finished and can be tested.
The ESP32 runs Micropython.
Not a big problem if you follow the instructions.
Just install Thonny and flash Mycropython to your ESP32.
You will find the needed bin file in the repository.
Now, your ESP32 is fluent in Python, and you can copy the Python files from the ESP32 directory
into the flash memory.
Do not yet copy main.py because it will automatically start the bot’s programs.
Next, we start “servo_to_mid.py “ to test your servos and put them in the middle position.
Use 180-degree servos, not 270 or 360 degrees, because they have reduced accuracy.
Select the one with the bigger range for the cup holder out of your two servos.
It later facilitates the adjustments.
Do not forget to copy mains.py to the bot when you finished the tests.
When the 3D-printed parts are ready, we can start with the assembly.
Just follow the instructions.
Andrea made it easy and used standard M3 screws, which dig a thread into the plastic holes.
This simple method works ok but needs a lot of power for the first mounting.
Therefore, I was happy about this little Bosch tool.
Still, you should not remove the screws many times.
So think first.
And as said before: RTFM.
I know why I say this twice.
The whole assembly should not take too long.
And if you pay attention to aligning the servo arms before you start the assembly, there
will be no need to disassemble the bot later and correct your mistake.
So part two of the project is ready, and we can go on with installing the rest of the
software on the PC.
Also here, follow the instructions.
Now we are only one step away from our goal: We start the CUBOTino Gui and get this picture.
First, we connect to the ESP32 on CUBOTino using these three buttons.
After that, it is connected and waits for commands.
No, do not try to start right now with your cube.
You will be disappointed!
The bot will not do what you want and must first be adjusted.
To do so, we go to the second page.
Here we find all the bells and whistles to adjust our bot.
I suggest setting all movement times to the maximum.
The bot will be slower, but you will not have problems.
Later, you can still reduce the times to increase speed.
Next, I adjusted the positions of the cup holder, starting with the two extreme positions.
Set the sliders in these positions for a start and hit “send new settings to CUBOTino.”
You must open the servo and add a resistor if you cannot reach both positions.
I did this mod with one 470 ohms resistor to extend its range to about 190 degrees.
Like that, adjustment was easier.
Now you can shift the two sliders toward the “home” position until the positions are
ok.
Next, you adjust the home position the same way.
Now press “open” and add your cube.
Next, put this slider to the right and press “close.”
You should hear the sound of a blocked servo.
Shift the slider slowly to the left, open and close the lid till the servo is free in
the closed position.
The open position must not block the turning of the cube.
Remember to “send the new settings to the bot.”
Otherwise, they are not active.
The last adjustment is the flip.
In the upper position, it should be at roughly a right angle.
For the last test, I suggest closing the lid and turning the cube to all three positions.
Then you quickly see if you need more adjustments.
Now your bot is ready for the first action.
Start with the “Random” button and press “send data to the robot.”
Now you can watch the action!
It does not matter if the cube was already messed up, BTW.
Now you see if everything works as planned.
And now comes the big moment: We start “read and solve” and present the faces of the
cube to the webcam of our PC.
Andrea did a video where he shows how this has to be done.
If you do not comply, the computer will tell you, and you can start over.
As soon as all faces are accepted, the needed movements toward a clean cube are presented.
Do not forget to put the cube back into the robot before you send the data.
Now you can wait and be astonished.
At first, it looks like this bot has no clue, but suddenly, the cube is clean.
Impressive!
Now you are ready to show your robot to the world.
When I chatted with Andrea, who, BTW, builds coffee makers for his living like a real Italian,
he revealed a secret: He enhanced his design and replaced the PC with a Raspberry Pi Zero
2 and a camera to get a completely automatic robot.
By chance, I have such a Raspberry board lying around.
So rest assured: I will show off at Christmas with a completely automatic CUBOTino “deluxe.”
Cool!
This is all for today.
Will you build your own CUBETino, too?
As always, you find all the relevant links in the description.
I hope this video was useful or at least interesting for you.
If true, please consider supporting the channel to secure its future existence.
Thank you!
Bye