You are on page 1of 4

STAND-ALONE MICROPROCESSOR-BASED OPTICAL DATA ACQUISITION SYSTEM

A.R. A1-Ali, Ph.D.


Assistant Prof., Department of Electrical Engineering
King Fahd University of Petroleum and Minerals
P.O.B. 323, Dhahran, 31261, Saudi Arabia
E-MAIL: FACC109@SAUPMMOO.BINTNET

ing [l-51. A recent US patent 131 has been


granted to the design of an optical analog to
In this paper, the design of stand-alone digital converter using optical and table
optical data acquisition system is presented. look-up [l]. This presents paper integrated
The system hardware consists of an optical the optical and table loop-up approach with
analog inputs, optical digital inputs, analog the microcontroller MC68HCll plus optical
and digital inputs/outputs and Motorla MC68- digital-to-analog converter and standard
HCll microcontroller. The system software digital-to-analog and analog-to-digital con-
consists of several subroutines that enables verters which make complete stand-alone
the user through the input-driven-menu to microprocessor-based optical data acquisition
read, store, analyze, process and display the system.
incoming data. In addition to that, the user
can select direction of the data, the number The system architecture shown in figure
of analog or digital channels to be monitored, 1, is divided into five subsystems: An Optical
sampling rate per channel and the throughput analog and digital inputs, analog and digital
rate. The user has the option of programming inputs/outputs, microcontroller, input/output
the unit itself for special application. The timers and communication ports. The first part
system is programmable, cheap, compact and of the inputs consists of sixteen channels
versatile. Optical Analog-to-Digital Converters (OADCs)
Each channel consists of optical emitter as
tn"itter and detector as receiver. These
sensors are interfaced via analog multiplexers
to the analog inputs of the built-in eight
Optical sensing is one of the leading channels analog-to-digital converter that is
techniques in today's sensing technology. It imbedded in the microcontroller [ 2 ] . The
has been used in signal processing, underwater second part of the inputs consists of two
acoustics, aerospace guidance and color sort- eight-bit Optical Digital-to-Analog-Converters
(ODACS). Each bit designed with emitter and

16 Pairs of Infrared Emitters and Detectors (Analog Sensors)

V15 VI

3 Input 5 Output
.) = - . ) +
Timers Timers VoH VoB VoA

Figure 1. System Hardware Architecture. 0-7803-0582-5/92$3.0001992 IEEE


1625
detector. In addition to that an eight channel
eight-bit standard analog-to-digital convert-
ers is interfaced to the microcontroller
[1,2]. The microcontroller (MC68HCll) consists 1 vcc
of eight channels standard,Analog-to-Digital-
Converters (ADCs), 16Kbyte RAM, 2Kbyte EPROM,
512 byte EEPROM, seven input/output interrupt
driven internal timers, Asynchronouns Communi-
cations Interface Adapter (ACIA) and RS232 to
communicate with a host or terminal (Personal
computer) with six different baud rate [2].
The output stage consists of eight channel
Digital-to-Analog Converters (DACs) and eight-
bit bi-directional input/output ports.

The software algorithm is written in a


