How pranshukapri/project_rubik-s_cube_solver works
Project Overview
• This project combines a mechanical design (SolidWorks CAD files for the physical frame and cube fixture), firmware for stepper motor control (Arduino code and a dedicated stepping control sketch), a Rubik’s Cube solving algorithm implemented in a C++ library, and an Android mobile application that communicates over Bluetooth with the hardware.
• Its purpose is to solve a Rubik’s Cube using nema motors controlled by an Arduino board, where the algorithm determines the solution moves, and an Android app serves as the user interface to send commands via the HC-05 Bluetooth module.
Main Components
a. Android Mobile Application
– Represented by the “app” folder (Android source code, layouts, and tests).
– Role: Provides the UI for user interaction and sends control commands via Bluetooth.
b. Bluetooth Communication Module
– HC-05 is the physical module connected to the Arduino.
– The Android app communicates over Bluetooth SPP with the HC-05.
c. Arduino Firmware and Stepper Control
– Represented by the “Rubik_s_Cube_Stepper_Control” directory containing the .ino file.
– Role: Receives commands from the Bluetooth module and controls the movement of the stepper motors.
d. Rubik’s Cube Solving Algorithm
– Contained in the “Rubiks_Cube_Algo Library” folder (Rubiks_Cube_Algo.cpp/h).
– Role: Implements the F2L algorithm (or other cube-solving logic) and provides move sequences to the firmware.
e. Mechanical Design / CAD Models
– Given by the “Rubik cube solver model(SOLIDWORKS & 3D files)” folder.
– Role: Contains the SolidWorks CAD files that detail the physical structure and assembly parts for mounting the motors and holding the Rubik’s Cube.
Relationships and Interactions
• The Android App sends control signals (over Bluetooth) to the HC-05 module.
• The HC-05 module relays these signals to the Arduino board, which runs the firmware.
• The Arduino firmware integrates the Rubik’s Cube algorithm library: it calculates the necessary movements and accordingly drives the stepper motor drivers.
• The firmware, through the motor controllers, actuates the nema (stepper) motors which physically manipulate the Rubik’s Cube in the mechanical assembly designed in SolidWorks.
Architectural Patterns & Design Principles
• Separation of Concerns: Each component is clearly defined—mobile communication (Android app), hardware control (Arduino + stepper control), algorithmic logic (Cube-solving library), and physical design (CAD models).
• Layered Design: The system can be visualized as layers from the user interface (Android) down to physical actuation (motors and mechanical assembly).
• Integration: Emphasize how the software (firmware and algorithm) bridges the gap between digital commands and the physical manipulation of the cube.
– The “Stepper Motor Control Firmware” (the .ino code),
– A sub-component for the “Rubik’s Cube Solving Algorithm Library.”
e. Finally, illustrate that the physical system is supported by the “SolidWorks CAD Models” (mechanical assembly design), which should be linked to the Hardware block (showing that the frame physically mounts the motors and cube).