bilingual Deutscher Originaltext

25pol. SubD-Buchse Parallel to USB Converter “LPTzUSB” USB-Logo

A description for do-it-yourself; Device available (30€, please email)

Photo
Photo of complete device. The green LED shows the USB connection status; the red LED the power status

This (no more unique) device enables connecting of a USB printer to an old-style parallel port. LPTzUSB kann be attached either directly or with an extension cable to computer's printer port. (LPTzUSB has a 25-pin SubD male connector). On the other face of LPTzUSB, a standard USB cable has to be connected to the printer (LPTzUSB has a 4-pin USB-A socket).

The Host Controller used supports USB Full-Speed (12 Mbit/s) and Low-Speed (1,5 Mbit/s) but not High-Speed (480 Mbit/s).

The use of an external AC/DC adaptor is highly recommended. It must supply 5 V and at least 50 mA.

USB hubs between LPTzUSB and printer are currently not supported. However, multi-function devices (with scanners, card readers, etc.) are supported, but only for printing.

Recommended for connecting USB printers to:

Not recommended for:

Successor model:

A successor of the device described below is in preparation using PIC32MX420 microcontroller. This will break the 30 kByte/s data transfer rate of the current design, and is even cheaper.

Use as development kit:

Because this converter contains a well-known microcontroller ATmega16 and a „bidirectional“ USB Host+Device controller, an enthusiastic programmer can make very different things. For example, a USB mouse to serial or PS/2 converter, a USB keyboard to DIN or PS/2 converter, a copy device from a USB scanner or digital camera to a USB printer (via Hub) etc.

Making the device

I have used professional PCBs. All production data is available in Eagle (a German PCB CAD software) format. For minimizing effort for reflow process, all SMDs are on one side only.

Parts list / Bill Of Materials

USB Host/Device controller SL811HST-AC 428-1464-ND 6,74+
Voltage regulator TPS76133 296-11010-1-ND 0,89+
Voltage regulator µA78L05 0,12
MCU ATmega16 ATMEGA 16-16 TQ 2,55
Crystal 12000 kHz 12,0000-HC49U-S 0,23
SubD male plug 25-pin D-SUB ST 25 0,10
LED red + LED green LED 3mm rt 0,05
LED 3mm gn 0,05
USB socket Type A USB AW 0,20
Hollow socket HEBW 21 0,26
„Infantry“ PCC2233CT-ND 0,156+ *2
X7R-G0603 100n 0,05 *2
NPO-G0603 22p 0,05 *2
BCN16 22k 0,02
BCN16 22 0,02
SMD-0805 2k2 0,08 *2
BAT 54C 0,07
1N4148SMD 0,04
Housing COM 938 0,30
PCB ul-11.brd 5,00
USB cable AK 672/2-2,0 0,60

Component placement

SMD components and crystal are placed as usual.

Known from USB2LPT there are two sockets that will be placed as edge-mount devices although not suited for.

The SubD plug can be easily mounted in edge-mount technology.

Housing: Don't forget the holes for LEDs and the labels.

Photo
The PCB inside. (For former release click here.) All SMDs are reflow-friendly on one side only

Programming

Programming of ATmega16 will be done with AC/DC converter and a special parallel-port adapter directly at the parallel port, e.g. with PonyProg2000. The RESET connection will be done via internal solder bridge SJ2. This bridge must be closed for programming and may remain closed for operating the device. All JTAG signals are fed to the SubD plug too (for programming and/or debugging), but I've not used these pins anymore.

The PonyProg2000 configuration bits must be set as shown in the following picture:

Screenshot
configuration bits: Please set accordingly!

Software

Usage

Original device
An AC/DC adaptor with regulated output voltage 5 V is highly recommended! The device is protected against wrong polarization but not against overvoltage!
Rev.1 (after 2007)
An AC/DC adaptor with at least 8 V output voltage is necessary. Non-regulated output is sufficient.

For running of LPTzUSB, a RS232 to TTL converter is recommended too. So you can observe data transmission and other useful things, e.g. using HyperTerminal at 38400 Baud. See following picture:

HyperTerminal
LPTzUSB status via serial „debug terminal“

Note that the ATmega16 program instructs HyperTerminal to draws the colored picture. There is no special Windows program necessary for nice output.

The bytes of descriptors shown have following meaning:

  1. USB address (without HUB always 01)
  2. USB device class (printer: 07)
  3. USB device subclass
  4. USB protocol
  5. Number of Configuration (mostly 01)
  6. Number of Interface (mostly 00)
  7. Number of Alternate Setting (mostly 00)
  8. Number of Endpoints (not counting EP0)
  9. EP0: Bits:
  10. EP0: FIFO size
  11. EPx: Bits for next Endpoint etc.
  12. EPx: FIFO size for next Endpoint etc.

Delivery

Although this device requires an AC/DC adaptor, supplying this heavy device outside Germany is not recommended!

Photo
Package. Think the AC/DC adaptor is not included.

Frequently Asked Questions

Why can I can't get such a device from my local computer store?

Such devices are not commonly useful:-)

Furthermore, you have the possibility to print to a file and copy the .PRN file to a USB capable PC and print it out there. Moreover, Ethernet to USB printer converters are widely available.

Making such a device is possible since one or two years(!)

Is there a high-speed version?

No. It's almost useless because data at parallel port is commonly much slower than USB Full-Speed. And data must be transferred through the microcontroller. High-speed USB host controllers with microcontroller interface are not known yet.

For Low-Speed there are much cheaper solutions around! Why bother?

There are no Low-Speed printers. Only mice and keyboards. For Full-Speed simulation, all known microcontrollers are too slow.

What about the USB-ID (US$1500)?

Not necessary for host controllers.

A USB device that needs power – is that a bit brain-dead?

Attention: This is a USB host, it must be able to supply other devices too!
Supplying power in reverse direction is never intended in the host-centric USB specification.

Do I need a AC/DC adaptor?

Let's say: yes. Always.

You can watch the current voltage at HyperTerminal.

Can I clone this?

Yes. Only for assigning serial numbers I want feedback.


Wheel re-invented! Sorry.


Briefkasten Henrik Haftmann, extern Chemnitz, den 12. September 2006