[deutsch]

Capture parallel printer data

For the need of capturing and post-processing parallel printer data, additional hardware is needed in any circumstance.

Construction

With an FT245R by FTDI, the solution of this problem is surprisingly simple. This integrated circuit contains a bi-directional USB-to-parallel FIFO, and within MS Windows, a serial COM port occurs, that eases programming tasks. And the most beautiful thing using USB is not to need any further power supply.

Using FT245R (bear in mind the suffix R, it's important!)

A parallel port emitting print data expects following conditions: The 8-bit parallel printer data is eventually transferred by a LOW pulse at STROBE, that's all. The lines INIT, SELIN, AUTOFD are out of concern. See also parallel port article at Wikipedia.


Schematic (Eagle source Browse zipfile on server)

Even though the inactive level for WR is documented as LOW, applying a permanent HIGH level works too. So, you can wire STROBE directly, without inversion. The opposite FIFO data transfer direction of FT245R is disabled. The purpose of the pull-up resisitor R1 at WR is solely for avoiding FIFO fill-in while cable connect or disconnect. All the peripheral side pins of IC1 are protected by series resistors RN1, RN2, and RN3 to avoid excess ringing introduced by signal reflection on possibly long or bad printer cables. The resistor RN1B is a left-over from one resistor array, and connected on one side to ease PCB routing (see board below).


Evaluation construction

For evaluation, I used a ready-to-use FT245R module by Siphec, and a wiring board. I omitted the series resistors, thus you shouldn't use parallel port extension cords to avoid ringing. This FT245R module is a good choice for those who are frightened soldering such small components with 0.5 mm pitch.

 
PiecesDescriptionPackageReichelt Order CodePrice in € (2011)
1USB FIFO ICQFN-32FT245RQ4.99
1Ceramic capacitor 100 nF0603X7R-G0603 100n0.05
1Ceramic capacitor 4.7 µF0603X5R-G0603 4,7/60.05
3Resistor array 4 × 100 Ω1206BCN16 1000.02
1Resistor 4.7 kΩ0603SMD-0603 4,7k0.10
1D-Sub plug 25 pinwire solder cupsD-Sub St 250.19
1USB receptacle MiniBthrough-holeUSB BWM0.98
1Plastic D-Sub shellKAPPE CG25G0.16
1USB cable1 mAK 673-A1.00
1One- or Two-sided PCB
Vias/bridges can be made by hand
LptCap.brdDIY

PCB design (Eagle source) and part list (AKA BOM, bill of material)

The PCB above is made for fitting in a usual plastic D-Sub shell. This design is similar to USB2LPT; especially the USB-miniB receptacle is edge-mounted, see this YouTube video clip for how-to-do this. The PCB can be easily home-made and is optimized for minimum vias. It's even possible to produce a single-sided PCB using the same design and to use wire straps. Moreover, it's even possible not to drill any hole, applying the wire straps on the component side (except one for GND that must connect to bottom-side contacts of the D-Sub connector). All components are located on top side.

Note: The schematic's pin numbers of FT245R don't apply to the L package (SSOP, 28-pin, 0.65 mm pitch), and re-design of PCB would be necessary.

Related

There are some gadgets having both USB and parallel port: Moreover, there are solutions using Ethernet instead of USB, like this.

LptCap is not intended for capturing local printer data. Although such a constellation will work too, there are software-only solutions around, like DosPrn, or some methods available for the current operating system.

Someone (Sandro Bureca) reported 100 kByte/s transfer rate, but did not note which data source he had used.

Besides using FT245R the more general but more cumbersome solution is using a microcontroller and firmware. It's possibly cheaper. For example:

Application

For capturing printer data in a casual or long-term application, there is HyperTerminal and its capture-and-save menu item. The baud rate for the COM port is a don't-care, as for any FT245 application.

However, if you want to redirect printer data to another Windows printer (e.g. a PDF generator), if necessary with processing ESC/P printer control codes, I had written the application SPE = Serial Printer Emulator. The name implies that, while running this application service-like, it converts the computer to (at least) one printer with a serial port, together with the hardware described above, with a parallel port.

Of course you can write any application using any programming language you know, that can read and process data from a COM port, e.g. using VisualBasic, VBA, C++, Python or LabVIEW.


Henrik Haftmann, 2012-05-21