Closed-loop motor control for better positioning

Share any mods you have made and the awesome results.

Moderator: Elijah

100ideas
Posts: 9
Joined: Tue Oct 16, 2012 4:51 pm

Closed-loop motor control for better positioning

Postby 100ideas » Thu Dec 10, 2015 10:50 pm

Ben Weiss' masters Mech E thesis was on "Closed-Loop Control of a 3D Printer Gantry" (pdf).

He added linear encoders and independent controllers (based on teensy) to the x- and y-axes of a makerbot-style printer (MBot CUBE). His thesis contains detailed information about the background and implementation of his mod, including circuit and mechanical diagrams, and he has posted source code for his specialized single-axis drivers to github, as well as a modified marlin firmware to work with them.

Project overview here: https://sites.google.com/site/benweissp ... op-control

From his thesis:

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.


He concludes:

Even though attempts to implement complex controllers failed, a simple PI controller, roughly tuned, showed performance improvements that reduce path tracking error in circle and star trajectories by more than 40%, cut print time by up to 25% by increasing acceleration rate with only minimal loss of accuracy, and detected and recovered from skipped steps in a matter of millimeters. Further development and better tuning of the control algorithm should result in further improvements.


Also, his thesis provides lots of information on certain key Marlin firmware variables that aren't well documented elsewhere, such as movement speed, print speed, acceleration change (jerk), and cornering speed. If you are messing with those variables, check out his work.

Marlin and Sailfish both support varying acceleration and include code that could dynamically adjust the acceleration rate so that diagonal moves accelerate faster (both X and Y motors can share the torque load when accelerating diagonally), but the way the code is written this dynamic acceleration is only available if a_axis < a_max < sqrt(2*a_axis), where a_axis is the axis maximum acceleration and a_max is the system maximum acceleration. This kind of configuration is suggested neither in the documentation nor in Sailfish or Marlin firmware defaults. The accelerations reported in this section are a = min(a_axis, a_max).
Attachments
Screen Shot 2015-12-10 at 10.32.15 PM.png
Screen Shot 2015-12-10 at 10.32.15 PM.png (81.34 KiB) Viewed 2234 times
Screen Shot 2015-12-10 at 10.33.35 PM.png
Screen Shot 2015-12-10 at 10.33.35 PM.png (205.95 KiB) Viewed 2234 times
Screen Shot 2015-12-10 at 10.35.16 PM.png
Screen Shot 2015-12-10 at 10.35.16 PM.png (73.75 KiB) Viewed 2234 times
Last edited by 100ideas on Thu Dec 10, 2015 11:24 pm, edited 1 time in total.

100ideas
Posts: 9
Joined: Tue Oct 16, 2012 4:51 pm

Re: Closed-loop motor control for better positioning

Postby 100ideas » Thu Dec 10, 2015 10:56 pm

Also just discovered a page on the reprap wiki about a partially-documented closed-feedback project. http://reprap.org/wiki/Microstepping_wi ... l_feedback


Return to “Mods”

Who is online

Users browsing this forum: No registered users and 2 guests