Team member (from ECE110):
Churan He (churanh2)
Zhongchun Yu (zy17)
Zhengyu Weng (zhengyu4)
Honor Section Time:
Tue 6:00PM - 7:00PM
Project Overview:
Our Rubik's Cube Solver receives image data from mobile phone, and recognizes color pattern of six surfaces of the source Rubik's cube. Afterwards, Rubik's solver algorithm would come up with a solution as well as a reversed one. The reversed solution is used to reshuffle the target Rubik's cube inside, to the same color pattern of the source Rubik's cube. When the control button is pressed, our solver can solve the target Rubik's cube in a short time.
Hardware Architecture:
Raspberry Pi 2 Model B (w/ WiFi)
Low-cost, running Linux, sufficient GPIO, compatible with Python, high performance (compared to Arduino platform).
Step motors (w/ controllers)
Precise and powerful power to turn the Rubik's cube.
Control buttons
First press: turning the solved Rubik's cube (inside) to the specific assigned pattern (outside)
Second press: solving thar Rubik's cube
OLED status display (alt: LEDs)
Displaying the IP address of the Raspberry Pi in LAN, used to connect to the server
Showing current status
Power system
Powering six step motors with controllers and the Raspberry Pi
Mechanical Structure
A transparent cube containing a Rubik's cube, mounting six step motors on its six surfaces, rigid connection between each step motor and the center block on each surface of the Rubik's cube.
Web Server:
This project would required a smartphone (in the same LAN with Raspberry Pi) to take six pictures for six surfaces of the rubik's cube, and upload them to a specific directory of Raspberry Pi's file system.
Apache (Web server application on Raspberry Pi)
HTML5, CSS, PHP
Wi-Fi Hotspot
Link: http://www.raspberryconnect.com/network/item/333-raspberry-pi-hotspot-access-point-dhcpcd-method
Computer Vision:
OpenCV in Python, recognize patterns on six surfaces, which would be the input of the Rubik's cube solver algorithm.
Link: https://gist.github.com/flyboy74/2cc3097f784c8c236a1a85278f08cddd
Link: https://devpost.com/software/rubiks-cube-solver-y3r6g5
Link : https://github.com/kkoomen/qbr
Link: http://programmablebrick.blogspot.com/2017/02/rubiks-cube-tracker-using-opencv.html, https://github.com/dwalton76/rubiks-cube-tracker
Rubik's Cube Solver Algorithm:
This project would use koiema to find the solution of the rubik's cube, and if time allows, we may develop our own algrithm. For the reversing algorithm, we would use pycuber initially.
Link: https://pypi.org/project/kociemba/
Link: https://pypi.org/project/pycuber/
Extra Functionality (depend on overall progress):
Manually control via buttons
Motion controlled light effect (based on supersonic sensor)
Potential Challenges:Web server development (Solved on Feb 17 2019)
iOS's HEIF picture format (decoding and processing) (Problem doesn't occur.)
Rubik's cube's surface pattern recognition (confidence level of CV algorithm)
Mechanical structure design
Reference:
MIT Robots Breaks Rubik's Cube Record, MIT Mechanical Engineering, https://www.youtube.com/watch?v=OZu9gjQJUQs
Computer vision projects listed above
Python/C implementation of Herbert Kociemba's Two-Phase algorithm for solving Rubik's Cube, kociemba, https://pypi.org/project/kociemba/
Working Files:
Web Server (beta):
Rubik's Cube Color Recognition:
Step Motor Control:
Attachments:
image_draft1.png (image/png)
image_draft2.png (image/png)
ECE110H Overview Diagram2.png (image/png)
ECE110H Web Server beta index.php (application/octet-stream)
ECE110H Web Server beta upload.php (application/octet-stream)
Color_Recognition.png (image/png)
Color_Recognition_beta.py (application/octet-stream)
testMotor.py (application/octet-stream)