Let's Make Robots!

The cubot (letsmakerobots.com)

Solves the famous Rubiks cube
Code_for_cubot.txt46.87 KB

Well,this is the second robo I've built. My first robo was based on the good'ol idea of Obstacle avoidance,this time I've tried something different. All Information is given in the video itself. Whole machine is made out of hard cardboard .Thanks to LMR for inspiring me to jump into robotics. I am happy to be a member of LMR.

There are four servos,two for the arm,one for the platform,and the last for the scanner...

The Arm with the micro servo



Arm lifter Servo(Normal,plastic geared),the the rubber grippers attached on the Arm)



Well the platform motor is dead now,it's brushes are corrupted. I'm searching for a new motor.


the platform motor detached (Metal geared servo) and the paltform

In an interval of 10seconds,the scanner scans the presence of a cube,and if it founds one,it starts it's job.

The colours are represented by numbers in the Atemga's programme. there are six numbers starting from 1 to 6,representing six different colours,and I've defined an array like this "fa [face number] [cube number] " to hold the colours for different faces.

The scanner


Once the colour scanning is complete,the scanner goes to bed !!! Rest emulation of cube is done inside the Atmega.

A main problem I faced while designing this,was the 180degree servo. While solving a cube, sometimes you'll need to turn it more than that,well i overcame that in my coding....yeah !!!!

The sketch size is 20kb (approx). it completely runs on the Atmega itself. USB cable is there just to supply power to the microcontroller. (I was to lazy to bring out another adapter out of my toolbox...).

For the colour sensor,I have used three LDR's wrapped in red,blue,green plastic sheet. There's one LED inside that sensor as the light source. There's also a ambient colur sensor and compensetor inside my code,that reduces errors. However,too much change of light disturbs the sensor.

Insight of the Sensor..

Three LDRs and one LED at the centre

Initially I was using the Atmega168,but I noticed that it was running out of RAM. so,I switched to Atmega328 with twice the RAM.

I had to make the cube smooth enough. For that I took it apart,rubbed the edges with sand paper,put a little silica gel,,and put them back together.

Four 7805s are engaged to supply the four Servos from the 12V 2Amps supply. there was no plan to make this bot permanent,so i made it on a breadboard.

Sorry  for the hazy pic

7805s with caps and connectors

Power supply unit.

12v SMPS

Finally,this could have been better,but after completion of this project,i don't think that I will upgrade it,instead,how about building something different?

The Atmega board is an Arduino clone available at my place.

The Atmega board


The cubot (without platform...sigh).. I was lucky to get a video captured before the servo went out of order.





I've attached the code for Cubot. (Actually i have three versions of this code,forgot which one works flawlessly,if problem ocurs,tell me,I will upload others too. )Well I am a newbie in robotics,and I love it. Thanks to LMR for inspiring me with the START HERE page.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Ever since I was little I never could solve one of this cubes even if my life depended on it :):):)

After a few long minutes I would end up cheating by removing the color stickers and gluing them on the appropriate side :):):)

I love this bot because it taught me two amazing things, at least amazing to me...

1- Didn't knew there was a cube solving algorithm :):):))

2-Just by looking at the DIY color sensor I understood its working principle... never imagined how it worked. Loved the simplicity of it.

Cant wait to build one, and finally solve one of those damn cubes :):).



I really like the way you've taken the economical route on this bot, and yet accomplished something that I can't do now. I think using cardboard beats the Lego robot that did cube solving.

That is, I've forgotten hoe to solve the darn cube!

If my next bot has arms strong enough it will be one of its tasks. I wonder if it is possible for a robot to learn to solve the cube? It should be, because I solved it by doing random moves (writing them down) and backing up when I got too far. Many notebooks later I had several moves named with made-up words and was able to solve it. Then I recently discovered it in a box and tried to solve it again, but I've forgotten everything,

I know I can just look up the algorithm, but that takes the fun out of it.

Thank you for reminding me that we can make wonderful robots out of things we have around the house.

I like it very much. Looking at the colour sensor's diagram gave me a great idea. I would obviously try to implement your colour sensing idea. THANK YOU !

Finally akjon k pelam j Robot banae ar amar thik ager station e thake.By the way nice robot.

Let me chime in as well to say you have done a truly AMAZING job on this robot.  If I were you, I would consider making a permanent model and setting it up on your desk, it will impress and inspire people for years to come.

I am a big believer in using the "simplest method that works" and I just LOVE how your robot scans with its custom made color sensor, grips the cube and twists it from the base.

This is beyond science this is ART!

Wonderful job, welcome to LMR, I am sure we are all waiting to see what you do next.

Thanks a lot. My next robo will be an answer for one of the challenges posted here. But lately I'm super busy with my upcoming exams. That's why I can't find time to do anything. Once my exams get complete,I will return with full force. Thanks again for those kind words.

I am sure you had a lot of fun with this one.  If this is only your second robot, I am looking forward to your next inspired creation.  I loved the design of your gripper hand. 

Great job!

yes,this is my second robot. most time consuming part was the programming, I had to make blueprints of it,thus wasting half of my exercise book !!. And as you can see,I am too short on resources,a few servos,a board,some gered motors are all I have till now. So,trying to compensate.

This is by far the best most creative and simple but complex thing i have seen anyone makin with an arduino..!!!!!!!!!!!!!!!!!

simply amazing lookin forward for the next and cleaner versions of it(make a base plate for all of it  itll be nice!! ;)

Ill be really greatful if u could make instructions on how to make the complete thing ...

amazing programmin tooo even though i dont understand any of it( hey im just 15 so...;( 

so if u could tell US how to make it itll be reallly nice

thanks and good luck for ur next project!!!!

I am not looking forward to upgrade it. But I can help you if you want to make something like that. For tutorial- I didn't follow any rules,just had a picture in mind,cut cardboard,glued them,and it worked. Some initial tearing and gluing were necessary to get it to work. Thanks a lot for encouraging me. I will be back right after my exams end.