Contents

 

Introduction

 

Project goal

 

The Project goal is implement a working PC interfaced peripheral (DC Motor) with VB GUI. The GUI should be enhanced with at least one ActiveX component. Additionally the DC Motor should be controlled over the Internet through a TCP/IP (Transmission Control Protocol/Internet Protocol) client/server program.

 

Motivation

 

Applications for the PC are numerous but could be custom equipment control, monitoring system, calibration etc.  Control over Internet is so big improvement of existing control systems. The Web-enabled features will be soon request for lot of application.

 

The web gives the ability to view and control the process on a computer, monitoring real-time information via the Internet. No special acquisition software needs to be installed on the computer, only a web browser and a TCP/IP client/server program (see Fig. 3).

 

In the Project is implement Internet enabled PCs interfaced DC Motor with Visual Basic GUI (see Code Description). Visual Basic is used in this Project but could be use Visual C, C or some other software. 

 

DC Motors (direct-current) are one of the most widely used prime movers in industry today. A major reason for the use of DC Motors in electromechanical control systems is the ease with which speed can be controlled. The polarity of the applied voltage determines the direction of rotation.

 

 

Circuit Operation

 

In the Project (see DAC schematic) are used DC motor, 8255A IC, DAC0832 IC, 74LS138 IC, LF353N IC and TIP31A NPN.  Complete part list you could see in Table 1 “ISA BUS DAC PARTS”.

PC ISA BUS (Industry Standard Architecture) prototyping card is easy to construct circuit card and the plugs into an available ISA slot in your PC. More information and explanation of terms you could get from Dictionary of PC Hardware and Data Communications Terms,  PC KITS tutorial page and Boondog Automation.

 

The 8255 PPI IBM PC Interface Card  (Programmable Peripheral Interface) plugs into any available 8 or 16-bit slot (AT-slot) on PC’s motherboard. Such a card allows you to do both digital input and output to your PC (see Fig. 1).

 

The 8255 PC Interface Card plugs into any available 8 or 16-bit slot (AT-slot) on PC’s motherboard. By physically using jumpers on the card, we can assign an address to the card. In software, we can tell the CPU what this address is.

We will use 260H (608 Decimal) for the address of the card. Of course, we can change this, by using the Table 2 as a guide, and changing the jumper configuration on the board, as well as in software program.

 

The circuit’s 8-position double row header and shorting block are used for address decoding. The shorting block row position is used to assign your card with a unique address. This address serves to distinguish your card from other ISA cards that may already be installed on your motherboard. The shorting block allows you to choose one of a possible eight addresses, as shown on Table 2.

Placing the shorting block on row 4, assigns your card an address of 260H (or 608 Decimal).

The 74138 is 3-to-8 pin decoder. The ISA pins A24, A25 ad A26 serve as its three inputs and depending their values, will yield one of 8 possible outputs. This output will be used to enable the DAC0832 to transmit a voltage.

 

Example:

The card address 608D is 1001100000 binary, which results in A24, A25 and A26 to be 0, 1 and 1 respectively. These 3 values feed into the 74138’s A, B and C inputs thus selecting the 74138’s Y3 output. For Y3 to go active low, the 74138’s / G2A / G2B and G1 must 0, 0 and 1 respectively.   608D already sets / G2B and G1 to 0 and 1 respectively. The 74138’s G1 pin is connected to ISA bus pin a11 (AEN). AEN=0 whenever the expansion bus is called. This happens whenever an “outportb (608, value)” or “inportb (608)” is invoked in Turbo C or VB.

 

 

          Table 2           “8 Possible Addresses”

 

Row Position

Hex. Value

Decimal Value

1

200

512

2

220

544

3

240

576

4

260

608

5

280

640

6

2A0

672

7

2C0

704

8

2E0

736

 

 

 

PC Digital to Analog Card (DAC)

 

DAC0832 IC / LF353N IC

 

Using PC to drive voltage based motor speed control and PC based wave generators demand a digital to analog converter (DAC). The 8255A IC can be programmed for digital output by delivering+5 V and 0 V on any of the TEB (Terminal Expansion Board’s 24 pins (Port a, B and C). A digital to analog converter (DAC) provides the ability to deliver a range of voltages.

A DAC connected to an 8-bit digital port (e.g. Port A) outputting voltages ranging from +-5V is illustrated (see Fig. 2).

 

The DAC0832 is an 8-bit DAC. It receives digital data (on lines D0 to D7) and converts to an analog signal. The converted analog signal is a current (IOUT1 on pin 11). The actual value of the current depends on the D0 to D7 values and the reference voltage (VREF pin 8). Recall that in binary, 8 bits can range in value from 00000000 to 11111111 or 0 to 255 decimal. Thus an 8-bit DAC can have 256 different currents. Typically VREF is +5 V and an 8-bit DAC delivers voltages ranging from 0 to +5 V in 19.5 mV increments (5V/256).

 

The schematic shows the 8-pin header that should be wired to D0 to D7 and an 8-wire cable will tether this header to the Port A header on the Terminal Expansion Board (TEB).

 

The LF353 is an 8-pin dual op-amp and its pin out diagram is given in the schematic. The LF353 has two op-amps, it is called dual and hence the two suffixes, A and B (V+ and V-, pins 8 and 4 respectively). V+ and V- are connected to a +12 V and –12 V power supplies respectively.

 

The LF353’s two op-amps are wired up, with 20 kohm resistors, to form a current-to-voltage amplifier. This is needed because the DAC0832 delivers analog current (IOUT1) whereas we want analog voltages.

The resulting “digitally converted to analog” voltage appears on LF353 pin 7.

 

 

Power amplifier

 

Motors require voltage and current. The 8255, DAC0832 and LF353 only deliver approximately 20 mA. A power op-amp must be added to digitally control motor speed (power amplifiers are needed to deliver the necessary currents). A simple power op-amp is shown in the DAC schematic.

 

 

Operation

 

Power off and open up PC.

Connect one end of the 34-pin cable to 8255 PC Card and install the Card into the PC ISA slot (Fig. 1). Plug the 34-pin cable’s other end into the TEB (Terminal Expansion Board). 

Connect one end of the 8-pin cable to 8-pin row header of the DAC and connect the other end to the TEB’s Port A.

Connect one end of the 4-pin cable to the TEB’s 4-pin header (+5V, GND, +12V, -12V) and connect the other end to DAC’s 4-pin header.  

 

Turn off the external power supply. Connect the external power supply +5V line to the TIP31 collector pin C.

 

Connect the external power supply GND line to TEB’s GND line.

 

Connect DC Motor to the TIP31 emitter pin E and to the GND as shown in DAC schematic and Fig. 2.

 

Run executable file (see Code Description), enter 608 for the base address and choose Port A when prompted (C executable file).