way that enables the user, through input
driven-menu, to select, any analog, digital
channel or channels to be monitored and re- Figure 2. Analog infrared Emitter-Detecor Cell
corded. With simple programi -7 ski.lls the
user ia able to write his own subroutines to
processes the input signals and make a desired As mentioned in the introduction there
decisions. The decision can be sent in analog are sixteen optical pairs. These pairs are
or digital form. The system can be used as a multiplexed via sixteen analog switches to the
real-time measurement unit in underwater built-in eight channels analog-to-digital
acoustics, aerospace aviation, speech recogni- converter of the microcontroller MC68HCll. The
tion and color sorting [1,8,9]. It can be used range of the analog input should be between 0
in neural network application where the sen- to 5 Volts. The distance between the emitter
sors will act as input layer, the micro- and the detector is a very important matter in
controller and software as hidden layers and optical sensing. Table 1 shows the optimum
the DAC as an output layer [12]. distance between emitters and detectors [l].
Though this distance can be increased by
The special feature of this system is its pulsing the emitter rather than fixing the
relatively low cost, a stand-alone system that biasing [7].
does not require a host Computer to operate
with once it is programmed, it can operate Table 1. Transmission and reflective
with different optical wavelengths where the range of optical sensors [7]
user replaces the transmitter and receiver
elements only, additionally it is in-house
programmable for many tines as the user wants. hnitter-Detector Transmission Reflective
Pairs Range Range
LED56&L14Ql 012" 03."
1 LED56LL41 I 018" I 04.5" I
1 LED55CLL14Gl I 032" I 08." 1
-
m t i c a l a a l w-to-Diaital-Convert ers : IN6266&L14G3 048" 12"
The system has eight channels optical F5D1&14G3 080" 20"
analog-to-digital converters. The basic build-
ing block of each channel is an optical light 1 F5Dl&L14P2 1 200" I 50" -1
emitter as transmitter and optical light
detector as a receiver (Figure 2). The emitter
is a Light Emitting Diode (LED) and the re- m i c a 1 Diaital gn_Duts/Ot&put and -ertere
ceiver is phototransistor [7]. The operating
wavelengths of both devices can be varied The system has 16-bit optical digital
between 450-1000 Nanmeters. The gain and the switches which can be used separately to read
or write 8-bit transfers. Each bit consists of
offset of each cell can be adjusted with the
emitter and detector, three variable resistor
three variable resistor that are shown in and Schimtt trigger buffer (Figure 3). The
figure 2. RE will adjust the light intensity output has two digital logic level, one is a
of the emitter, RD will adjust the analog high level (2.4-5.0 Volts) and the other is a
voltage level at the output of the phototran- low levei (3.0-0.SV). The functrGi1 G f &IC
sistor. RO will adjust the DC offset that may three variable resistor is the same as their
result from the dark current or from interfer- function in the analog input. The optical
ence from other adjacent optical channel. In digital switches are used as bas'c bcilding
addition to that, RE, RO and RD are used to block of two eight-bit optical digital-to-
adjust the current density of the emitter, the analog converters. The output of these sixteen
analog output level when the operation wave- switches is directed to one or more of the
length is changed by the user. eight digital-to-analog converters that will
be described in the next section.
1626
as well as in single or continues scan mode.
Single channel mode converts one channel only.
1 vcc Multiple-channel mode converts four channels
simultaneously as a group. The single scan
means one converting only and the ADC will not
start conversion unless a software command is
executed. On the other hand the scan mode
means once the conversion is started, it will
convert continuously one channel every 16
micro-sec.

mDUtS/oUtDl& PrWr-1 e T m
The system has on-board eight programma-
ble timers [2]. These timers are based on a
free-running 16-bit counter with a four-stage
programmable prescaler. The timer starts from
Figure 3. Digital lnfared Emitter-Detector Cell a count of $0000 as the MCU is coming out of
reset and then counts up continuously. When a
maximum count is reached (SFFFF), the counter
rolls over to a count of $0000. The eight
S+andard-to-moa Converters timers are divided into three input capture
timers and five output-capture timers. Each
A general purpose, single chip (DAC- input and output timer has its own 16-bit
8800), eight channels eight-bit digital-analog register. These timers can be programmed to
converter is interfaced with one the micro- generate a hardware or a fix software inter-
controller output port [a]. Both unipolar and rupt at a fixed periodic rate for sequential
bipolar output voltage are available. A three- conversion. The user can program each input-
wire serial digital interface loads the con- capture function to detect edge polarity,
tents of the eight internal DAC registers measure a pulse width or a period of incoming
which establish the output voltage level. signal. Such information can help t o start or
Figure 4 shows the basic building block of the stop conversion, to output an analog or digi-
DAC-8800 [ll]. tal single. Also the user can program the
output-capture timers to generate a pulse or
square wave upon receiving a sequence of
optical signals via the OADCs or ODACs. More
information on the timers operation can be
found in reference 2.

