Sunday, July 31, 2011

Motor control via parallel ports of a PC : A failed project

It was the summer of 2007, when a friend came with a proposal. A proposal to build a control system to control the movement of an object along a fixed straight line. The object had to be moved to a certain distance from the initial location along a straight line.

I took up the project and used a simple motor control logic to build the system. The computer parallel ports were used to send the control signals to the motor. The motor and control signals were in fact isolated by the optocoupler. These are electrical isolaters, which isolate the current from computer to the ones in the motor. The main purpose of its use is to isolate the back current from the motor from reaching the computer ports. Without isolation, the computer ports would just burn away upon significant back current.

The motor then controlled the distance that would be covered by the object from its original location. A simple screw would convert the rotational movement of motor to linear movement of the object.

When I tested the whole circuit to control the objects' movement using my computer, it worked great.

But, when I took the circuit and tried to run the same code in Lab's PC, it showed a random behavior. I tried to debug it but to no avail. The motor would move the object to a random location when the computer sent the control signals.

I took the circuit back to the room and checked. It ran perfectly.

Even after several debugging sessions, I couldn't know the exact reason of the failure of the circuit.

No comments :

Post a Comment