Machine Building
Each section will design and build a "machine" - this means anything that includes mechanism, actuation, automation and application.
Sand Painting
This week, I took part in the machine building for sand painting named "Zen Garden" with the team member in CBA session. I was responsible for the following things with Wenhao: 1. Take a gcode file as input and actuate the stepper motors accordingly. 2. Calibrate the machine's XY coordinate system and gcode's XY coordinate system. 3. Test the trajectory of motion to see if it meets expectations. I recorded the things I did in this website page.
On-Class Demo
CoreXY Framework
Having settled on the idea, we also discussed our technical solution. We chose to use modular circuitry and steps to drive the CoreXY framework. I failed to install the environment for Node.js at the first day due to version conflicts in some libraries. After Wenhao installed the coding enviorment, I coded for gcode parsing with Wenhao using his computer. To be specific, I helped him debug some issues. For instance, we had a problem reading the data. I found that the data type was inconsistent. The requirement was a number, but we used a string. After debugging everything, we finished the code for parsing gcode, transformed the 2D Cartisian coordinates into linear movement of two motors, then move the magnet line by line. The girl in the image is me!
XY Coordinate Calibration
In the test, we unexpectedly found that the XY coordinates of the system were not consistent with those of gcode. To deal with this issue, first, I try to identify the Angle difference between the two coordinate tables. Using a straight line test, I found it's 45 degrees. And then I converted and corrected the angle difference by using the cosine sine formula.
Gcode Reading
Our first version of the code required users to copy and paste gcode manually. In order to save this process, I tried the automatic reading of code for gcode file. But I found that this step required external libraries, but the IDE we were using forbade us from loading any external dependencies.
Contributed Code
This image demonstrates the code I contributed in this project.
System
Look! Here is our final system! I share a sense of achievement when I see the system work!.