You are on page 1of 6

Graphic Interface for Analogic Controls on the

USB Port of the PC Compatible Computers


Elena Popa1,*,Viorel Popa2
1Transilvania University of Brașov, IF Department, Brașov, Romania
2Transilvania University of Brașov, PLDPL Department, Brașov, Romania

Abstract. This paper introduces the software made in the Delphi language
for the control and adjustment of some technological parameters by means
of a computer and its USB port. The paper also presents the control
interfaces of the digital-to-analogic and analogic-to-digital converters and
their applications. The digital-to-analogic converter was used for the
analogic command of some electric, pneumatic or hydraulic motors. The
analogic-to-digital converter was used to take over sensor signals
(temperature, humidity, etc.). As modern computers are no longer provided
with parallel ports, a K8055 USB Experiment Interface Board
manufactured by VELLEMAN was used. The board has a PIC16C745-IP
microcontroller, which enables communication via specific software.

1 Introduction
Computer controlled automation is increasingly used in the present technological processes
in the wood industry. In order that the students understand the functioning of an industrial
modular computer, as well as of the data acquisition boards (with analogic input/ output
ports), several electronic modules for analogic input and output signals were conceived and
realized in the laboratory of 'Automation of the technological processes in wood industry'.
According to their version, the electronic modules can be used to take over and/ or send
outside signals with a voltage variation from 0 to 5V and/or 0 to 10V. Similarly, they can
control 8 electromagnetic relays or 8 thyristors by means of a computer, through an
electronic interface connected to a USB port. The Velleman K8055 interface is provided
with a PIC16C745-IP microcontroller, which is programmed to ensure communication with
a PC compatible computer in the following way:
- 5 Digital inputs (0 = ground, 1 = open). On board test buttons provided,
- 2 Analog inputs with attenuation and amplification option. Internal test +5V provided,
- 8 Digital open collector output switches). On board LED indication,
- 2 Analog outputs:
• 0 to 5V, output resistance 1K5,
• PWM 0 to 100% open collector outputs max 100mA/40V,
• On board LED indication.
- General conversion time: 20mS per control,

*
Corresponding author: elenapopa@unitbv.ro
- Power supply through USB approx.70mA,
- Diagnostic software and communication DLL included.
The connection of the electronic control interface to the computer is made through a
cable with USB connectors at both ends.
The electronic control modules are not the object of this article.
The present paper refers to the graphic interface for the USB port, made in Delphi [2]
and meant to take over analogic and numerical signals by means of a PC compatible
computer [1,3].

2 The graphic interface for analogic inputs-outputs


The graphic interface (figure 1) has a main window where 5 labelled buttons and a BMP
figure are placed. A number of 4 buttons is used to get to secondary windows, and the last
one (Close) determines the return to Windows. The secondary windows are used to
exemplify either the sensors, transducers, or the execution elements that may be used either
for different analogic/ numerical controls or for taking over analogic signals from outside.
The BMP figure, of interface presentation, includes analogic sensors and transducers.

Fig. 1. The main window of the graphic interface.


In fact, the great majority of the secondary windows are display and switch signals with
virtual starting and closing buttons that may be operated at will. The software determines
the functioning of the numerical-analogic converter, of the multiplexer, as well as of the
analogic-numerical converters.
Rectangular virtual luminescent diodes are placed on panels and they are turned on or
off according to instructions.
In order to use the secondary graphic interfaces for analogic signals with any PC
compatible computer, first check if the control electronic interface is connected to a USB
port, then click the CONNECT virtual button. If the connection is established correctly, the
numerical or analogic controls, for which the graphic interface was made, can later be
executed.
Figure 2 presents the secondary window with its possibilities of analogic control. This
window leads to the effective control window (figure 3). At the output of the numerical-
analogic converter, a variable voltage between 0 to 5V and/or 0 to 10V is obtained and can
be used to operate some electric, pneumatic, or hydraulic servomotors. The output voltage
of the converter is obtained either by inserting values from 0 to 255 into the port USB, or
moving the arm of a virtual linear potentiometer. The output signals of the port are
signalled through 8 electroluminescent diodes corresponding to the bits B0...B7. The proper
voltage from the output of the numerical-analogic converter is also shown.
Fig. 2. The display window for the use of the numerical-analogic converter.

