Forgot your password?
typodupeerror
Hardware

Saurabh Narain and His Homemade Lego-Based Rubik's Cube Solver (Video) 43

Posted by Roblimo
from the round-and-round-the-little-cube-goes dept.
Here's another one Tim spotted at Maker Faire Bay Area 2014: A Rubik's Cube solver made by 12-year-old Saurabh Narain. He's in 7th grade -- and started soldering in 2nd grade and messing with Linux in 3rd grade. "What do you want to be when you grow up?" Tim asked. "An engineer..." (not that you couldn't have guessed). There may be faster Rubik's Cube solvers, and there may be slicker-looking ones, but Saurabh's is a lot more elegant, if you define engineering elegance as getting the most accomplished with the fewest possible parts, using the simplest possible design. And both of the fancier Rubik's Cuber solvers linked to in this paragraph were made by adult engineers, while Saurabh is 12. Can you imagine what he'll be like at 18? Or 28? Not that he's alone; there are lots of other engineering prodigies out there. The next 10 or 20 years are going to be amazing if we encourage young people to go into STEM, and even 5% of them are as smart as Saurabh. (Alternate Video Link)

Tim: Saurabh, what are you standing right behind here?

Saurabh: I’m standing right behind this LEGO Rubik’s Cube Solver. What it does is, it solves the Rubik’s cube in under 30 moves in less than 100 seconds. So here it is – right now it’s scanning the cube and observing it. The special feature it has is it only scans five sides, for the last side it can just subtract from the nine and then get each one of those individual colors on the bottom. So it’s scanning right now. Right now this IR sensor is also here, so it detects the cube when it’s present or not. There’s a turn-table here that turns the cube and the scan-arm that goes back and forth for the LED or color sensor to get the light and the color.

Tim: How long does this take to engineer?

Saurabh: This took about a month to build.

Tim: What was the reason to take this as a project?

Saurabh: Because I couldn’t solve Rubik’s cube, and I learned how to solve it. Then I looked up some different robots that could solve it. Then based on those I tried making my own and here it is.

Tim: The programming—was it a very difficult task?

Saurabh: Yeah, programming was a pretty difficult task. I have C files from David Gilday also. I’ve modified it a little bit and tweaked it to work with this robot here. And what it basically does is, it finds a Rubik’s cube in any position and it’s able to guess all this cores and the centerpieces of each cube. And also what it does is, it’s able to solve the cube, even if it’s already solved it will say ‘solved’. And it has some intelligent software to also predict what’s going to happen next with the cube. So it only has to scan it once not every time it makes a single move.

Tim: So, how about the physical manipulation aspect, how long did that take to figure out?

Saurabh: Oh it took some time. Because when I was tweaking the arm, sometimes it just wouldn’t work and then I had to re-tweak it and re-modify, modify modify everything again. So say for this arm, once I tweaked one part the other part would stop working. So then it would take much more time to fix that part and then modify each and every one.

Tim: Have you actually destroyed or hurt any Rubik’s cubes?

Saurabh: Yeah, actually, in fact here, I will show you. I had destroyed this Rubik’s cube here, I was solving it and then it just fell off without solving it, but it’s been destroyed, but I am finally going to glue that back on.

Tim: It seems like a tough thing to figure out exactly how much force it takes to do the twisting and to manipulate against the friction of the internals?

Saurabh: Yeah, yeah.

Tim: So, this is a silly question I guess, but I think I can ask it of you: What do you want to do when you grow up?

Saurabh: I definitely want to be a software or hardware engineer, so yeah.

Tim: So it seems like you’re 90% there at this point, maybe 99% there?

Saurabh: Yeah.

Tim: What is your next target, do you have anything in mind?

Saurabh: Actually, I was working on a robot that’s going to be solving a Rubik’s cube of course, but it’s going to be using four arms instead of just one here. So it will be able to solve Rubik’s cubes much, much faster. It will also be much more productive and have more algorithms for it. This is going to have less algorithms because it only has a lower range of movement, so yeah.

Tim: So, how about the basis of the physical parts, is this Lego Mindstorms?

Saurabh: Yeah, this is actually Lego Mindstorms. It has one EV3 here on this side as you can see. And it has one IR sensor to detect if the cube is present or not, one color sensor to check each individual color of the cube, and three motors: one motor turns this arm here, the other motor turns the turn-table and it turns the turn-table; this arm turns the cube with this motor and this little medium motor—all it does, it goes back and forth. So if you can see here that’s the arm turning it. And here’s the medium motor and here is the turn-table and here is the scan-arm which goes over the cube and starts scanning it.

Tim: Now the thing about this is, if you have four arms, are you going to stay with Lego Mindstorms?

Saurabh: Yeah. It’s a really easy base to work with -– you can take apart things easily. If you use metal parts and fuse them together, it’d be a lot of times that you actually defuse them and take them apart. So Lego Mindstorms is like a good base for me to build over.

Tim: What is your programming environment it is the Mindstorms?

Saurabh: It is the Mindstorms language, it’s called EV3G. It’s basically LabVIEW modified by LEGO and they gave the software, and I have the student edition of the software which allows me to do experiments and also to create programs.

Tim: If you’re going to be making it more complex algorithmically, a more complex device, is that still going to be in the LEGO Mindstorms language or you’re going to switch to a different environment.

Saurabh: Maybe ROBOTC. ROBOTC is another good software that I’ve been using for programming other types of robots, Tetrix space robots, where ROBOTC would be another thing I could use to program the robots.

Tim: And the code you’ve created to do this, do you release it to other people?

Saurabh: Actually, it’s already been released but I’ve modified it. I haven’t released my own modified version but maybe I will be doing that and also releasing my modified instructions too.

Tim: Good, that way a lot of people can benefit from it.

Saurabh: Yeah, yeah.

Tim: Right. Thanks for showing it here.

Saurabh: You’re welcome.

Tim: Thanks very much.

This discussion has been archived. No new comments can be posted.

Saurabh Narain and His Homemade Lego-Based Rubik's Cube Solver (Video)

Comments Filter:

An Ada exception is when a routine gets in trouble and says 'Beam me up, Scotty'.

Working...