Getting a receipt printer to work!

Hey there! Have you wondered how receipt printers work? They are actually very simple!

This printer uses the RS-232 standard to communicate. This works by sending over a Serial message (very similar to Serial.print in arduino!) However, it’s encoded in +10v and -10v. A 1 is actually -10V, and a 0 is a +10v. This sounds really annoying, but a handy chip, called the MAX233 uses a cool charge pump design, and generates the +/- 10V needed to communicate through RS-232!

After making sure my wiring was correct, I was able to use a USB to FTDI connector, and connect the FTDI output straight into the MAX-233 chip. The MAX233 chip was then connected to a RS-232 breakout board, which then connected into the printer.

After all that wiring, just typing

`printf "\x1B\x40\x03Hello world\r\n\x1B\x64\x00" > /dev/ttyUSB0`

was able to print on the receipt printer!!

Previous
Previous

SatDump Data Processing

Next
Next

New England Synth Meetup!