Electronics, for fun - Some ideas for electronic hobby... and work
In this page you will find the description of a serial to parallel converter designed to connect a large number of digital output to a PC parallel port.
This isn't an "autonomous" circuit but should be used with other circuit, as a Micro-step driver or Unipolar step driver.
Often is required to connect a digital circuit to a PC; no problem if ten digital output are enough, no isolation is required, circuits are 5V powered...
Using this circuit you will connect to a single parallel port electronic circuits requiring up to 96 digital output, optically insulated lines, 3 to 15V powered.
Drawback is a relative high time to update... Using high speed LPT and high speed opto-isolators throughput will be up to 500 kbyte/s.
This design use CD4094B, a simple serial to parallel converter.
The CD4094B consists of an 8-bit shift register and a 8-bit latch. Data is shifted serially through the shift register on the positive transition of the clock. The output of the last stage (QS) can be used to cascade several devices. The output of each stage of the shift register feeds a latch, which latches data on the negative edge of the strobe input. When strobe is high, data propagates through the latch to output gates.
Three optocouplers are used for electrical insulation.
A simple schematic for iso-buffer
... and a real circuit.

Here a timing diagram, where you can see from top to bottom:

Signals are inverted because optocouplers acts as inverter, see data sheet for more details.
Total time required is about 50 us but using higher speed LPT limit values is set by optocouplers to about 20 us. You can connect to a single LPT up to six of these CD4094 chains using a common clock and strobe pin.
Note that optocouplers are not high speed components. In following image, you can see a digital input signal to led pin (lower trace) and transistor output voltage: transition time is about 500 ns and maximum frequency clock is about 2 MHz.

You can write your-own code to generate timing using as reference data sheet and timing diagram in this page.
Or you can use functions in VVIO project library.
To connect iso-buffer to LPT, you need a cable. You can see the simplest version in following schematic:

As sample, for 5x2 connector on the right, connections to do are:
| Optocouplers | Function | Led | Pin 5x2 | LPT pin | LPT pin name |
| ISO1 | strobe | anode | 1 | 2 | Data 0 |
| ISO1 | strobe | cathode | 2 | 25 | GND |
| ISO2 | clock | anode | 3 | 3 | Data 1 |
| ISO2 | clock | cathode | 4 | 25 | GND |
| ISO3 | D1 | anode | 5 | 4 | Data 2 |
| ISO3 | D1 | cathode | 6 | 25 | GND |
| - | reserved | - | 7 | - | - |
| - | reserved | - | 8 | - | - |
| - | reserved | - | 9 | - | - |
| - | reserved | - | 10 | - | - |
Using this simple cable there is a problem: LPT pin 2 and 3 should source current to light up to six led, one for each connector... A single LED require about 16 mA and some LPT can source no more then 20-30 mA. And if you use a portable PC current may be lower! So this connection work fine only using high current parallel port AND if you connect only a small number of chains... Otherwise you need an "active version" of cable.
In following image, a prototype for a dual-chains connection: I think it work with almost all desktop parallel port.

Using active cable you can:

As sample, for 5x2 connector on the right, connections are:
| Optocouplers | Function | Led | Pin 5x2 | Power | LPT pin * | LPT pin name |
| ISO1 | strobe | anode | 1 | Vcc | - | - |
| ISO1 | strobe | cathode | 2 | - | 2 | Data 1 |
| ISO2 | clock | anode | 3 | Vcc | - | - |
| ISO2 | clock | cathode | 4 | - | 3 | Data 2 |
| ISO3 | D2 | anode | 5 | Vcc | - | - |
| ISO3 | D2 | cathode | 6 | - | 4 | Data 3 |
| - | reserved | - | 7 | - | - | - |
| - | reserved | - | 8 | - | - | - |
| - | reserved | - | 9 | - | - | - |
| - | reserved | - | 10 | - | - | - |
* trough inverter
Note: there is a double inversion so no software modification is required.
isobuffer.tgz file contains schematic and PCB required to connect up to six chains to a single LPT.

| C1 | 470uF - 16 Vl - Electrolytic capacitor |
| C2 | 4.7uF - Electrolytic capacitor |
| C3 C4 C5 | 220 nF - Capacitor |
| D1D2 | 1n4004 - 1A diode |
| D3 | Led |
| JP1JP2 JP3 JP4JP5 JP6 | Connector 5x2 pin, step 2.54mm |
| JP7 | Connector 2 pin, step 5mm |
| P1 | Connector DB25 male for printed board |
| R1 | 2K2 - 1/4W |
| U1 U2 U3 | 74F04 - Inverter |
| U4 | 7805 - Voltage regulator |
isobuffer.tgz contains:
| licence.txt | License |
| schematic.pdf | Circuit schematic, in pdf format |
| bottom.pdf | Solder pcb side, in pdf format |
| assembly.pdf | Components layout, in pdf format |
To build this circuit you need:
Iso-Buffer - Version 1.0 - August 2003
Copyright 2003, VincenzoV.net.
You need to read the license before to use this product
All trademark mentioned herein are property of their respective companies
You will find the original copy of this document on http://www.vincenzov.net.