Fig. 3. The control window of the numerical-analogic convertor for values between 0 and 5V or 0 and
10V.
Another window, presented in figure 4, shows different analogic or digital output
sensors that are used in wood industry to measure the relative humidity and motion speed of
air, temperature, wood humidity, rotations, luminous flux, etc. The analogic signals of
variable voltage in the technological process are applied to the input of the analogic-
numerical converter connected to the computer. This window can lead, by clicking some
labelled virtual buttons, to demonstrative windows, as well as to those which take over the
voltage signals from outside. Clicking the Close button enables the return to the main
window of the programme.
Figure 5 presents the control window of the analogic-numerical converter with a
consecutive approximation register. The interval between readings can be modified, from
tenths of second to minutes or even hours. Because we did not use an electronic circuit
specialized for the consecutive approximation register, the respective circuit was emulated
via the computer.
Through this window one can determine the voltage signals obtained from different
sensors or transducers, and display them on the computer screen.
Fig. 4. Display window for devices with analogic sensors used in wood industry.

Fig. 5. The window of the analogic-numerical converter with register of consecutive approximations.
The state of the controlled bits is optically signalled, the decimal value being also
inscribed on the panel.
Figure 6 presents the control window for the analogic-numerical converter with tracking
reversible counter.
In the case of taking over some analogic signals from several sensors or transducers, the
presence of a multiplexer is necessary in the input circuit of the analogic-digital converter
connected to the computer. A probatory example is the installation of a computer controlled
timber drying process. For its installation (figure 7), an important number of sensors and
transducers is used to measure the temperature, balance humidity, and wood humidity.
The window presented in figure 8 allows the multiplexer to take over the alive signals
from a number of 8 sensors connected to the analogic-numerical converter, by measuring
some process parameters.
The reading range of the signal values in the process can be altered within large limits.
The input channel, read at a certain moment, is indicated through a small
electroluminescent diode, the values being shown on the virtual numerical device
corresponding to the channel. The multiplexer is controlled through 4 bits (noted as A, B,
C, and D) of a port with output configuration. We did not use an electronic circuit
specialized for the consecutive approximation register in this version either, because the
circuit was emulated via computer.
Fig. 6. The window of the analogic-numerical converter with reversible counter.

Fig. 7. The display window of the multiplexer use necessity.

Fig. 8. The command window of the multiplexer.


An application which automatically measures and regulates the temperature with two
limits is presented in figure 9. To a computer is connected an analogic-numerical convertor
with a consecutive approximation register, to whose input is applied the alive signal
obtained from the interfacing circuit of a thermally sensitive resistance element.
The temperature is read and displayed at programmable periods. The time of reading is
optically signalled by a virtual electroluminescent diode. The minimum and maximum
temperature is adjusted at will (Tmax.> T min.).
Heating is fed upon clicking the control button, by means of a relay connected to the
output USB port. When the programmed maximum temperature is reached, heating is
stopped. As a result, temperature decreases and when the programmed minimum value is
reached, heating is again started. Whether heating works or not is optically signalled
through two virtual electroluminescent diodes of different colour.

Fig. 9. The window for regulating the temperature with two limits.

3 Conclusion
The graphic interface for analogic input-output was conceived for use in the process of
teaching students with the aid of computers.
The graphic interface for analogic input-output was designed particularly for
applications on the USB port. Its use implies the existence of the electronic modules which
take over the numerical signals from outside and control the electric, pneumatic, or
hydraulic execution elements.
A number of 16 sensors for different technological process parameters can be connected
through the multiplexer.
The analogic and/ or numerical controls (as well as the ones that connect or disconnect
the electronic force modules) can also be obtained after the modification of an analogic
parameter (temperature, air or wood humidity).
The connection of the electronic modules is made through the electronic interface
provided with a microcontroller, which ensures the bidirectional communication (for input
and output signals) on the USB port of modern computers, which do not have LPT parallel
ports.

References
1. V. Popa, Automatizarea proceselor tehnologice în industria lemnului. Elemente de
automatizare și organe de reglare (Transilvania University of Brașov 2001)
2. S. Kovács, Delphi 3.0. Ghid de utilizare (Editura Albastră, Cluj-Napoca, 2000)
3. V. Popa, Automatizări în industria lemnului (Transilvania University of Brașov, 2012)

You might also like