Projects‎ > ‎

IMC Closed Loop Control

A closed-loop controller version of the Intelligent Motor Control Axis module which supports reading an encoder connected to the 3D printer and using any of several control laws to help the motor better track the target trajectory. This project was my Master's Thesis.


Documentation
For an overview of the system developed, as well as a discussion of performance improvements, see my master's thesis, Closed-Loop Control of a 3D Printer Gantry. It is now available at the University of Washington Thesis Archives here.

For more detailed documentation of the code, see the Readme's in each repository, as well as the commenting on the code itself.

Hardware

The Master Controller code runs on a standard Arduino Mega (1280 ADK or 2560), which is outfitted with a normal RAMPS shield. The Axis Controller runs on a PJRC Teensy 3.0/3.1. A wiring schematic is available in the Schematic folder of the Closed Loop Axis Controller codebase. The actual sensor used is an AMS AS5311 with 0.5um precision. A carrier board was designed by Matthew Sorensen and is available here, and follows closely the documentation in the AMS datasheet.

The mechanical hardware associated with the thesis will also be made available as a Thingiverse thing.

Source Code

The source for this project is publicly available on GitHub. It consists of three parts: 
  • The master controller, which is a variant of the Marlin 3D printer firmware (but which could be easily replaced with any microcontroller with an I²C interface capable of transmitting a small set of packets). The code itself is licensed under GPL v3, but the interface specification is released under the MIT License. This software is taken, without modification, from the reference IMC implementation. Available here.
    10.5281/zenodo.11264 
  • The closed loop axis controller, which incorporates and fundamentally modifies the reference IMC Axis Controller, receives the packets sent by the Master Controller and performs requested closed-loop control of a single 3D printer axis. Released under the MIT license. Available here.
    10.5281/zenodo.11402
  • The control design GUI, which allows the configuration, offline actuation, and performance analysis of the axis controller. It communicates with the Teensy running Closed Loop Axis Controller over an HID interface. Available here
    10.5281/zenodo.11403