UART ports

Smoothieboard has hardware UART serial ports independent from USB serial.

This is a hardware “serial” port independent from the main “USB” serial port.

You can connect to this serial port using a “USB to UART” adapter, such as an FTDI TTL cable.

The Smoothieboard communicates with 3.3V TTL logic and can only handle a maximum of 5V on the inputs.

The debug UART sends boot messages, errors, and warnings. Smoothieware V2 also lets you select one of two auxiliary UART channels as a command console or a serial-output target.

If you are running into trouble, this can sometimes be useful as errors and warnings are displayed there.

With a UART configured as a console, you can use it like USB serial or the network shell: send commands or G-code and read the responses.

As the UART has NO FLOW CONTROL, you MUST rigidly use the ping-pong protocol, sending ONE line of G-code per ok received.

You configure the baud rate in the configuration file with .

V2 auxiliary UART configuration

[uart console]
enable = true
console = true
channel = 0
baudrate = 115200
bits = 8
stop_bits = 1
parity = none

console = true enables command input and output. Set it to false when an external device should receive only messages sent through echo -1.

Send text to a connected device (V2 only)

On Smoothieware V2, echo text broadcasts text followed by a line feed to the active consoles. Use echo -1 text to send text only to the configured auxiliary UART. Add -n before the text when the receiving device must not receive the trailing line feed:

echo machine-ready
echo -1 feeder-advance
echo -1 -n feeder-advance

Configure the auxiliary UART before using echo -1:

[uart console]
enable = true
console = false
channel = 0
baudrate = 115200
bits = 8
stop_bits = 1
parity = none

Set channel to the hardware UART connected to the receiving device. Match the baud rate and framing to that device.

Channel Peripheral RX TX
0 UART3 PB11 PD8
1 UART4 PH14 PB9

The upstream New features wiki lists PB8 for channel 0, but the checked V2 UART driver configures PD8 as UART3 TX. The firmware source controls the pin mapping.

-1 means “the configured auxiliary UART”; it is not a channel number. Select channel 0 or 1 in [uart console]. The V2 firmware does not provide echo -0 or independently selectable simultaneous UART targets.

Use console = false when this UART is a device output. This initializes it for echo -1 without treating incoming data as console commands. Only one auxiliary UART can be selected at a time.

Use console = true to make the selected channel a command console. In that mode, send one command line and wait for its response before sending the next because the UART has no hardware flow control.

This lets Smoothie act as a simple serial-output controller: a command, GPIO input, or button can send a short command to a connected feeder, Arduino, PLC, or other serial device. For input-triggered examples, see Switch and Button Box.

On Linux machines, the output of the serial debug port is not nicely formatted because the Smoothieboard sends only a LF, but a CRLF is needed.

Picocom offers a parameter to fix that: picocom -b 115200 /dev/ttyUSB0 --imap lfcrlf.

For reading the initial debug startup messages, the serial port communication settings are:

  • Baudrate: 9600
  • Character bits: 8
  • Parity bit: None
  • Stop bit: 1

The following software will give you a basic terminal interface to communicate with the Smoothieboard over UART:

This is a wiki! If you'd like to improve this page, you can edit it on GitHub.