Interfacing PMDC Motor to Data Port of Personal Computer

Procedures and techniques of hardware interfacing to personal computer system through parallel data port to control permanent magnet DC (PMDC) motor and create LabVIEW integrated-development-environments (IDEs) based Virtual Instrument (VI) software are discussed. To test the designed VI software diagram, authors constructed interface hardware without taking support of any commercially available DAQboards. Hardware resource utilization and performance optimization by creatingVI are discussed. Testing the design (Hardware and VI) by varying the set point speed of the motor is concluded. It is observed that the motor speed gradually approaches and locks to the desired or set speed.


Introduction
Computer systems are part of modern control engineering.They can be classified into many types; in general they are classified as (1) fully dedicated system, (2) partially dedicated system, (3) nondedicated system.
The concept is to use the nondedicated personal computer (PC) system.PC's use is not only limited to surfing, learning, teaching, documenting, entertainment, social gathering or communication, and so forth; beyond that, it can also be used for many other known-unknown or imagined-unimagined applications, such as interfacing and controlling the physical world parameters, without investing for expensive devices and dedicated interfacing hardware like data acquisition cards (DAQ) or signal conditioning chassis/extension boards, and so forth.Spending more money, buying the taskoriented, dedicated, costly equipment, and getting the work done are laborious.Smart move would be to get the work done by simply existing, used-unused resources with a little or no programming skills and modifications.Here, this is purely a real-time hardware implementation demonstration.
The PC is used as a controller in the complete system in fact forming the open-loop control system [1][2][3].
1.1.Earlier Techniques.Different researchers [4][5][6][7] designed, fabricated/simulated, and studied DC motor speed controllers with different techniques and algorithms.They proposed many methods, by using PC/microcontroller with decoding circuit, and so forth.In general, if any body wants to measure and/or control the hardware with the PC and any programming language or IDE such as LabVIEW, it is essential to have DAQ Board/SCXI/PXI/PCI boards to access the data from outside world or from the PC to outside world [8].Some of the earlier techniques are shown in   Schematic of interfacing stepper motor to PC is shown in Figure 1.The motor is interfaced in the open-loop control system configuration.The motor rotates in the forward direction, that is, in clockwise (CW) when +5 V is applied from the system to the motor and the motor starts rotating in backward direction, that is, counterclockwise (CCW) when zero volt is applied from the system [9].In order to perform this task a simple I/O VI is developed using LabVIEW Signal Conditioning Extension Instrumentation (SCXI), which is a very expensive and nonefficient approach.

Motivation for the Work.
Motor control can be done by many ways.The conventional way of controlling DC motor is quite expensive, complex and needs more hardware and special expertise.
Here, we are more concerned about "how to interface motor to the PC" without any DAQ board.
PC parallel port has data port, control port, and status port.The data port of the parallel port is used for simple I/O applications.It is an easy and cost-effective approach when compared to multiple numbers of I/O hardware panels.Data byte is buffered, the buffered data is converted into analog voltage and current through DAC, I/V converter, VF, and finally, the CA is used to drive the motor forming simple open-loop control system.

Working of the System.
When a command from VI in PC is given, the control signal will flow into 4 bits of DAC-1408 through 4-bit parallel ports (D0-D3, selection of D0-D7 will provide different voltage magnitudes) of data byte and buffer.The buffered output signals are visualized via light-emitting diodes (LEDs).The DAC will convert the 4-bit digital data into equivalent analog signal and the converted analog signal will be in the form of current.But the motor needs both voltage and the current.The current is converted into voltage by using current-to-voltage converter; the output of I/V converter is not enough to drive the motor, so it is fed to voltage follower.The output of voltage follower is given to Darlington current amplifier, the Darlington current amplifier drives the DC motor to rotate.The control data outflow from PC-VI; to PMDC-Motor, is maintained till the desired voltage magnitude is achieved and same voltage is maintained till next command for desired speed.This forms  The DC motor unit is interfaced to the computer through the D25-pin parallel port connector cord on interface board.To drive interface circuits the analog voltages are applied through the power supply constructed.

Experimental Implementation
Simple ON-OFF control technique is implemented.ON/OFF voltage push button switches in VI are used to regulate the motor speed.If, more speed is required then, more rated voltage LEDs are switched ON, if less speed is required then, rated voltage LEDs are switched OFF respectively.The corresponding rated voltage is added to the existing voltage across motor or the voltage is reduced from the motor changing in the speed of the PMDC motor.

Virtual Instrumentation Software Details
The software is used to apply and change the voltage to the DC motor with respect to the real-time needs of the user and rotate the DC motor for required speed.In turn this is done by the VI.It imitates the appearance and operation of any other designed physical instrument.VI is defined as a process of combining hardware and software  with industry-standard computer technology to create a userdefined instrumentation solution, because their appearance and operation imitate physical instruments, such as switch, LED, oscilloscope, and multimeter, and so forth.

LabVIEW
LabVIEW GUI uses terminology, icons, and ideas familiar to technicians, scientists, and engineers.They rely on GUI rather than Character User Interface (CUI) language to describe programming actions.LabVIEW programs are called virtual instruments (VI).Each VI consists of two main parts:  will be the same for any type of control function.Figure 6 shows the front panel diagram which contains ON/OFF switch, motor-voltage-level-controls menu, time delay for data output, magnitude (LED) indicators, and so forth.

