SchmalzHaus logoEBB Commands

Introduction

The EBB firmware is based on the UBW firmware. The same basic command processing framework is used, so the same type of commands are used, and the same type of errors are returned. See the UBW command documentation for an introduction to these topics.

This command reference applies to EBF v1.8 and above. (Any differences between firmware versions are noted below.)

General Notes on Default Software Configuration (Applies to EBF v2.1.4)

When the EBB boots up, the output RB1 (called B1 on the board) is used to control the pen up/down servo. The SP and TP commands default to operating on RB1.
When the EBB boots up, the output RB3 (called B3 on the board) is set to be a digital output, set low, to turn the engraver (if used) off at boot. SE command can be used to enable PWM output on this pin.
When the EBB boots up, it sets RB0 (called B0 on the board) as an input and uses this as an alternate pause button (same function as PRG button during normal operation). Use SC,13,0 (see below) to disable this.
When the EBB boots up, it uses RB4 (called B4 on the board) as an alternate pen up/down digital output (1 when down, 0 when up). You can use this to enable a laser for example. Use SC,14,0 (see below) to disable.

EBB Command FAQ

Q1) How can I calculate how long it will take to move from one RC servo position to another? Specifically in relation to the standard pen-arm servo that is activated with the SP,1 and SP,0 commands.
A1) By default, with the latest version of EBB firmware (v2.1.5), we add (or subtract) the rate value from the current pulse duration every time the pulse fires until the current pulse duration equals the target duration. Normally we have 8 servo channels available, and each gets 3 ms, so that means that each channel can fire once every 24ms. So the rate value gets added or subtracted from the current pulse duration every 24ms.

For example, if you're currently at a position (pulse duration) of 10000 and you send a new command to move to position 15000, then you have a 'distance' of 5000 to go. So when we start out, our current duration is 10000 and our target is 15000. If our rate value is 100, then it will take 50 of these 24ms periods to get from 10000 to 15000, or 1.2seconds total.

Now, when you're using the SP,0 and SP,1 commands, the servo_min (defaults to 16000, or 1.3ms) and servo_max (defaults to 20000, or 1.6ms) get used as the positions. And the servo_rate_up and servo_rate_down get used as the rates.

So  the formula is as follows:
((<servo_max> - <servo_min>) * .024)/<servo_rate> = total time to move

For the example above
((15000 - 10000) * .024)/100 = 1.2 seconds

EBB Command Reference

The "QC" Command (Query Current) - Added in v2.0, bug fixed in 2.0.1

    This command only works properly on EBB hardware v1.3 and above. (The white boards from EMSL are v2.0, and all boards from SparkFun are v2.0 and above) The first value returned is the raw 10 bit analog level on the REF_RA0 input to the stepper driver chip. This voltage level sets the max current that the driver chips allow into the motor coils. The second value returned is the raw 10 bit analog level on the V+ input (i.e. the power coming into the board, but after the first diode), and is scaled so that the input voltage doesn't go above the 3.3V max analog input level for the MCU.

    For a v1.5 EBB, the following values were measured for the second returned parameter of the QC command:
Input (V+)    QC second parameter
0.0 449
5.0 513
9.0 574
12.0 604
24.0 775
    So one can use these two returned values to check for proper stepper motor driver current and proper power supply input voltage. You could also disable the motors, read the power input voltage, then enable the motors and check it again, giving an approxiate reading of the level of voltage droop on the power supply when the motors are loading it down. Note that V+ is not measured directly, but rather after a diode and through a resistor divider. The diode will drop some voltage (dependant upon current) and there will be some tollerance in the voltage divider. Thus you can't rely upon the raw ADC valule alone to give a precice measurement.

    Version History: This command was introduced in v2.0.0, but it had a bug where the upper byte of the result was no being displayed. Version 2.0.2 fixed this bug and the command now works properly.

The "SE" Command (Set Engraver) - Added in v2.1.0

The "NI" Command (Node count Increment) - Added in v1.9.5

The "ND" Command (Node count Decrement) - Added in v1.9.5

The "BL" Command (BootLoad) - Added in v1.9.5

The "SN" Command (Set Node count) - Brought back in v1.9.5

The "CN" Command (Clear Node count) - Added in v1.9.3, removed in 1.9.5 and above

The "SL" Command (Set Layer) - Added in v1.9.2

The "QL" Command (Query Layer) - Added in v1.9.2

The "QN" Command (Query Node count) - Added in v1.9.2

The "QB" Command (Query Button) - Added in v1.9.2

The "QP" Command (Query Pen) - Added in v1.9

The "TP" Command (Toggle Pen) - Added in v1.9

The "SM" Command (stepper motor move)

The "SP" Command (set pen state)

The "EM" Command (enable motors) for EBB v1.1

The "EM" Command (enable motors) for EBB v1.2 and above

The "SC" Command (stepper mode configure)

The "S2" Command (general RC servo output)



Questions? E-mail me at my e-mail address

Creative Commons License
EggBotBoard 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.