


Project Cubatic
By: Jessie Spinelli & Darrin Hinterneder
Meet Cubatic

OUR STORY
We are seniors at Vermont Technical College working on our capstone project. Jessie is working to be an electrical engineer and Darrin is working to be a computer engineer. This project idea was derived from research and comments of close friends. We wanted a challenge and to use the skills we were taught during our time at VTC. Hard work does pay off.

OUR VISION
What we envisioned for this project is that we could use our knowledge of code and circuits to design and build a robot that can solve a Rubik's cube. This project is meant to challenge what we have learned in the past 4 years at college and put our skills to the test.

OUR TECHNOLOGY
The items that we used for the project are:
-
Arduino
-
Camera
-
Python
-
Stepper motors
-
Motor drivers
-
Resistors
-
Liquid Crystal Display
-
Capacitors
-
Potentiometer
-
Switch
-
Button
-
Power supply
The Project
Project Description
Project Cubatic is a robot designed to solve a Rubik's cube in one go. This is done by first using a camera to take pictures of all 6 faces. Then we take those faces and build a 3D model in python. Python then uses "God's Algorithm" to give us a solution to the cube. From there we then take the solution and send that to are arduino software through the serial port of the arduino. Next the arduino program breaks down each move for the solution and sends it to the arduino. The arduino then sends the signals to the motor drivers to turn the motors in the proper directions at the proper times. When the motors turn they go in the order and direction based on the solution sent from python. While this is going on the arduino also times the cube to see how long it takes to solve and tell you how many moves it took to solve. This information is then displayed on the LCD screen on the circuit board.
Photo Gallery
Videos [Testing]

One of our first solves (20 Moves)

20 moves 3.22 Seconds

20 Moves, 3.54 Seconds

Final
This video was taken after all the testing to ensure the motors were fine tuned and working reliably. We were able to fine tune the motors to be reliable at high speeds and work every time. Our fastest solve was 20 moves in 2.83 Seconds. Any solutions under 20 moves will be even faster!
Components
Camera
The camera we chose to use was a Logitech c270. This camera has a decent resolution and easily usable because of the USB connection. From are research it was the most used camera for projects like ours.

Speed Cube
A speed cube is like an normal 3 by 3 Rubik's cube but it's joints and shafts are high performance and are designed to be very smooth and quick to move. The reason that we needed to use a cube like this is because we are moving each face of the Rubik cube so fast that a normal cube would get caught on itself and jam up the next moves. When the cube gets jammed up it can lead to the cube completely destroying itself at its joints.

Microcontroller
When designing our system we had to find a programmable controller that would work with the motor drivers we planed to use. With this we had been thinking about using an LCD display to display the time that it took to solve the cube. From our research we found that we could accomplish this task with an Arduino. But, when we started counting up how many pins that had to go to the Arduino we found that a standard Arduino Uno would not work because we needed to use 18 digital pins to output signals. Because of this, we chose to go with the Arduino mega 2560 because it has 53 digital pins to use compared to 13.

Stepper Motors
When had started to do our research on how to make a Rubik Cube solving device we found that we would need some high torque multi-directional motors. We found the best motors for precision turning were stepper motors. From there, we found many other people suggested to use 2 Amp Nema 17 stepper motors. These motors would need drivers for precision turning. We also found that there were two people that had designed frames that would fit a Rubik cube and 6 Nema 17 motors. Based on this information we chose to use the Nema 17 motors.

Motor Drivers
When we had chosen the kind of motors we wanted we found that we would either have to design or buy motor drivers to turn the motors with the precision that we intended. After some time we found that it was easier to buy the drivers and just design a shield to go on the arduino that would connect the drivers to the Arduino and motors. We did some research into drivers that worked with Nema 17 motors and found that the best ones that fit for what we were doing were BIQU A4988 drivers. With these drivers we would be able to control how much current and voltage goes to the motors. As well as allow us to turn the motors in both directions with very accurate precision. For the drivers we adjusted the current that goes to the motors to be about 1.7 Amps.

LCD (Liquid Crystal Display)
We chose to use a HiLetgo HD44780 LCD. We chose this display because of past experimentation with this display and on an arduino they seem to be a cheep and effective display device.

Frames
The photo to the right was our first prototype frame. We 3D printed all of the parts of the frame and assembled it. We noticed it was very difficult to place the cube in and take the cube out of the frame. This design would be perfect for the cube staying within the frame and multiple cameras viewing different sides of the cube. We would like to implement this design in the future.

The photo to the right represents the final frame design we went with. This design is very simple to extract the cube in and out of the frame. There are two parts to the frame, a top portion that contains one motor and a bottom portion that contains all the rest. The box/drawer you see was designed by us to recess the frame into the box and contain all of our wires and circuit board for a cleaner look. We have redesigned both frame portions to make improvements.

Eagle
The software we used to design the circuit board was Eagle. There are many software's out there today that you can use to design a circuit board but we chose this one as we used this program extensively during our time at VTC.

OSH Park
The company we decided to go through to manufacture our custom circuit board was OSH Park. We decided on a 2-layer board as it was cheaper and would still meet our needs. We also chose this company as we used this company multiple times throughout our years at VTC. It's also purple!

Python
Python is a program that uses C programming type code. We chose to use python because it was a common program that can easily access serial ports, cameras, and other items through lines of code. We also chose it because in our research we came across some helpful libraries that would help us simplify the code we would have to make for the project.

Heading 6
Resources
Below are resources that have inspired our frame design and that we give credit to. We 3D printed these frames to do troubleshooting and preliminary testing. Once we ensured everything was functioning properly we re-designed the frame to compensate for our components and even added to the initial designs for improvements.