EBB Release Notes
This document details the version history of the EBB (EiBotBoard) firmware.
v2.0.1 — 9/13/10
Bug fix - on v1.1 EBB hardware, need to disable RB0 alt pause button. Switched it to RB2 on v1.1 hardware.
v2.0.2 — 10/3/10
Bug fix - QC command not returning proper results - added cast and now works OK.
v2.1.0 — 10/21/10
- Added in SE - Set Engraver - turns engraver (on RB3) on or off, or set to PWM power level
- Added code in init to pre-charge RC7 (USB_SENSE_IO) high before running rest of code to get around wrong resistor value on hardware.
v2.1.1 — 11/21/10
- Removed Microchip USB stack v2.7, replaced it with v2.8 from MAL 2010_10_19.
- Also using generic Microchip folder now rather than re-named one (simpler to update).
- Updated code in main.c (and others) to match updates from latest MAL CDC example.
v2.1.1cTest1 — 01/17/11
Added third parameter to SP command to use any PortB pin for servo output. (For this version only - used PortB2 as standard servo output.)
v2.1.1d — 02/11/11
- Reverted back to RB1 for servo output
- Updated check_and_send_TX_data() to allow unlimited data to go out without overrunning the output buffer, same as UBW 1.4.7.
v2.1.2 — 11/04/11
- Fixed PI command to return just a 0 or a 1
- Updated to USB stack 2.9a
- Created MPLAB X project for this firmware
- Added SC,14,<state> to enable/disable solenoid output on RB4
- Fixed bug with S2 command and solenoid command interaction - we now turn off solenoid output on RB4 if user uses S2 command to use RB4 for RC servo output.
- Fixed bug with S2 command where a duration of 0 would not shut off the PWM channel
- Fixed bug in S2 command where <rate> variable was not being used correctly
- Switched default number of S2 channels to 8 (from 7 before)
v2.1.3 — 12/12/11
- RB3 now defaults to digital I/O on boot, can still use SE command to do PWM later if you want
- Compiled with latest UBW stack - 2.9b from MAL 2011-10-18
v2.1.4 — 12/14/11
RB3 now defaults to OFF, rather than ON, at boot.
v2.1.5 — 12/15/11
Fixed problem with pen servo (RB1) being inverted on boot
v2.2.0 — 11/07/12
Fixed problem with SP command not working properly with ports other than RB1 because we don't properly use S2 commands for SP up/down within ISR. Tested on all PortB.
v2.2.1 — 09/19/13
- Expanded internal delay counter to 32 bits so we can have delays longer than 2.1s. Now up to 64k ms.
- Fixed bug with all <duration> parameters, SM, SP, TP commands. Now in ms, defaults to 500 ms, and actually works up to 64K ms.
- Fixed uninitialized data bug with command FIFO. We were seeing very long random delays first time SM,<delay>,0,0 was used.
- SP command was executing servo move at end of <duration>. It now starts servo move and <duration> delay at same time.
- Updated USB stack to Microchip MAL USB v2.9j
v2.2.2 — 10/15/13
- Fixed bug with SE command that was preventing anything other than 50% duty cycle from working.
- Updated SC,2,{0,1,2} to control PIC and drivers connection
- 0 = PIC controls built in drivers
- 1 = PIC controls external step/dir/en drives
- 2 = external step/dir/en controls built-in drivers
- Also updated the pins that are used for driving external step/dir/en drives. (See documentation)
- Updated SC,1,{0,1,2} documentation to match code and removed SC,14 which is not needed.
- Updated logic for EM command to use state of SC,2,{0,1,2} properly.
- Added SC,14,{0,1} to switch between default of 1/(25 kHz) units for SP and TP command
<duration> parameters, and 1 ms units
v2.2.3 — 01/11/14
Rewrote analog system so we don't have problems with QC commands anymore. New command AC.
v2.2.4 — 04/28/14
- Fixed bug where 0 for duration in SM would cause problems
-
Found bug where the <servo_min> and <servo_max> values were reversed in the SP command. This has now been fixed so that SP commands will operate the same as v2.0.1 version.
- Set initial 'position' of main servo to be 1mS to mimic behavior of v2.0.1 firmware.
- Updated license to BSD 3-clause
-
Changed SP and TP commands so that if no <duration> parameter is used, it does not default to 500 ms delay, but rather 0mS. This should now work exactly as v2.0.1 when no parameter is used.
-
Tested v2.2.4 against v2.0.1 with Seleae Logic analyzer. Looked at several Inkscape plots. Confirmed that timing of steppers and servo are the same. Confirmed that all RB0 through RB7 outputs are the same between the two versions.
v2.2.5 — 04/29/14
- Added 'long' arguments to SM for <move_duration> and <axis1> and <axis2>. All can be 3 bytes now.
- dded checks in SM command to make sure that arguments don't result in a step speed that's too low (<0.76Hz).
v2.2.6 — 01/01/15
Added 'QM' command - Query Motor, tells PC what is moving.
v2.2.7 — 08/13/15
Added 'ES' command, which will immediately abort any SM command but leave the motors energized. (E-stop) It returns "1" if it aborted a move in progress, "0" otherwise. It will also delete any pending SM command in the FIFO.
v2.2.8 — 08/14/15
Corrected error checking in SM command to accurately reflect too fast and too slow requests. (>25K or <1.31 steps per second)
v2.2.9 — 08/18/15
Added extra values to output of ES command to indicate how many steps were aborted.
v2.3.0 — 08/28/15
Added new XM command as per issue #29 for driving mixed-axis geometry machines.
v2.4.0 — 03/14/16
Added new AM command for using accelerated stepper motion. Includes going to 32 bit accumulators in ISR to achieve necessary resolution, which includes changes to SM command as well. Also added "CU,2,0" to turn of SM command parameter checking for speed.
NOTE: AM command may not be quite 'right' yet. Although it has passed simple tests, it could not be made to reliably work from the Inkscape plugin, so it is not currently being used. It may have to change in future versions of this firmware.
v2.4.1 — 08/08/16
- Added new form of SE command, with optional parameter that puts SE in motion queue. (issue #51)
- Fixed issue #52 (bug in parameter check in parse_SM_packet())
2.4.2 — 08/10/16
-
Fixed bug in SE command that would set engraver to 50% if SE,1,0 was used. Also added engraver power to FIFO structure for when third SE parameter is 1.
2.4.3 — 11/07/16
- Added QS (Query Step position) and CS (Clear Step position) commands.
2.4.4 — 11/16/16
- Added extra FIFO state output to QM command.
2.4.5 — 01/07/17
2.5.0 — 01/14/17
2.5.1 — 01/18/17
- Fixed LM command to take negative and positive StepAddIncs
- Fixed 25 kHz ISR to be much closer to 25 kHz
2.5.2 — 07/07/17
- Fixed issue #78 : detected and reject 0,0 for LM command
- Fixed some uninitialized variables
- LM StepAddInc parameter went to 32 bits signed from 16 bit signed
2.5.3 — 07/09/17
- Fixed issue #79 : Fixed bug in LM command that would corrupt currently running moves with new data.
2.5.4 — 01/06/18
- In response to issue #39 the following commands were added:
- Added QT (Query Tag), ST (Set Tag) commands.
- Added RB (ReBoot) command
- Added any name set with ST command to end of USB Device Name
- Fixed issue issue #82 - could not read 1 (high) from any port's bit 7
2.5.5 — 07/06/18
- Enhanced the ST command to write to both device name and serial number USB fields.
2.5.6 — 07/13/18
- In response to issue #103 the following commands were added:
- Added QR (Query RC Servo power state) command
- Added SR (Set RC Servo poweroff timeout value) command
- In addition, for EBB v1.5 and above, the RC Servo's 5 V power signal is now controlled by the firmware, to allow the servo
to power down after some amount of time (either set by the SR command or defaults to 1 hour), but power is restored upon any
command using the motors or the servo.
2.6.0 — 09/08/18
- In response to issue #103 the following commands were added:
- SR (Set RC Servo poweroff timeout value) command changed to be SR,new_timeout>,new_state where new_state is optional.
- The default servo up time has been set to 22565 (1.878 ms)
- The default servo down time has been set to 15302 (1.274 ms)
- The EBB will always send the servo to the up state on reset, and start with power off to the servo
- The default servo power off timeout is now 15 minutes
2.6.1 — 01/09/19
- In response to issue #111 the QG (Query General) command was added.
2.6.2 — 01/13/19
- In response to issue #113 the HM (Home Motors) command was added.
2.6.3 — 05/24/19
- In response to issue #118 the default RC servo power down timeout was changed from 15 minutes to 60 seconds.
2.6.4 — 11/05/19
- In response to issue #124 a math bug in the SM command was fixed that caused an error under
certain input parameters when the SM command should have been executed normally.
2.6.5 — 11/29/19
- In response to issue #126 the behavior of the
SR command has been modified. It now will only trigger power to the RC servo after commands which need
to move the servo (like SP), and will no longer apply power to the servo if the steppers are moved.
2.6.6 — 05/26/20
- In response to issue #137 Fixed a bug with the
PC/PG command which caused some PC command changes not to take effect for up to 64K more milliseconds.
2.7.0 — 11/19/20
- While investigating issue #143,
we discovered some unexpected behavior due to issues in the prior implementation of the LM
command. The LM command has been rewritten to make computation easier and provide accurate
and consistent behavior that is also consistent with the documentation.
- Bug fix: The "Rate" parameter in the LM command can no longer become negative during a move.
- Added new LT (low-level timed move) command, based on updated LM command.
- Added optional "clear" parameter to SM, XM, LM, and LT commands.
- Added optional destination parameters (absolute step locations) to HM command.
- Optimized math and logic inside step ISR for shorter minimum move durations.
- EM command now always clears accumulators.
- Reduced effective external step pulse times to between 1.6 μs and 2.3 μs (from 2.8 μs to 3.0 μs).
- Fixed a bug present in all motion commands that could lead to a 40 μs dead "gap" between subsequent motion commands; individual motion commands can (in principle) now be as short as a single 40 μs "ISR" cycle.
- Removed AM command.
- In response to issue #144 the behavior of the S2 command has been modified so that it, like the SP command, counts as a "pen action"
that will reset servo power timeout. See the SR command documentation for more information.
- Added new "Performance" section to documentation,
with much more detail about movement command performance under different conditions.
2.8.0 — 04/22/21
-
In response to issue #152 Move the EM command
to be part of the motion queue. This allows EM commands to take place at a predictable point in the motion
sequence rather than sort of randomly during a move.
-
In response to issue #151 Added QE command to
query the motor enable states and microstep resolutions.
-
In response to issue #153 the ES command was
given an optional parameter to disable the motors.
2.8.1 — 07/27/22
-
In response to issue #180 Added a new debugging
option: CU,3,1 and CU,3,0 to enable/disable the use of the red (USR) LED as an 'empty FIFO' indicator.
3.0.0 — 03/01/24
Version 3.0.0 represents the largest group of changes ever made to the EBB firmware codebase. Many separate changes (see below) were bundled together into one large release so that PC software could count on all of the v3.0.0 features being present together. Besides new commands, refactoring of critical code sections and other functional changes, a significant effort was put into cleaning up the source code. A unified style was applied to all source files and significant comments were added throughout the codebase and in particular in the critical and complex motion ISR. A significant amount of effort was also undertaken to add in HIL (hardware in the loop) test functionality into the shipping firmware image. This allows PC based test routines to verify all sorts of timing and logic functionality in an automated or semi-automated manner.
Even with all of the changes in this version, many attempts have been made to produce default behavior which is almost completely compatible with previous EBB versions.
-
A 'jerk enabled' version of the
LT
command was added called the T3
command for time limited moves with jerk control.
-
A 'jerk enabled' version of the
LM
command was added called the L3
command for rate controlled moves with jerk control.
-
The motion control ISR received a significant re-factorization to add in support for new commands and decrease typical code path time as much as possible.
-
The FIFO was expanded to allow for up to 32 commands to be queued. At boot the FIFO length defaults to 1 for backward compatibility. See commands
CU,4
for setting the FIFO depth, QU,2
for reading the maximum supported FIFO depth, and CU,3
for reading out the current FIFO depth.
-
New low level floating point based routines were added to allow much simpler math as well as larger parameter values for the 'simple' motion control commands
SM
, XM
and HM
.
-
In order to free up some RAM for the larger FIFO, the maximum number of simultaneous RC servo outputs was reduced from 24 to 8. This change does not affect which pins are available for RC servo output, only how many can be active at once.
-
Removed
PC
, PG
and T
commands as per issue #216
-
Added "Future Syntax Mode" - see
CU,10
command - based on issue #139. This change allows a user to turn on a mode where every response from the EBB follows the exact same format to make machine parsing of responses more efficient.
-
Added limit switch support - see
CU,51
, CU,52
and CU,53
commands - based on issue #58. These commands allow for a hardware limit switch (or several) to be enabled which, when triggered, can stop any motor motion.
-
The
QG
command has been modified. Bit 7 now reports the limit switch triggered value, and bit 6 reports the power lost flag. In particular, the power lost flag allows the PW to know if the EBB's power has dipped low enough to cause a loss of step position, which could be used to alert the user. See CU,60
for information relating to setting the Power_Lost_Threshold value.
-
The
SL
and QL
commands have been enhanced to allow up to 32 to 8-bit values to be stored and retrieved.
-
A new mode has been added which requires a checksum at the end of every command sent to the EBB. See
CU,54
for more information.
-
The ability to more explicitly control which stepper motor drivers are enabled was added as part of command
CU,50
. This allows for the freewheeling of one motor while the other motor executes a move for example.
-
Software test modes were added and are enabled using
CU,250
through CU,257
.
3.0.1 — 04/02/23
-
Issue #223 Added a new
TD
command to create a faster way to execute two T3 commands back to back to create S-curves.
-
Issue #222 Added a new
SP,2
and SP,3
commands to immediately raise the pen (without going through the FIFO).
-
Issue #221 Added a new
QU,6
command to query the current number of moves in the FIFO (i.e. how 'full' the FIFO is).
3.0.2 — 05/06/24
-
Issue #228 Removed 'Param_Number' in replies to the
QU
command to simplify PC side parsing of replies.
3.0.3 — 05/26/24
-
Issue #233 Fixed numerous problems with EBB error reporting while parsing. Added documentation to document the actual behavior when errors are detected.
EiBotBoard by Brian Schmalz is licensed under a Creative Commons Attribution 3.0 United States License. Based on a work at www.schmalzhaus.com/EBB. Permissions beyond the scope of this license may be available at www.schmalzhaus.com/EBB.
Extended EggBot documentation available at: http://wiki.evilmadscientist.com/eggbot