We built a CNC controller in bare metal capable of reading in a GCode file, interpolating motor positions, and setting the motors to move a spindle to those positions in a closed feedback loop. In order to accomplish this in a bare metal environment, the RaspberryPi needed to be configured to setup the parts of the processor's peripherals that would be needed - timers, interrupts, UART controller, GPIOs, etc. Once configured, we were able to start building out modules to handle path planning and stepper motor control.
The entire code for the project is held on a public GitHub repository linked here.
|Jumers, Wires, Breadboard||-||$0||Provided|
|ams AS5161 Absolute Encoder||3||$28.02||Link|
|D82DIA Diametric Magnet (for encoders)||3||$3.39||Link|
Worked on developing the bare metal environment, including the ARM startup code, as well as the stepper driver for the motion control system.
Designed and implemented the positioning software, including GCode parsing for path interpretation and step interpolation.