Skip to main content

Reverse engineering a parallel port with Arduino



I'm in the beginning stages of building a CNC router. In this project, I am trying to salvage as many parts as possible from old machines. Relating to the title of this post, I have an old Parallel port dual-stepper motor controller in which I decided would be good to use to test stepper motors. While there are definitely more modern and better controllers available, and I am certain I will eventually get one, I figured why not try and get this old controller working. Since parallel ports are really uncommon on computers these days, I decided to attempt programming an Arduino to send data through to the old controller. 
It turns out that parallel ports effectively have 17 pins out of 25 that deal with data while the rest are ground. Additionally, the data pins work at 5 volts which is identical to the digital pins on an Arduino. Since this controller only receives data inputs from a computers parallel port, I simply needed to determine the connector's pinout and wire it up to an Arduino. 
Determining the connector's pinout proved a bit challenging as the board, I presume, is from circa 1995. Using a multimeter, I managed to trace each pin back to the chips on the board and started to get a general idea of how it worked. Additionally, I found an old article which showed a Parallel CNC controller pinout which appeared to have similarities to the one I was trying to reverse engineer. Here is a summary of the details I determined:
  • Only 8 of the pins are required to control the stepper motors.
  • A set of 4 pins relate to each motor.
  • Each data pin controls a phase of the motor. The phase is active when the pin is Low. 
  • Pin 1 must be low to activate the board
  • Pins 2 through 9 control the motors.
  • Pins 10 through 17 don't have any useful purpose. (other than for 2 limit switches which are not necessary for this purpose.)
  • Pins 18 through 25 are ground.
Here is a proper pinout for the controller:
 Pin Use (Active LOW)    
 1 Board Enable
 2 Motor 1, Phase 1
 3 Motor 1, Phase 2
 4 Motor 1, Phase 3
 5 Motor 1, Phase 4
 6 Motor 2, Phase 1
 7 Motor 2, Phase 2
 8 Motor 2, Phase 3
 9 Motor 2, Phase 4
 10-17 Unused 
 18-25 GND


Wiring these pins up to an Arduino, I then needed to figure out the sequence in which pins should be active. From a little bit of research, I determined that this circuit board essentially converts a unipolar 6 wire motor powered externally, to a bipolar 4 wire 5 volt powered motor. In other words, the pins act like those on a small 4 wire stepper motor which can be controlled entirely from the digital pins on an Arduino. 
Altogether, I put together some simple code and was successfully able to control the motors.