These printers might see use with microcontrollers or with Linux-based computers such as Raspberry Pi. The Tiny printer has the distinct option of connecting to a Raspberry Pi’s USB port, covered later on this page. But to start, let’s talk about TTL serial—the non-USB connection present across all of these printers.
TTL Serial
Most microcontrollers can provide a 3.3V or 5V TTL serial connection. It’s not same as the 10V RS232 serial from a computer’s 9-pin serial port — don’t connect the printer directly to a standard PC port or you may damage it. A USB-to-serial cable (such as those made by FTDI, or similar) is an option on Linux PCs, but most will be using it with a microcontroller.
It makes no difference if the controller is a 5 Volt or 3.3 Volt device. The printer logic is 3.3V, but “5V tolerant,” meaning no extra level-shifting circuitry is needed in either direction. Some older documentation may still show a voltage divider (two resistors and some extra wires), but that’s since been found unnecessary. The printer and 5V or 3.3V devices can connect directly.
To start, we’ll connect to the data cable of the printer. Easiest is to simply press breadboard jumper wires into the data plug, then use those to extend the connection to the host: an Arduino or other microcontroller, Raspberry Pi, or USB-to-serial cable.
If the controller is on a breadboard or the socket headers along the edges of an Arduino Uno-like board, or with most USB-to-serial cables: male/male jumper wires are suitable.
If the controller is a Raspberry Pi: use female/male jumper wires to the Pi’s GPIO header.
The wire color for each pin is not the same across all these printers. Please read the descriptions carefully. It’s nice (but not mandatory) to match jumper wire colors to the printer’s data cable, to help keep track of things.
For Product #597: “Mini”
The Mini printer data cable has three wires:
- Black = GROUND reference
- Yellow = data IN to the printer (RX)
- Green = data OUT of the printer (TX)
This is in addition to the separate power cable, described on the prior page.
For Product #2751: “Tiny”
The Tiny printer data cable has five wires:
- Red = GROUND (yes, red, and yes this totally is the opposite of common electronics conventions)
- Green = data IN to the printer (RX)
- Blue = data OUT of the printer (TX)
- Yellow (DTR) and black can be left unconnected
This is in addition to the separate power cable, described on the prior page.
For Product #2752: “Nano”
The Nano printer cable has five wires and no separate power cable.
- Black = power and signal GROUND
- Blue = data IN to the printer (RX)
- Green = data OUT of the printer (TX)
- Red = 5–9V DC power
- Yellow = DTR, can be left unconnected for now
Power and data share a single connector here. Ground must go to both the power supply and the microcontroller, meaning you’ll need a split here, perhaps using a breadboard’s power rail.
For Product #2753: “Guts”
The Printer Guts cable has five wires and no separate power cable.
Some printers have a color-coded cable, while others have just have a plain white cable. Unplug this temporarily from the printer and you should find the pin functions labeled on the PCB:
The pin order here is not the same as the Tiny or Nano printers. And if you have both Guts and Nano printers, be super careful about the wiring, because the plugs are interchangeable but the sequence of wires and colors (if any) do not have the same functions!
- VH = 5–9V DC power
- GND = power and signal GROUND
- RX on the PCB = data IN to the printer
- TX on the PCB = data OUT of the printer
- DTR on the PCB = can leave unconnected for now
As with the Nano printer, power and data share a single connector. Ground must go to both the power supply and the microcontroller, meaning you’ll need a split here, perhaps using a breadboard’s power rail.
For a board like the Arduino Uno, the other end of the jumper wires can insert into the board edge sockets. For smaller devices on a breadboard, insert into the corresponding contact strip.
Ground from the printer always connects to GND on the microcontroller board. For the data wires (TX and RX), which pins to connect to can vary by hardware and software, explained further on subsequent pages. Some situations may require specific pins, but you can usually use any two pins. Here’s the printer’s TX line connected to digital pin 5, and RX to digital pin 6:
Before connecting any TTL serial printers to Raspberry Pi, it’s vitally important to perform a little system configuration first.
The Raspberry Pi board has a TTL serial connection on the GPIO breakout header. By default, it’s configured for a serial console — connected to a terminal, this provides another way to log into the system (along with Ethernet, WiFi or keyboard+monitor). We need to turn off the serial console behavior, or a connected printer will just spit out endless gibberish! This only applies to a TTL serial connection; Tiny printers using USB, or others when using a USB-to-serial adapter, don’t need this step.
If using a desktop OS (mouse and GUI), it’s just a few clicks. From the “Pi” menu at the top left, select Preferences→Raspberry Pi Configuration…
Select the Interfaces tab.
Turn Serial Port ON, and Serial Console OFF, as shown in the image.
Click the “OK” button, then “Yes” when asked whether to reboot
If a “lite” OS (text login), this is done from the command line:
sudo raspi-config
You’ll find the Serial Port settings under “Interface Options.” Select “No” for the login shell, and “Yes” if asked about the serial port hardware (this option might not show up on older Pi models, where it’s always on). Tab over to “Finish” and reboot when asked.
Now the printer can be connected without making a mess.
The diagram at left shows the Pi’s GPIO header. For orientation reference, the 5V pin at the top right is nearest the corner of the board.
TX and TXD mean the same thing: transmit or transmit data. Likewise with RX and RXD. The terms might get used interchangeably.
TX and RX from the printer go to specific GPIO pins with opposite functions. TX to RX and RX to TX, known as a crossover configuration:
Really you can use any GND shown in the pinout diagram above. The third pin is easy to locate, but that spot’s sometimes occupied by other hardware like small cooling fans.
If you happen to be using the Mini printer with the 3-pin data cable, and if the Pi and printer are kept close together, you might not even need jumper wires. Skip the first two 5V pins on the GPIO header, and the data cable can press right on to the next 3 pins in sequence: GND, TX and RX.
The principle here is similar to Raspberry Pi above: create a crossover by connecting the printer’s TX to the adapter cable’s RX pin, RX to TX, and ground to ground.
The diagram here is representative, not literal. Some adapter cables might have this pinout, but others will not. FTDI cables, for example, usually have a 6-pin header with its own color code; only 3 pins are needed here. You’ll find pin functions and colors in the specific cable’s documentation.
Any of these cables will require device driver software. Popular ones (FTDI, Prolific, etc.) might already be present on Linux systems. Check documentation.
Also, how the device manifests when connected to a computer’s USB port will vary among manufacturers and drivers. In Linux it might show as /dev/tty.USBserial
(followed by a number), but other conventions are sometimes used. Skim through the /dev
directory and/or try the lsusb
command to help identify the device.
“Tiny” Printer: USB to Linux (Raspberry Pi, etc.)
The Tiny printer has the lovely option of connecting via USB cable, no jumper wires needed. On Raspberry Pi, there’s no need to change anything with raspi-config…but there are some things to know about the system.
On current Tiny printers, and on earlier ones when suitably configured, the printer appears to the system as /dev/usb/lp0 and operates through the USB printing subsystem. Sometimes there will be a different number at the end, if more printers are attached.
On earlier Tiny printers, the factory configuration instead has it appear as /dev/ttyUSB0, which mimics a Prolific USB-to-serial bridge. Sometimes there will be a different number at the end, if other USB-to-serial devices are attached.
Any software or commands that want to issue data to the printer should speak to the appropriate device name (try ls /dev
from the command line to see what’s present, or try lsusb
). Project code will often have the system device name in a global variable somewhere. Aside from that difference, they should both function the same; open the device, issue data, printer prints it.
If you have an older Tiny printer (defaulting to USB-to-serial bridge) and specifically require USB printing subsystem compatibility instead, there’s a way to switch it over:
- Similar to the self-test, hold the paper feed button while applying power…but now keep holding it.
- After the QR code, the current USB mode is printed: this will either be COM (USB-to-serial mode, the default) or Printable Port (USB printing subsystem).
- Release the paper feed button.
- To keep the current setting, tap the paper feed button once more.
- To change to to the opposite USB setting (COM or Printable Port), hold the feed button for at least 2 seconds. The printer will confirm the change.
This is present only in older Tiny printers. Current units work strictly in USB printing subsystem mode—it’s considered more modern—and continuing to hold the paper feed button will just eject a lot of paper…so don’t.
Text editor powered by tinymce.