LPT relay board circuits | mortenbs.com Last updated 2010.
Before we had the Arduino to control electronics from a PC through USB, I used to build some LPT-based circuits. Today I just use the Arduino for my robotic projects and small circuits. Still it was fun to explore the LPT port, and working with LPT in Delphi...
LPT Relay board(2006)
Bottom view
LPT relay board circuit with 10 car relays 10 Solid state relays from a car being tested by LPT board circuit in different patterns and speed.
The LPT port (DB25 LPT Connector) The LPT port runs up to 5 volt DC. There is 3 bytes(each of 8 bits) to control the port.
Pin
Byte
Bit
LPT Port
LPT board
Behaviour
01
CONTROL
0
Strobe
Output 09
5v when off (inv)
02
DATA
0
Data Pin 1
Output 01
5v when on
03
DATA
1
Data Pin 2
Output 02
5v when on
04
DATA
2
Data Pin 3
Output 03
5v when on
05
DATA
3
Data Pin 4
Output 04
5v when on
06
DATA
4
Data Pin 5
Output 05
5v when on
07
DATA
5
Data Pin 6
Output 06
5v when on
08
DATA
6
Data Pin 7
Output 07
5v when on
09
DATA
7
Data Pin 8
Output 08
5v when on
10
STATUS
6
Acknowledge
Input 01
off when ground (inv)
11
STATUS
7
Busy
Input 05
on when ground
12
STATUS
5
Out of paper
Input 03
off when ground (inv)
13
STATUS
4
Select status
Input 04
off when ground (inv)
14
CONTROL
1
AutoFeed
Output 10
5v when off (inv)
15
STATUS
3
Error
Input 05
off when ground (inv)
16
CONTROL
2
Initialize
Output 11
5v when on
17
CONTROL
3
Select
Output 12
5v when off (inv)
18
-
-
-
-
-
19-25
-
-
Ground
Ground
-
Single LPT output-pin For each output a transistor gate was used (to invert 5 volt of the pin to ground for external supply). An output pin is connected to a BC547 NPN transistor, through a 1N4448 diode (75V/0,1A) (to protect the port). The BC547transistor requires only <1 volt (through a ~3,3k resistor), to open for ground on the collector pin. Also a ~10k resistor was used for transistor pull-down. "Optional gate 2" uses a ~680 ohm resistor for the BD136 PNP transistor(Converting ground to external + 12 volt DC.)
The LPT board First a >1000uF capacitor and a diode, to give the board an internal power supply. Then a transistor gate for each 12 outputs, and further 5 transistors for input feedback. All outputs connected to LEDs, and also to pins on the IDE connector.
In this project the "optional gate 2" for each output, was placed on seperate boards as extensions.
[BD135] Expansion board Used to drive relays or other stuff that uses more power. A small power supply (the capacitor). 10 x [BD135] NPN transistor with 1k [resistors]