The Computer Interface

from the HCC-PC-gg-PE

 

It was always my intention to control most of the Meccano models I build via the computer. It would be easy to control a motor connected directly to the parallel port of the computer, but the power output of this port is very low, and the parallel port is very sensitive to electrical irregularities. Thus it is necessary to place an amplifier between the computer and the model, and that's where the interface comes in.

The PC PARALLEL PORT INTERFACE acts as a bridge connecting a PC (XT, AT, or PS/2-compatible) to other printed circuit boards (PCB's), and allowing these PCB's to be driven by the computer. The total system consists of various modules which can be used to control models or other devices. There exist many different parallel port interfaces, but this one, as are the other PCB's developed by us, is designed specifically for use with Meccano models. In particular, the screw holes align with the holes in Meccano parts.

 

03

This is a picture of the PCB of the interface. The functions of this PCB are to adapt the centronic connector to the connectors which are used for the expansion modules, and also to provide the 5Vdc power necessary to drive the IC's. This power may be minimal 8 and maximal 16Vdc. The PC sends its control signals out through the centronic connector, where they are forwarded to the control module through one or two 10-wire ribbon cables with 2X5 print header connectors on each end. You can see that the centronic connector is the connector which is normally on the cable used to connect a printer with a computer, so if you own a printer you don't need to buy such a cable. But do be careful if you disconnect the cable in order to connect the interface

  " SHUT  OFF  THE  COMPUTER  !!!"

Better is to get a second cable and a data switch. This way, all the cables are connected and there is no danger of damaging the computer. If you still need to disconnect a cable, you can set the data switch to another input and safely disconnect the cable.

 

01

This picture shows the motor PCB. This card is the real work horse; its function is to control up to four lamps or four relays or two direct current motors or one two-pole stepper motor, and to read the four inputs. The power supply must be able to provide between 8Vdc and 40Vdc at 2Amp per output. This much power makes a heat sink on the IC a necessity. If you are not using a stepper motor it is possible to combine lamps, relays, and direct current motors. The state of the outputs is displayed by two red and two green LED's, which indicate changes in the direction of rotation of the motors.

 

02

In this picture you can see that both PCB's are mounted on a mounting plate #52a. The ribbon cables are folded on themselves to take up the slack which allows mounting the PCB's further apart if convenient. To test these PCB's I have built a small model consisting chiefly of two Flat Plates #72 which move up and down alternately. The whole model is mounted on a Flanged Plate #236 on which I have built a framework from four Angle Girders #8b. On the Flat Plates #72 I have fastened four Pulleys #23b to provide simple bearings for the #72's, which I call "doors".

 

01

02

03

 

In the three pictures above you can see the small model and also the two motors and the four end switches which I have used in this model. The end switches give the computer a signal that the corresponding "door" has arrived at the end of its travel, and that the motor must stop and the other motor must start.

The picture below is from the computer screen where the state of the motors and the end switches can be seen. At this moment, the program is in manual mode, and the motors are off, the end switches S2 and S3 are on, and the end switches S1 and S4 are off.

0

 

The programming language I have used is QBasic, but any language which allows sending bits to the parallel port can also be used. The important thing is the formula and the values used for the parallel port, but the formula as well as a test program are shipped with the PCB's.

 

Back to homepage 

Copyright 1999-2011 by R.Beijersbergen van Henegouwen.