Tutorial: Open Loop Speed Control of a DC Motor via 8255 Controller using TCP/IP Server-Client Application Programmed in Visual Basic

Table of Contents:

Introduction

In today’s demanding environment of industry, it is required to control and monitor operations remotely, which is beneficial in terms of cutting cost and down time of the operations. Devices, which communicate via TCP/IP Server-Client operations, are one of the best candidates for these operations.

          This Tutorial is intended to cover: Open Loop Speed Control of a DC Motor via 8255 Digital I/O Controller chip using TCP/IP Server-Client Application Programmed in Visual Basic. The 8bit DAC0832 chip is used as the Digital to Analog Converter.

Proposed Solution

In this project open loop control of a DC motor will be established using a power amplifier, a digital to analog converter, 8255 digital interface card, a client PC and a Server PC. The DAC circuit, which is controlled by the server computer via 8255 digital interface, will be used to control the speed of a DC motor by changing the voltage going to the base of the power amplifier. The voltage going into the motor from the power supply is between 0 and +5V. The role of the power amplifier circuit is to provide the current necessary, to operate the motor. The client computer, communicates with the server computer via Ethernet communications and it is the GUI interface to control the speed of the motor. There can be several client computers hooked up to the server, however, for this application there is only one. The winsock component is used in the Visual Basic code to provide the server/client operations.

In Summary, this appliance has four main components:

Procedure

Parts

Table-1 Internet Appliance Electro-Mechanical Parts

Part

Vendor

Part #

Quantity

Price

DAC-0832 8 bit DAC

Jameco

128186

1

$3.95

Diode (1N4003)

Jameco

76970

8

$0.04

LF353 Op-Amp

Jameco

22939

1

$0.39

10Kohm Resistor

Radioshack

271-1335

1

$1.27

8255 Card

Boondog.com

8255 Kit

1

$59.00

20Kohm Resistor

Radioshack

271-0265

2

$49.99

100 ohm resistor

Radioshack

271-1311

1

$4.22

Breadboard

Radio Shack

276-174

1

$13.49

DC Motor

Mabuchi

RE-280RA-20120

 

$1.27

0.01uF Capacitor

Radio Shack

272-1051

1

$13.49

TIP31 Power Transistor

Jameco

33048

1

$0.49

Wrapping Wire

Radio Shack

278-501

1

$2.99

Construction

This internet appliance calls for several electro-mechanical components: An 8255 card to interface the server PC with the dc  motor control circuits. The 8255 card`s purpose is to provide an interface between the server PC and the dc motor control circuits. More information on the 8255 card's construction and operation may be found at www.boondog.com.

 

Figure-1 Schematics of the System

 

 

Figure-2 Illustration of the DC motor

Software

The software to control this internet appliance is broken into two groups: Software on the server PC and software on the client PC.

Server

The purpose of the server is to interface the internet appliance with the internet.

Figure-3 Screen Shot from the Server Application

Client

Figure-4 Screen shot from the Client Application

Turbo C

To demonstrate the functionality of the circuit before investing time into writing the server and client software, a TurboC code has been written.

This code:

You may download this code below:

TurboC Source Code

Theory of Operation

The velocity command (RPM) is passed between from the client to the server using WinSock TCP/IP. The velocity command is then converted into a digital number and output to the DAC via Port A of the 8255 digital interface.

In this experiment,  as the speed of the motor is altered, the following parameters are monitored:

1.     1.     Voltage in to the motor (Vin): This parameter is measured while the motor is not connected to the circuit.

2.     2.     Motor Speed in Hz: This parameter is measured using the IR circuit and the oscilloscope as explained in Section 2.

3.     3.     Motor Speed in RPM: This parameter is evaluated from the Motor Speed measured in Hz.

4.     4.     Back EMF: This parameter is measured from the tachometer while the motor is driving the inertial load.

5.        5.        Motor Current: Motor Current is monitored across the terminals of the motor used as a tachometer using a 100 Ohm resistor wired in series.

Figure-5 Voltage vs. Digital Word Graph

Figure-6 Back EMF vs. Speed Graph

Figure-7 Current vs. Speed Graph

Figure-8 Speed vs. Voltage Graph

Operating Procedure

These steps must be taken in the following order to successfully run the Internet appliance:

·         ·         Start Up Procedure:

·         ·         Shut Down Procedure:

Conclusion

Utilization of remote appliances over the Internet or Local Area Networks has many advantages, which can be listed as:

 

Cagdas YILMAZ is a graduate student in the Department of Mechanical Engineering at Drexel University.