Hardware

The six continuous servos were used to turn the cube while the non-continuous servo was used to move the color sensors toward and away from the cube for sensing the panels and allowing the cube to turn. The circuits were used to sense the portion of the wheel ( black / white ) that it viewed. The frame itself allowed the cube to turn in all three dimensions by controling the corresponding servos.

The pulse width modulation was produced from the fpga programmed using a trimmed down timer with state including pulse width, pulse frequency, and enable. Because each module corresponded to one servo and each servo had one light sensor as feedback, we included the output of the sensor in the module.

For controlling the continuous servos, we used PWM to make them turn & stop and white & black color wheels to turn it at 90 degree intervals. To turn the cube, we connected the continuous servos to the central piece of each face of the cube with a steel rod.
For reading in the color, we used two color sensors and a simple sequence of turns to read in all the pieces. We used a non-continuous servo to move the color sensor and allow the cube to turn freely.
We used interrupts through buttons to allow users to specify when to randomize and when to solve the cube as well as pause the algorithm while it was solving.

Major Functions

  1. Do analog to digital conversion on the color sensor output.
  2. Use pulse width modulation to control the servos.
  3. Use interrupts to control scrambling and solving.

Color Sensors

We decided to use only two color sensors in order to avoid difficulty with the setup. Since the cube was secured in the frame, we could already consider the centers of the cube to be constant. The two sensors were used to read a corner and an edge at a time. We decided to read a side at a time and restore the state of the cube in between reading sides. This made the read-in algorithm use more turns than were needed but it simplified the algorithm and code which made confirming its correctness easier.

Our Hardware Project Files

The Color Sensors

A Servo and Wheel

The Frame and Cube

Task distribution:

John Marcoux:

Yan Zhang:

Cheng Li:

Brian Kirkpatrick: