Rubik's Cube Solving Robot
This is our Rubik's Cube Solver project! The work was divided into several parts: implementing colour recognition; obtaining the solving algorithm and designing the GUI; interpretation of signal and lter circuits; implementation of logic and corresponding logic circuits; and design of physical elements and mechanical manipulation.
I was in charged of mainly the following two aspects:
Embedded Circuits with PCB prototype
The most interesting constraint of the project is that only analog output is allowed from the computer, yet, when translating the analog signal to PWM input for motors, no MCU/Arduino is allowed. Therefore, we had constructed our own analog-to-digital circuit with D-latches and 555 timer.Overview of the circuit
We had gone through many engineering cycles and design iterations to evolve our circuits. We first started off with bread board. As we gained confident in our design, we started to build stripboard prototype as well. Furthermore, with pcb development experience from previous work, I also managed to develop the pcb version of our circuit.
Hardware Prototypes
     Colour Recognition System
Colour recognision is one of the main blockers of the project. The slightest change in light intensity drastically changes the RGB value. To complete the project within the specified time frame, I refactored the colour recognition code from my team mates, and we had also came up with the following solutions to alleviate the problem:Random seed averaging approach means when pixels are picked from each tiles to calculated RGB average, instead of hard-coded the locations the pixels, pixels are picked randomly with in the tiles. This hugely improved the accuracy of the code. Also, with random seed approach, each run could potentially yield different results, thus, we can retry multiple times until we had successfully detected a valid scrambled cube configuarion.
Full code can be found on GITHUB