P
Software package has been written in
assembly language. It was divided into two
section: User interface input driven-menu and
real-time data acquisition. The interface
subroutines enable the user to select the
number of analog or digital channels to be
v5 monitored, sampling rate per channel, direc-
DAC5
tion of the data, programming the input output
timers and some. The data acquisition subrou-
tines enable the user to read, store, and
process the data. The main function of this
data acquisition system is that it can be
I I programmed in-house for special purposes.
Figur 4. Block diagram of DAC-8800
SYSTEn FINAL FEATURES Ei SPECIFICATIC??S

The system features and specifications can be


- -..
Standard Analw to Diaital Converters summarized as follows:
* 16 channels Optical Analog-to-Digital
The built-in eight channels analog-to- Converters. Resolution 8-bits (2omV/bit)
digital converters in the microcontroller are * 8 channels standard Analog-to-Digital-
used as is [2]. They have been used as a basic Converter. Resolution 8-bits (20mV/bit)
building block in the OADCs. Sampling rate for * 2 Optical-Digital-to-Analog Converters
the built-in ADC is 16 micro-sec per channel. Resolution 8-bits (2OmV/bit)
Using the control register of the ADC, it can * 8 channels standard Digital-to-Analog-
be setup for single or multiple-channel mode Converter.
1627
* 8 TTL digital inputs/ outputs 11. PMI, "Data Book of Analog Integrated
* 8 programmable timers Circuits," Vol. i o , pp 1 1 . 2 5 0 - 1 1 - 2 6 2 , 1 9 9 0 .
16Kbyte RAM on-board memory
* 8Kbyte EPROM on-board memory 12. A1-Ali , Alakdhar & Al-Baiyat, "Neural
* 512 byts EEPROM on-board memory Network Implementation Using Microprocessor-
* Six programmable baud rate Based System," Second International Conf. on
(Max: 9 6 0 0 , Min: 3 0 0 ) Automation. Robotics and C w uter Vision.
* Sampling rate: 1 6 micro Sec. Singapore, 1 9 9 2 .
* Software programmable

An optical stand-alone data acquisition


system has been designed using an existing
microcontroller [ 2 ] . The system was used in
color sorting and proved to be accurate,
reliable, cheap and compact. One disadvantage
of the system the slow sampling rate and low
voltage resolution. A new unit design is
underway using MC68030 to overcome the sam-
pling rate and resolution.

The author wishes to acknowledge the


support of King Fahd University of Petroleum
and Minerals.

1 . A. D. McAulay, Wptical Analog to Digital


Converter Using Optical Logic and Table Loop-
UP I ODtical enoiDeering, Vol. No. 2 , pp 114-
1 2 9 , 29 Feb., 1 9 9 0 ,

2 . Motorola, WC68HCll reference manual**,


1988.

3. A. D. Mcaulay, "Optical Analog to Digital


convertert1,US Patent No. 4 . 8 5 1 , 8 4 4 , 1 9 8 9 .

4 . A. D. McAulay, aaOpticalNeural Networks for


Engineering Design,11 Nat'l aerosDace and
-cs conf,, Vol. 4 , pp 1302-1306, 1 9 8 8 .

5 . OMEGA TECH Company, "The Data Acquisition


Systems Handbook , 1 9 9 0 .

6 . B. K. Bose. llTechnologyTrends in Microcom-


puter Control of Electrical Machines,I1 LggE
3 Vol. ,35, 160-
1 7 7 , Feb. 1 9 8 8 .

7. Harris semiconductors, I1Optical electronics


data bookt1,1 9 9 1 .

8. S. Barua, llHigh-Speed, Multiplier for


Digital Signal processing,11 Enaineer -
U,Val 30 No. 1 2 , pp 1997-2002, Dec. 1 9 9 1 .
9. B. Javidi, nIndustrial Application of
optical signal Processing I , 1 a QDtical Xngk
neering, Vol. 27 No. 4, pp 2 5 7 . April 1 9 8 8 .

1 0 . P. R. Norton, "Infrared Image Sensors ,


ODtical w e e r i n g , Vol. 30 No. 1 1 , pp 1649-
1 6 6 3 , Nov. 1 9 9 1 .

1628

You might also like