Rubik’s Cube? Robotic Solution!
I will describe this project from the very beginning to the very end. My robotic solution for Lego NXT will become a general, modular and expandable solution based on industrial tools suited for production development. I will go through all stages of the implementation using Model-Based Design and discuss all the ideas, tools and hassles.
Where to begin?
After a short research on the internet I discovered that Hans Andersson from Sweden provided a nice solution which he called ‘Tilted Twister’. Being the architect of the original solution Hans kindly allowed me to reuse and redesign his hardware and software ideas. You can find his descriptions and sources on tiltedtwister.com. His building instructions saved me lots of time. My 12 years old son was able to assemble the Lego Robot within a couple of hours.
Challenges of text-based programming
Hans Andersson developed the software part of his system in NQC textual programming language. Having some experience with C programming I could understand his code very well despite the design intricacy. Unfortunately traditional text-based tools are difficult and error-prone to use for redesign of complex control systems. Quite many engineering hours can be spent to reconfigure such designs. Debugging text-based programs becomes another problem during the translation through the various design stages.
Modern Methodology for System Design
These challenges can be overcome by the use of graphical modeling and simulation tools during all the stages of the system design. As I had experience with Model-Based Design methodology I decided to use the tools from The MathWorks. MATLAB, Simulink and Stateflow provide a very generic and unified graphical modeling environment and reduce the complexity of the models by breaking them into hierarchies of individual design blocks and thus achieve multiple levels of model fidelity by simply substituting one block element with another. Well designed graphical models are also the best way to document the conceptual design of the entire system and to coordinate the resources with expertise in different disciplines.
This being said I will reuse the existing Embedded Coder Robot NXT Demo by Takashi Chikamasa that you can find on the MATLAB Central.