Block Diagram (Source Code)
Designing.The block diagram or the source code involves for-loop, while-loop, sequence-nested structures, Boolean control bit which represents binary digit, array builder, binary to 32-bit digit converter and other icons, which are self-explanatory.The function diagrams or the source code diagrams are in graphics when case selector switch is ON and OFF which are shown in Figures 7 and 8, respectively.The mathematical expression for PMDC motor speed controller used is given as following [9]: where A is "digit indication of LED." It is the magnitude of applied voltage to the motor.If LED is ON, "rated-high" voltage magnitude is applied to the motor.If LED is OFF, "low" voltage magnitude is applied to the motor.A1 is the LSB  and A4 is MSB.The rated proportional voltage is applied as below [9]: real-time speed control equation ) . ( When Digit-1 to Digit-4 any digits are enabled the rated voltage magnitude levels (0.6 V, 0.9 V, 1.5 V, and 2.7 V) from the front panel menu, corresponding TRUE/FALSE bit is enabled in the block diagram.Since the TRUE or FALSE bit is single bit, it is connected to the Boolean array builder which is used to build 8-bit array.Then the 8-bit array is converted into 32-bit number and the 32-bit number is converted into 32-bit integer.The 32-bit integer is applied to the out-portbyte through which, finally, the command word exits out of the PCs parallel port to the motor.State of the motor depends upon the control word.The combination of the digits gives different equivalent voltages.Table 1 gives the magnitudes of the applied voltages to the motor.The result is change in speed proportional to the applied voltage.In turn it is command word generated from the front panel user interface.The speed data (voltage V/S speed) shown in Table 1 can be stored in a file for further analysis or use.The VI provides on-line variation of voltages or set point, which facilitates the system to study for step, set-point, and random voltage variations.The behavior of motor on adding/subtracting different magnitudes can be monitored.
A complete VI developed using the icons, in block diagram for proper functioning of motor control is shown in Figure 6.

Experimental Observations
The experimental studies are carried out to verify the feasibility of the VI for different conditions.The VI is subjected to keep the motor continuously halted to take the path of complete FALSE cases.The performance indices of the controller (in terms of all zeros) are seen.The VI is subjected to keep the motor continuously with maximum speed rotating to take the path of complete TRUE cases.The performance indices of the controller (in terms of all ones) are seen.
The experiments are carried out to test the performance of the VI and circuit constructed.Selection of DAC data line selection makes lots of differences across the output.2 gives the comparison for the conventional DC motor control system and our interfaced DC motor circuit.From the table it is also observed that when output sampling time is increased, the operating efficiency of the system changes as per the PC's processing speed.That is, if we consider that one conventional DAQ board setup and its housing arrangement are taking the processing time of 250 mSec, and our interfaced circuit is able to change the state within 25 mSecs, so the difference is 1 : 10 and the percent of error occurring chances is more.Naturally our system is good.If such systems are exposed to operate for more time, then the percentage of error operation would be more.And end product would be more erroneous.

Conclusions
The designed and developed system is unique and the first in its own kind, that is, without any DAQ or interfaces like PCI/SCXI/PXI/USB based boards.In order to control any physical parameter, investments in vendor software and hardware are a must.From small-to large-scale applications, data from external world to the PC can be transmitted.LabVIEW-based Parallel Port Data Acquisition System for laboratory/small experiments is non-expensive.The dedicated system can be designed and constructed using only the software.This would be a cost-effective solution and a great exercise for the new bees.

Future Scope
Definitely there is a scope for further development of this system.In future, application might require fewer changes in code or even someone may consider developing a totally new closed-loop data acquisition package using PID, fuzzy logic neural network, and AI.
Figures 1 and 2 which use below-listed devices [1, 2]: (i) PC with LabVIEW IDE, (ii) PCI plugged in DAQ board, (iii) SCXI-housing chassis, (iv) analog I/O modules and mount terminal boxes, (v) driver circuit, (vi) decoding logic circuit, and so forth (for simple stepper motor angular position control system).

Figure 1 :
Figure 1: Complete schematic of PC-based stepper motor control through LabVIEW software.

Figure 2 :
Figure 2: Components of an SCXI system; DAQ board assembly is used in order to access the analog signal or digital data from external world to PC and vice versa.

2. 1 .
Block Diagram of the System.Figure 3 shows the block diagram of the system setup.It consists of PC with LabVIEW software, buffer, digital-to-analog converter (DAC), currentto-voltage (I/V) converter, voltage follower (VF), the current amplifier (CA), and PC's parallel port (PP).

Figure 3 :
Figure 3: Block diagram of proposed DC motor interfaced to PC with LabVIEW IDE.

Figure 4 :
Figure 4: Circuit schematic of the system.

ConferenceFigure 5 :
Figure 5: (a) Photograph of the experimental setup, (b) photograph of the experimental setup.

Figure 6 :
Figure 6: Front panel diagram of user interface VI diagram.

5 . 1 .
Design of Voltage Controller Front Panel.The front panel VI reads the voltage (to be applied to the motor via the frontend hardware user interface) entered by the user and sets the voltage sequences in data nibble through PCs parallel port and controls the motor voltage as per the front-panel VI command menu.The control function forms the programming part as per the user requirement and the hardware

Figure 7 :
Figure 7: Block diagram or source code of VI diagram for ON state and applying different control voltages to the out port.
Since the O/P is different voltage level control, different PMDC motors may be used and their behavior can be studied, for irregular voltage change condition.Potential divider technique may be employed for direct speed variation implementation in VI instead of different magnitude voltage control.