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.
Part | Quantity | Price | Link |
---|---|---|---|
RaspberryPi 2 | 1 | $0 | Provided |
Jumers, Wires, Breadboard | - | $0 | Provided |
ams AS5161 Absolute Encoder | 3 | $28.02 | Link |
D82DIA Diametric Magnet (for encoders) | 3 | $3.39 | Link |
TOTAL: | - | $31.41 | - |
Professor Joe Skovira
grbl
nraynaud's GCode Simulator
Valvers tutorials on bare metal programming
David Welch
Image of CNC Machine
Image of Wood
Bootstrap
ne75@cornell.edu
Worked on developing the bare metal environment, including the ARM startup code, as well as the stepper driver for the motion control system.
bjq6@cornell.edu
Designed and implemented the positioning software, including GCode parsing for path interpretation and step interpolation.