davo3927
Posts: 5
Joined: Mon Oct 13, 2014 2:11 pm

First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 2:15 pm

I am about to purchase a Raspberry Pi with the intention of building a machine to solve a Physical Rubik's cube. I have already written a Python program which can nearly solve a Rubik's cube given its current state, outputting a string of letters to indicate the moves to perform on the cube, I hope to eventually have a contraption which will perform these moves. I am asking for advice as to what I should buy, namely which model of the Pi and where the best place to buy is, in addition do I need to buy anything else to allow it to interact with hardware?

Thank you for any replies

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 2:38 pm

davo3927 wrote:I am about to purchase a Raspberry Pi with the intention of building a machine to solve a Physical Rubik's cube. I have already written a Python program which can nearly solve a Rubik's cube given its current state, outputting a string of letters to indicate the moves to perform on the cube, I hope to eventually have a contraption which will perform these moves. I am asking for advice as to what I should buy, namely which model of the Pi and where the best place to buy is, in addition do I need to buy anything else to allow it to interact with hardware?

Thank you for any replies
I'm going to recommend a B+, price wise there is no difference between the B+ and the B, performance wise the B+ wins (with no features of the B being superior). I have excluded the A from consideration as they are out of stock in most places.

before advising on hardware interaction devices I'd need to know how you plan to manipulate the Rubik's cube, I would imagine that there will be motors involved (very likely stepper motors) so you will need some kind of motor driver board (specifics to be determined by the hardware).
Doug.
Building Management Systems Engineer.

User avatar
mad-hatter
Posts: 419
Joined: Sun Feb 26, 2012 2:58 pm
Location: By the UK seaside

Re: First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 3:33 pm

Hello,

Have a look:-
http://www.youtube.com/watch?v=cO5DLbpp3-M

Regards

User avatar
DougieLawson
Posts: 36522
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 3:40 pm

WOW!

There's loads of stuff out on the internets for solving 3x3x3 Rubik's cubes.
http://kociemba.org/cube.htm
https://github.com/akheron/cubejs
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

davo3927
Posts: 5
Joined: Mon Oct 13, 2014 2:11 pm

Re: First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 3:46 pm

BMS Doug wrote:
davo3927 wrote:I am about to purchase a Raspberry Pi with the intention of building a machine to solve a Physical Rubik's cube. I have already written a Python program which can nearly solve a Rubik's cube given its current state, outputting a string of letters to indicate the moves to perform on the cube, I hope to eventually have a contraption which will perform these moves. I am asking for advice as to what I should buy, namely which model of the Pi and where the best place to buy is, in addition do I need to buy anything else to allow it to interact with hardware?

Thank you for any replies
I'm going to recommend a B+, price wise there is no difference between the B+ and the B, performance wise the B+ wins (with no features of the B being superior). I have excluded the A from consideration as they are out of stock in most places.

before advising on hardware interaction devices I'd need to know how you plan to manipulate the Rubik's cube, I would imagine that there will be motors involved (very likely stepper motors) so you will need some kind of motor driver board (specifics to be determined by the hardware).
Thank you for your reply, I plan on building a lego contraption with sort of pincers that will grip the cube, allowing a side to be twisted, but also allowing the cube to be flipped over. I will need motors to operate these arms, but I'm not sure exactly how these will work yet

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 3:50 pm

davo3927 wrote: Thank you for your reply, I plan on building a lego contraption with sort of pincers that will grip the cube, allowing a side to be twisted, but also allowing the cube to be flipped over. I will need motors to operate these arms, but I'm not sure exactly how these will work yet
So you would probably need a stepper motor to close each set of grippers and another one to rotate the gripper once it has grabbed the side.
Doug.
Building Management Systems Engineer.

davo3927
Posts: 5
Joined: Mon Oct 13, 2014 2:11 pm

Re: First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 3:54 pm

BMS Doug wrote:
davo3927 wrote: Thank you for your reply, I plan on building a lego contraption with sort of pincers that will grip the cube, allowing a side to be twisted, but also allowing the cube to be flipped over. I will need motors to operate these arms, but I'm not sure exactly how these will work yet
So you would probably need a stepper motor to close each set of grippers and another one to rotate the gripper once it has grabbed the side.
Ok, that's great, thank you, where can these be bought, and is it fairly easy to get these to interact with the raspberry pi or do you need some additional software?

User avatar
DougieLawson
Posts: 36522
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 3:58 pm

davo3927 wrote:
Ok, that's great, thank you, where can these be bought, and is it fairly easy to get these to interact with the raspberry pi or do you need some additional software?
The software part is easy with wiringPi, pigpio or python RPi.GPIO.
http://www.raspberrypi-spy.co.uk/2012/0 ... in-python/

The hardware part may need opto-isolators, a ULN2003 chip or transistors/diodes because the back emf from any motor could destroy a GPIO pin when you turn off the power.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

davo3927
Posts: 5
Joined: Mon Oct 13, 2014 2:11 pm

Re: First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 4:01 pm

DougieLawson wrote:
davo3927 wrote:
Ok, that's great, thank you, where can these be bought, and is it fairly easy to get these to interact with the raspberry pi or do you need some additional software?
The software part is easy with wiringPi, pigpio or python RPi.GPIO.
http://www.raspberrypi-spy.co.uk/2012/0 ... in-python/

The hardware part may need opto-isolators, a ULN2003 chip or transistors/diodes because the back emf from any motor could destroy a GPIO pin when you turn off the power.
Ok thanks, will it be easy to work out if it will need these isolators?

User avatar
DougieLawson
Posts: 36522
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 4:05 pm

It depends whether you want your Raspberry Pi to continue working for more than five seconds after you start your experiments.

If you blow up a ULN2003 chip by overloading it or wiring it wrong or some other disaster, it costs £1 to replace it. If you blow up your Raspberry Pi and let the magic puff of white smoke out, that's a £35 disaster. You can have lots of ULN2003 disasters for the price of a RPi.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

davo3927
Posts: 5
Joined: Mon Oct 13, 2014 2:11 pm

Re: First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 4:12 pm

DougieLawson wrote:It depends whether you want your Raspberry Pi to continue working for more than five seconds after you start your experiments.

If you blow up a ULN2003 chip by overloading it or wiring it wrong or some other disaster, it costs £1 to replace it. If you blow up your Raspberry Pi and let the magic puff of white smoke out, that's a £35 disaster. You can have lots of ULN2003 disasters for the price of a RPi.
So you're saying I should definitely get some ULN2003 chips?

User avatar
DougieLawson
Posts: 36522
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: First Time Buyer: Rubik's Cube Solver

Mon Oct 13, 2014 4:18 pm

davo3927 wrote: So you're saying I should definitely get some ULN2003 chips?
Since they're a cheaper magic smoke generators, the answer is YES.

They're also used in the link I posted earlier so that will make your programming task easier. That link also has a suggestion for the make/model and online store where you can get some stepper motors that WILL work with a ULN2003.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Beginners”