16

I've purchased a Mini Thermal Printer from Adafruit. The documentation states:

This printer is ideal for interfacing with a microcontroller, you simply need a 3.3V to 5V TTL serial output from your microcontroller

Since the serial pins on the GPIO output at 3.3V I assumed that I could just connect the printer directly to the pins and it would just work without a protection circuit. Is that a naive assumption? What else do I need to do in order to use the printer?

10
  • 1
    Probably very little aside from software. If the printer produces any reply data, you might need a voltage limiter on that though. You might want to ask on the adafruit forums, since they sell both the printer and pi's as well. Oct 7, 2012 at 15:59
  • As far as I can tell there is no reply data.
    – Jivings
    Oct 7, 2012 at 17:33
  • 1
    @AlexChamberlain in a word, no. That is not something people worry about in logic translation at all. A higher voltage driver damaging a lower voltage receiver, or a lower voltage driver failing to be reliably registered by a higher voltage receiver yes, but not excessive current draw when driving a a simple logic input from another family. Oct 7, 2012 at 23:49
  • 2
    Have you seen this? sparkfun.com/products/8745
    – Alex L
    Oct 8, 2012 at 6:23
  • 1
    @RongNguyen You can get it to print anything you like, you'll just have to do the hard work yourself. There's a tutorial here.
    – Jivings
    Jun 17, 2014 at 16:31

3 Answers 3

5

The voltage levels are not a problem, a LVTTL logical '1' will also be a TTL logical '1'. The only issue can be the (sinking) current, as Alex Chamberlain already suggested. This can be a problem.

This sinking current depends on the input circuit of the printer, as we can only guess how it is constructed, it might be better to be safe then sorry!

So to be safe put a CMOS buffer in between. A 74LCX244 for example. If something would start to smoke then, it will not be your Raspberry Pi.

Edit: I noticed criticism about the current statements, to back this statement up:

Quote from klabs.org:

  • CMOS output stages can also be tricky and subtle device characteristics can cause errors. Check all specifications carefully! For example, many CMOS devices when driving loads are specified at only very low current levels for high or logic '1' signals. However, TTL inputs take substantial currents and do not present the high impedance seen by CMOS FET inputs and the output may be dragged down.

More information about this current issue here: 5 V TTL and CMOS Input and Output Voltage Levels:

  • CMOS -> TTL: you may need a buffer to handle extra sinking current when CMOS output goes low

Hope this helps.

0
1

This may be what you need:

4-channel I2C-safe Bi-directional Logic Level Converter - BSS138

or

8-channel Bi-directional Logic Level Converter - TXB0108 (non I2C)

1
  • This is not needed for a send-only connection. Oct 13, 2012 at 15:40
1

I believe "TTL serial" means async serial you'd find in a common UART. A natural way to attach this printer to a PI would be to find a UART on the board (GPIO 14/15?) or attach one to another bus. There are a few good (FTDI, CP2102) and worse (Prolific) chips available for USB and loads for I2C and SPI. If the device demands handshaking, you'll have to worry about that as well. The Adafruit page doesn't seem to use any (Tx/Rx only if I read it right).

If you do want to do this over actual GPIO (logically fine, but see others for warnings about electical compatibilty), you could search for "software uart".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.