g2core - Edge Branch
G2 Edge is the branch for beta testing new features under development. New features are developed in feature branches and merged into the edge branch. Periodically edge is promoted to master.
That said, Edge is for the adventurous. It is not guaranteed to be stable, but we do our best to achieve this. For production uses we recommend using the Master branch.
Firmware Build 101 {fb:101.xx}
Feature Enhancements
The fb:101 release is a mostly internal change from the fb:100 branches. Here are the highlights, more detailed on each item are further below:
- Updated motion execution at the segment (smallest) level to be linear velocity instead of constant velocity, resulting in notably smoother motion and more faithful execution of the jerk limitations. (Incidentally, the sound of the motors is also slightly quieter and more "natural.")
- Updated JT (Junction integration Time, a.k.a. "cornering") handling to be more optimized, and to treat the last move as a corner to a move with no active axes. This allows a non-zero stopping velocity based on the allowed jerk and active JT value.
- Probing enhancements.
- Added support for gQuintic (rev B) and fixed issues with gQuadratic board support. (This mostly happened in Motate.)
- Temperature control enhancements
- Temperature inputs are configured differently at compile time. (Ongoing.)
- PID control has been adjusted to PID+FF (Proportional, Integral, and Derivative, with Feed Forward). In this case, the feed forward is a multiplier of the difference between the current temperature and the ambient temperature. Since there is no temperature sensor for ambient temperature at the moment, it uses an idealized room temperature of 21ºC.
- More complete support for TMC2130 by adding more JSON controls for live feedback and configuration.
- Initial support for Core XY kinematics.
- Boards are in more control of the planner settings.
- Experimental setting to have traverse (G0) use the 'high jerk' axis settings.
- Outputs are now configured at board initialization (and later) to honor the settings more faithfully. This includes setting the pin high or low as soon as possible.
Project Changes
Changelog for Edge Branch
Edge branch, Build 101.xx
This build is primarily focused on support for the new boards based on the Atmel SamS70 family, as well as refining the motion control and long awaited feature enhancements. This list will be added to as development proceed.s
Functional Changes:
Note: Click the header next to the arrow to expand and display the details.
Linear-Velocity Segment Execution
- The overall motion is still jerk-controlled and the computation of motion remains largely the same (although slightly simplified). At the smallest level above raw steps (what we call "segments," which are nominally 0.25ms to 1ms in duration) we previously executed the steps at a constant velocity. We now execute them with a linear change from a start velocity to an end velocity. This results in smoother motion that is more faithful to the planned jerk constraints.
- This changed the way the forward differences are used to compute the segment speeds as well. Previously, we were computing the curve at the midpoint (time-wise) of each segment in order to get the median velocity. Now that we want the start and end velocity of each segment we only compute the end (time-wise) of each segment, and use that again later as the start-point of the next segment.
Probing enhancements
- Added
{"prbs":true}to store the current position as if it were to position of a succesful probe. - Added
{"prbr":true}to enable and{"prbr":false}to enable and disable (respectively) the JSON{prb:{...}}report after a probe.
gQuintic support
- Support for the gQuintic rev B was added. Support for rev D will come shortly.
Temperature control enhancements
- Added the following settings defines:
HAS_TEMPERATURE_SENSOR_1,HAS_TEMPERATURE_SENSOR_2, andHAS_TEMPERATURE_SENSOR_3EXTRUDER_1_OUTPUT_PIN,EXTRUDER_2_OUTPUT_PIN, andBED_OUTPUT_PIN- Added
BED_OUTPUT_INITin order to control configuration of the Bed output pin settings. - Defaults to
{kNormal, fet_pin3_freq}. EXTRUDER_1_FAN_PINfor control of the temperature-enabled fan on extruder 1. (Only available on extruder 1 at the moment.)
- (Experimental) Analog input is now interpreted through one of various
ADCCircuitobjects.- Three are provided currently:
ADCCircuitSimplePullup,ADCCircuitDifferentialPullup,ADCCircuitRawResistance ThermistorandPT100objects no longer take the pullup value in their constructor, but instead take a pointer to anADCCircuitobject.
- Three are provided currently:
ThermistorandPT100objects no longer assume anADCPinis used, but now take the type that conforms to theADCPininterface as a template argument.- TODO: Make more of these configurable at runtime. Separate the ADC input from the consumer, and allow other things than temperature to read it.
- PID+FF control adds feed-forward (FF) to adjust the output to a reasonable minimum based on heat loss dues to room temperature.
- This can be effectively disabled, making the controller a PID controller, by setting the F value to
0.0. - Warning setting this value too high can cause thermal runaway. Set this value conservatively (low), since there's currently no ambient temperature, and the actual heat loss may be less than computed. This will be magnified by another heater (such as that on a heat bed of a 3D printer) in close proximity.
- This can be effectively disabled, making the controller a PID controller, by setting the F value to
TMC2130 JSON controls
- Added the following setting keys to the motors (
1-6):ts- (R) get the value of theTSTEPregisterpth- (R/W) get/set the value of theTPWMTHRSregistercth- (R/W) get/set the value of theTCOOLTHRSregisterhth- (R/W) get/set the value of theTHIGHregistersgt- (R/W) get/set the value of thesgtvalue of theCOOLCONFregistersgr- (R) get theSG_RESULTvalue of theDRV_STATUSregistercsa- (R) get theCS_ACTUALvalue of theDRV_STATUSregistersgs- (R) get thestallGuardvalue of theDRV_STATUSregistertbl- (R/W) get/set theTBLvalue of theCHOPCONFregisterpgrd- (R/W) get/set thePWM_GRADvalue of thePWMCONFregisterpamp- (R/W) get/set thePWM_AMPLvalue of thePWMCONFregisterhend- (R/W) get/set theHEND_OFFSETvalue of theCHOPCONFregisterhsrt- (R/W) get/set theHSTRT/TFD012value of theCHOPCONFregistersmin- (R/W) get/set theseminvalue of theCOOLCONFregistersmax- (R/W) get/set thesemaxvalue of theCOOLCONFregistersup- (R/W) get/set theseupvalue of theCOOLCONFregistersdn- (R/W) get/set thesednvalue of theCOOLCONFregister
- Note that all gets retrieve the last cached value.
Core XY Kinematics Support
- Enabled at compile-time by setting the
KINEMATICSdefine toKINE_CORE_XY- The default (and only other valid value) for
KINEMATICSisKINE_CARTESIAN
- The default (and only other valid value) for
- Note that the X and Y axes must have the same settings, or the behavior is undefined.
- For the sake of motor mapping, the values
AXIS_COREXY_AandAXIS_COREXY_Bhave been created. - Example usage:
#define M1_MOTOR_MAP AXIS_COREXY_A // 1ma
#define M2_MOTOR_MAP AXIS_COREXY_B // 2ma
Planner settings control from board files
- The defines
PLANNER_BUFFER_POOL_SIZEandMIN_SEGMENT_MSare now set in theboard/*/hardware.hfiles. PLANNER_BUFFER_POOL_SIZEsets the size of the planner buffer array.- Default value if not defined:
48
- Default value if not defined:
MIN_SEGMENT_MSsets the minimum segment time (in milliseconds) and several other settings that are comuted based on it.- Default values if not defined:
0.75 - A few of the computed values are shown:
#define NOM_SEGMENT_MS ((float)MIN_SEGMENT_MS*2.0) // nominal segment ms (at LEAST MIN_SEGMENT_MS * 2) #define MIN_BLOCK_MS ((float)MIN_SEGMENT_MS*2.0) // minimum block (whole move) milliseconds- Default values if not defined:
Experimental traverse at high jerk
- The new define
TRAVERSE_AT_HIGH_JERKcan be set totrue, making traverse (G0) moves (includingE-only moves in Marlin-flavored gcode mode) will use the jerk-high (jh) settings.- If set to
falseor undefinedG0moves will continue to use the jerk-max (jm) settings that feed (G1) moves use.
- If set to
PID+FF - added feed forward
- There is a new JSON value
fin eachpidnobject (read-only, for reporting) as well as anfsetting in thehenobjects (for control).- This is controlled in the settings file via
Hn_DEFAULT_F, such asH1_DEFAULT_F. Default value is0.0. - This is a value that is multiplied to by current temp - 21 and added to the current computed output.
- Warning! Setting this value too high can result in thermal runaway. Set it conservatively (low) or disable it completely if in doubt.
- Set the
henfvalue to0.0to effectively disable feed-forward.
- This is controlled in the settings file via
Output setting as soon as possible
- At board initialization, the output value on each of the
outobjects is set to whatever the pin is configured to be "inactive." This is based on the settings fileDOn_MODEsetting. - For example, if
DO10_MODE == IO_ACTIVE_LOWthen the pin atDO10is initialized asHIGHat board setup. This happen even before themain()function starts, shortly after the GPIO clocks are enabled for each port.