Making a modular CNC mill machine
From 2 weeks ago we had made a prototype version for our modular CNC machine, with all the components and designs and electronics ready to be programmed. Now we just had to automate it. So as I was involunteeringly assigned the position of software engineer, I started by fixing the issue where all the motors would move, but together and in only one direction at a time. It was an easy fix where just rewiring the wires fixed the issue instantly, it was because only one winding was getting the power instead of equally for all the other pins. However making the machine work smooth and without missing its steps and matching the step per distance was a whole another issue. I first used the Universal Gcode Sender default settings($$ on command) and found values that were far too much for our machine. For example, I calculated the first 3 values which are the x, y, z steps per mm using the bottom picture as a reference. I got a good reference value for each of the values so we would have a starting point to fine tune the machine, using this website: initially we got the following settings:
Physical levers for stoppers were plugged into the shield x/y/z limits, so when they are triggered the machine would realize it hit the limits and not stain the motor by pushing it beyond its limits(don't worry we 3d printed some parts and made it adjustable and better). Also for our machine we have 2 stepper motors for the y axis, which is fine because the GRBL shield allows for axis of possible movement with an option to just clone another axis. So I tried that for the Y axis but couldn't get it to move while all the other motors moved fine. So I looked at the data sheet and initially assumed it was my fault, as it is usually(at this point I have begun to apologize to the software/computer when something is wrong because I realize its probably my fault), perhaps from my ghetto jumper headers or just faulty installation. So using a voltmeter I checked each connection but that was not the problem. Then I adjusted the potentiometer on the drivers to allow more voltage through to move the motor. Didn't help. Okay so maybe its a the motor? So I tried connecting the y clone motor to the z axis, and it worked fine. So not a motor issue. So at this point my suspicions of the machine's fault are increasing. So I tried swapping the connections of the driver with the y axis and the y clone axis to see if the clone function works, and it did since the y axis stopped moving and the y clone moved fine. So now we tried replacing the clone axis driver with an old replacement while really hoping this would fix it since we don't have an extra shield component. Alas it worked. So I now have a resurged suspicions of all machines again with my distruct of humanity. My therapist probably hates me.
Back to programming, we got the machine to move reliably but it still had a few issues with noise, skipping steps as well as making each step equivalent to the actual physical distance travelled, and over running the axis limits. We tested the accleration rate of the movement in relation with the feed rate while changing one value over small intervals to see which would have the best action. We fixed these issues with lesser steps and a much higher feed/seek rate(where the machine moves before the actually cutting) that correlated much more evenly with the Universal Gcode Sender. With that, we tested a sample cut on some foam, and voila! It works and is scalable as well.
We then tried cutting a pcb board and 30 minutes later we ended with 4 broken end mills. Soooo yeah, theres a significant issue with the stability of the z axis and there is a noticeable bend and when the mill reaches a hard surface it tends to bend and break the mill. So unfortunately as of now until we strengthen the z axis we can only make foam cuts, which should be useful enough as we can use them for molding and casting.
I also tried a bigger cut and using the KUROHETEX-ED logo, I started a cut. However after a sudden jerking motion and grinding sound the cut was out of place. I tried again with another piece of foam but it suffered the same issue, where further investigation showed that the x-axis was misaligned in both cases. The router's weight or some frictional issues seems to be the case, so I tried increasing the x-axis potentiometer to increase the power and used some bike lube to make the movement more smooth.
We also plan to add a Satshakit(as featured below in the picture) to replace the arduino to make it much more replicatable and FabAcademy friendly; I built the board and successfully flashed the grbl.hex file into it. It was recognized by the machine and I put in the same settings we had before; it worked as a replacement to the arduino so we had at that point a completely Fab made machine. Later that night I had a really nice Laphroaig Cuan.