Proposed Changes to Firmware Architecture

Kevin Robert Keegan edited this page Sep 14, 2017 · 2 revisions

MaslowCNC Wiki: Electronics | Firmware | Mechanics | Software | Community Garden

Note: This is an archive of an old discussion. Right now (September 14, 2017) the two controller setup discussed in this discussion is how the system works.

In last week's update we proposed a change to the firmware architecture to replace motor calibration with a second PID loop.

The way the system works currently is that the PID loop continuously reads the encoder position and commands the motor to change speed to correct.

The current architecture looks like this:

The issue is that while the PID loop is commanding the motor speed, it is controlling the motor with a voltage. If the relationship between motor voltage and speed was perfectly linear, this would not be an issue.

Unfortunately the motor response is not linear, it looks like this:

To correct for the curve, we use calibration to measure the motor's response and correct for it.

This works well near where the calibration process is done, but as the tension in the chains changes the motor's response curve changes also.

It would be possible to use multiple calibrations to correct for the different response curves, but that system is excessively complicated and likely to lead to problems later.

A better more simple solution is to change the firmware architecture to look like this:

This system uses a second PID loop to regulate the motor's speed which will correct for an inconsistency in the motor response to voltage.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.