Sie sind auf Seite 1von 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/3050916

A Low-Cost PC-Based Virtual Oscilloscope

Article  in  IEEE Transactions on Education · June 2004


DOI: 10.1109/TE.2004.825527 · Source: IEEE Xplore

CITATIONS READS

29 1,747

5 authors, including:

Saikat Giri Prithwiraj Purkait


St. Thomas College of Engineering & Technology, Kolkata, India
1 PUBLICATION   29 CITATIONS   
71 PUBLICATIONS   1,201 CITATIONS   
SEE PROFILE
SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Induction motor fault diagnosis View project

Transformer insulation condition monitoring using dielectric response techniques View project

All content following this page was uploaded by Prithwiraj Purkait on 27 November 2014.

The user has requested enhancement of the downloaded file.


IEEE TRANSACTIONS ON EDUCATION, VOL. 47, NO. 2, MAY 2004 295

A Low-Cost PC-Based Virtual Oscilloscope


Chandan Bhunia, Saikat Giri, Samrat Kar, Sudarshan Haldar, and Prithwiraj Purkait, Member, IEEE

Abstract—The integration of personal computers (PCs) with the develop a low-cost, affordable, plug-in kind of data acquisition
present-day measurement and instrumentation world has opened card that can be used with any common-purpose PC with the as-
up the door for “virtual instrumentation.” This paper describes the sociated software and can make the expensive DSO redundant
development of a low-cost, PC-based, virtual digital oscilloscope. A
data acquisition device using the computer parallel port has been for elementary signal analysis purposes.
fabricated with full analog interface and 8-b analog-to-digital con- The main contribution of this paper is to present the integrated
verter with associated control-logic and timing circuitries. A soft- system with PC-based data acquisition hardware, software, and
ware package aimed at managing the acquisition process and dis- display modules, and highlight how it is being used for under-
playing the acquired signal has also been developed. This device graduate laboratory demonstration and instructional purposes.
has been conceived as a simple plug-in board to be incorporated
to any IBM PC parallel port—thus, in many cases, eliminating
the requirements of multiple, expensive, digital oscilloscopes. The
project, initially designed as an undergraduate thesis, is currently II. PC-BASED VIRTUAL INSTRUMENTATION
being used for laboratory instructional purposes. The features of
this device make it suitable for implementing as an educational re- The instrumentation industry is moving steadily and rapidly
source for undergraduate students from Electrical, Electronics, In- in the direction of virtual instrumentation. Virtual instruments
strumentation, and Computer Science faculties. are centered on a PC, used with as little specialized hardware as
Index Terms—Analog-to-digital (A/D) conversion, data acquisi- possible to link it to the devices it must measure/control. This
tion, digital oscilloscope, parallel port, virtual instrumentation. hardware typically is plug-in boards for digitizing a signal di-
rectly or for controlling stand-alone instruments. Virtual instru-
I. INTRODUCTION mentation is known for its flexibility, modularity, and low cost.
Celma et al. [3] presented the idea behind development of a

I N today’s educational institutes, especially in electrical en-


gineering and allied streams, digital oscilloscopes have be-
come popular for signal acquisition and analysis. Because of
PC-based spectrum analyzer suitable for use in undergraduate
laboratories. They pointed out that the requirements of such a
data acquisition system are not very high in view of the lim-
their inherently high-input impedance, digital oscilloscopes can
ited range of signals encountered in undergraduate laboratories.
be used for analysis of both analog and digital circuits with high
Chickamenahalli et al. [4] presented an undergraduate research
accuracy. Another attractive feature of the digital oscilloscopes
project that involved the interface of a HP digital oscilloscope to
over its analog counterpart, the cathode-ray oscilloscopes, is the
an IBM PC using National Instruments’ General Purpose Inter-
capability of the digital oscilloscopes for effective storage of the
face Board. Smith et al. [5], [6] in their papers described the set-
data for subsequent analysis [1]. In recent times, digital storage
ting up of a simple DSO integrated with a printer/plotter system
oscilloscopes (DSOs) have been implemented with the added
for quick reproduction of the signal. However, they were skep-
feature of PC connectivity, such that the signal can be stored in
tical about the bench-space requirements for such a scheme in-
the PC for later analysis [2]. However, with increasing features,
volving the DSO, printer/plotter, and the PC. This discovery led
these oscilloscopes have become more expensive and less ac-
to the concept of integrated DSO-PC-printer system described
cessible for undergraduate-level novice students. The advanced
in the present paper, one sufficient and affordable for most un-
features of these commercially available oscilloscopes often are
dergraduate-level laboratories.
underutilized in the low-power and low-frequency requirements
Several data acquisition systems through the parallel port
of common undergraduate laboratories. Moreover, the use of
have been built in the past [7]–[9]—with various combinations
PCs in almost every step of any laboratory course, from anal-
of hardware and softwares. However, either those works have
ysis to data representation to report preparation, motivated the
not been reported comprehensively or there have been too many
development of a device that will combine to a great extent the
variations in the development approaches which confuse the
features of the digital oscilloscope and the PC. The idea was to
readers. The aim of this paper is to report a complete working
system with less complexity, yet reasonable usefulness in
Manuscript received October 8, 2002; revised May 11, 2003. undergraduate-level laboratories.
C. Bhunia is with Bengal Engineering College, Shibpur, India (e-mail: cb-
hunia@yahoo.com). In recent times, the idea of a Web-based virtual laboratory
S. Giri is with Computer Maintenance Company (CMC), Ltd., Kolkata, India [10], [11] has led to the development of a variety of virtual
(e-mail: saikatgiri@yahoo.com). instruments, including virtual oscilloscopes [12], [13]. How-
S. Kar is with Bhaba Atomic Research Centre (BARC), Mumbai, India
(e-mail: esamrat@yahoo.com). ever, many of the virtual oscilloscopes do not come with asso-
S. Haldar is with BHaldia Petrochemicals, Ltd. (HPL), Haldia, India (e-mail: ciated data acquisition hardware, are too versatile for common
sudarshan.halder@hpl.co.in). undergraduate use, or are expensive. These are literally “vir-
P. Purkait is with the Department of Electrical Engineering, Haldia Institute
of Technology, Haldia, India (e-mail: praj@iee.org). tual” in nature—demonstrating only the front-panel function-
Digital Object Identifier 10.1109/TE.2004.825527 alities of the oscilloscope—without real-time data acquisition
0018-9359/04$20.00 © 2004 IEEE
296 IEEE TRANSACTIONS ON EDUCATION, VOL. 47, NO. 2, MAY 2004

and display. The contribution of the present paper is in devel-


oping a fully functional, PC-based oscilloscope with associated
modules of data acquisition hardware, software, interfacing, and
graphical user interface (GUI).
The LabVIEW virtual oscilloscope from National Instru-
ments [14] offers a versatile tool for PC-based data acquisition.
Truthfully speaking, however, the relatively high cost of such a
system (along with the National Instrument Data Acquisition
Card) often cannot be justified for undergraduate laboratories Fig. 1. Block diagram of the system.
where the requirements are not up to that level of sophistication,
accuracy, and speed. Therefore, LabVIEW is more suitable control lines, five status lines, and eight data lines. The function-
for industrial/higher research applications than undergraduate ality of the printer port is achieved through use of these three
education/teaching. addressable ports corresponding to data, status, and control.
With this background, the proposed system is intended to The IEEE 1284 Data Transfer Modes standard [15] provides
provide a low-cost, simple, yet effective solution for integrated a high-speed bidirectional communication between the PC and
multichannel data acquisition, display, analysis, and printing any external peripheral. The standard can communicate 50–100
operations in an undergraduate laboratory. It uses the conven- times faster than using the original parallel port. This standard
tional PC parallel port, interfacing circuitry costing less than US defines five operational modes to enable communication with
$10.00, and commonly used GUI development tool and other external peripheral or data transfer. Each mode fixes a protocol
programming languages, such as Visual Basic (VB) and Turbo for transferring data in either the forward direction (PC to pe-
C. The system is ideal for use in undergraduate laboratories for ripheral), the reverse direction (peripheral to PC), or the bidi-
real-time applications and educational/instructional purposes as rectional (half-duplex).
well. Course and tutorial materials built around the developed In the Compatibility (SPP) mode, the eight data lines are used
system are expected to provide sufficient insight into the topic to send data to the peripheral. The Nibble and Byte modes can be
of PC-based real-time data acquisition hardware and software. used create a bidirectional communication path between the par-
allel port and the peripheral. The Enhanced Parallel Port (EPP)
and Extended Capabilities Port (ECP) modes have bidirectional
III. SYSTEM DESCRIPTION
capability as part of their protocol. In the current work, the EPP
The data acquisition system (DAQ) is designed for sensing mode is used for 8-b data acquisition from the 8-b analog-to-dig-
multichannel analog inputs and for converting them into digital ital converter (ADC). The necessary control words for mode
formats before transferring them to the PC. The digital data is selection are supplied to the control register through the inter-
stored in the PC memory and displayed on the PC screen; the facing software, written in Turbo C++, before the acquisition
provisions are kept for processing the data as well. An online process is initiated.
printing facility is also made available with the unit. The block
diagram of the developed system is shown in Fig. 1. C. Interface Circuit
The hardware design is primarily intended to perform inter- The interface circuit for the conversion of the eight analog-
facing and input/output (I/O) functions. The system is capable of input channel data to their corresponding digital values and as-
acquiring and displaying eight signals at a time with additional sociated modules are shown in Fig. 2. It shows the detailed con-
provisions for data storage and printing. The user-friendly GUI nection diagram of the interface circuit. The functions of the
enables teaching the students about the basic functions of an different modules involved are described hereafter.
oscilloscope, such as amplitude and time settings. In addition, 1) Clock Generator Module: This module is basically re-
several other menu-driven functions for data-storage, display, quired for providing the clock input to the ADC chip. For this
analysis, and printing can also be demonstrated. purpose, the relatively simple LM555, which is a highly stable
device for generating accurate time delays or oscillations, is
A. System Requirements chosen. The module can generate a maximum of 1.34-MHz (ap-
proximately) frequency. In the system designed, the clock gen-
In the given problem, the minimum requirement for the PC is
erator module is adjusted to produce an output frequency of 1
a Pentium processor, preferably 32-MB RAM, operating system
MHz.
Windows 95/98 or higher, and parallel port connection; VB and
2) Analog-to-Digital (A/D) Conversion Module: For A/D
C were used to develop the system. For using/running the ap-
conversion, an option is required to take care of eight channels
plication, only the executable (.exe) files are sufficient, and the
of analog input signals, and all of these channels have to be
user need not have the compilers.
sampled at the same instant of time. For this purpose, the
economical option is to incorporate an eight-channel mul-
B. Parallel Port Basic Description tiplexer between analog inputs and the ADC. The National
A PC printer port is an inexpensive and yet powerful platform Semiconductor’s 0808 ADC, which has a built-in eight-channel
for implementing projects dealing with the control of real world multiplexer, is suitable for this purpose. Its average conversion
peripherals. It is found commonly on the back of the PC as a rate per channel is 100 s, which is quite fast for the present
D-Type 25-pin female connector. The port is composed of four application. The IC 7493 [binary counter integrated circuit
BHUNIA et al.: LOW-COST PC-BASED VIRTUAL OSCILLOSCOPE 297

Fig. 2. Schematic layout of the interface circuit hardware.

(IC)] is used for selecting the eight channels of the 0808 ADC low-level tasks, such as parallel port configuration, timer pro-
for sequential data transfer. The IC 7404 is used as an inverter gramming, handshaking with the ADC for data capture, data
for strobing the IC 7493 with proper level of signal coming out acquisition, and data storage in the hard disk. The flow chart
of the PC parallel port. The A741 IC is used for the purpose corresponding to the main program is illustrated in Fig. 3.
of providing adequate delay between the activation of the The abbreviations used in the flowchart of Fig. 3, such as SOC
0808 ADC input channel and the start of A/D conversion; this (start of conversion), EOC (end of conversion), and ALE (ad-
corresponds to the normal response time of the 0808 ADC IC. dress latch enable) are communication signals between the PC
Further detailed description of the interface circuit is beyond and the data acquisition hardware indicating different timing
the scope of this paper. and control signals. The detailed functionalities of these sig-
3) Auto Ranging Module: The auto-ranging module is used nals can be found in [9], [15]. The GUI was developed in VB
to convert the input analog signal range of 100 V to the range 5.0. Apart from real-time display of the eight different analog
of 2.5 V through a potentiometric arrangement. Another elec- signals, the GUI also allows demonstration of common oscil-
tronic clamping circuit using the LM324 IC-s is used to convert loscope tasks like time-scale and voltage-scale changes. It can
this range of voltage into the required 0–5-V range for the ADC display the value at any point of the signal by simply placing the
input. cursor over the required point on the waveform. Fig. 4 shows
Adequate, zener-based protection circuits are used in critical a sample GUI window of the developed system. Further anal-
places so that the circuit does not get damaged because of ac- ysis of the acquired signal, such as the root mean square (rms),
cidental overvoltages. The positions of these zeners are not ex- mean value, and average values can be obtained from the corre-
clusively shown in the Fig. 2 to avoid too much crowding in the sponding submenus under the “Tool” menu.
diagram.
IV. APPLICATIONS
D. Software—Data Acquisition and GUI The display systems available with most commercially avail-
Fully dedicated software was developed for controlling the able data acquisition systems usually provide single-channel or
data acquisition system. The software was written in Turbo C++ at the most dual-channel simultaneous display. When the dis-
to run under DOS 6.0. The program is made up of a main func- play system is needed to monitor three or more input channels
tion and several subfunctions for management of the associated simultaneously (for example, when monitoring a three-phase
298 IEEE TRANSACTIONS ON EDUCATION, VOL. 47, NO. 2, MAY 2004

Fig. 4. Screen shot of the developed GUI.

Fig. 5. Prototype system in operation.

the waveform of any one particular channel in enlarged format


if the need arises.
The prototype of the entire system with associated hardware,
interface cables, and the PC under operation is shown in Fig. 5.
The system developed can be easily used as a DSO, spec-
trum analyzer, digital multimeter, etc., by incorporating minor
changes in the display interface. Furthermore, the data read from
the ports can be suitably processed with the help of digital fil-
ters, fast fourier transformations, etc. Separate add-in software
modules can perform each of the signal-processing functions.
This project thus gives a solid ground work for further develop-
ment of software-based instruments and signal processors.
The system designed has several useful academic applica-
tions as well. In the laboratory, this package can be used for in-
structional purposes. The developed system introduces the stu-
dents to the basic functionalities, such as amplitude and time
settings of a real oscilloscope. Courses and tutorials on data ac-
quisition, PC-interfacing hardware and software, and GUI de-
Fig. 3. Simplified flowchart of the developed software. velopment-related topics are being implemented with the de-
veloped prototype serving as the demonstration kit. Apart from
power supply), one must view three or more channels simultane- these basic day-to-day laboratory exercises, the system can lead
ously. The system described in the present paper has provision to new innovative ideas for teaching, such as the following.
for simultaneous display of any four of the eight channels at a 1) Students can be quizzed on what they are doing.
time. Moreover, the user is provided with the option of viewing 2) Alternative visualizations can be presented.
BHUNIA et al.: LOW-COST PC-BASED VIRTUAL OSCILLOSCOPE 299

3) “Authentic” diagnostic problems can be presented based [9] M. Rodriguez, A. Ayala, F. Rosa, F. Herrera, S. Rodriguez, M. Diaz-
on stored data. Gonzalez, and S. R. Buenafuente, “A low-cost interface circuit to enable
A/D conversion using the parallel port,” Int. J. Electr. Eng. Educ., vol.
4) Comparisons can be offered between different problem 38, no. 3, pp. 222–231, 2001.
solutions. [10] C. C. Ko, B. M. Chen, S. H. Chen, V. Ramakrishnan, R. Chen, S. Y. Hu,
5) Virtual exercises can be planned around the technology. and Y. A. Zhuang, “A large-scale web-based virtual oscilloscope labora-
tory experiment,” Inst. Elect. Eng. IEE—Engineering Science Education
Moreover, the detailed treatment of the topic PC interfacing by J., vol. 9, no. 2, pp. 69–76, 2000.
using the PC printer port will enable interested students to im- [11] M. Shaheen, A. Loparo, and M. R. Buchner, “Remote laboratory exper-
imentation,” in Proc. American Control Conf., 1998, pp. 1326–1329.
plement other innovative ideas. [12] (2003, Mar.) Virtual Oscilloscope From NTNU Virtual Physics
Laboratory. [Online] Available: http://www.phy.ntnu.edu.tw/java/oscil-
loscope/oscilloscope.html
V. CONCLUSION [13] B. R. Land, B. R. Johnson, R. A. Wyttenbach, and R. R. Hoy. (2003,
January) Stimscope: A Virtual Instrument for Neurophysiology in the
Teaching Lab. [Online] Available: http://www.nbb.cornell.edu/neu-
A PC-based, low-cost, portable, plug-in-type virtual oscillo- robio/land/PROJECTS/Poster2002/NS%2702StimScopePos.pdf
scope based on the communication features of the PC parallel [14] (2003, Mar.) LabVIEW Overview From National Instruments.
port has been developed. The user specifications of the devel- [Online] Available: http://volt.ni.com/niwc/common.jsp?page=lab-
view_overview
oped system have been set up in accordance with the require- [15] Standard Signaling Method for Bidirectional Parallel Peripheral Inter-
ments of common undergraduate-level laboratories in electrical, face for Personal Computers, IEEE Standard 1284-1994, 1994.
electronics, and computer engineering courses. The interface
circuit hardware has been developed with few affordable elec-
tronic components for conversion and processing of the analog
Chandan Bhunia received the Bachelor of Instrumentation Engineering degree
signal in the digital form before being acquired by the PC. In- from Haldia Institute of Technology, Haldia, India, in 2002. He is currently pur-
tegrated software has been developed to manage the acquisi- suing the Master’s degree in the Department of Computer Science and Engi-
tion, signal representation, and post-processing of the signal. neering, Bengal Engineering College, Shibpur, India.
The system was successfully tested with several forms of input
waveforms, such as sinusoidal, square, and triangular signals.
The developed system has possible expansion capacities in the Saikat Giri received the Bachelor of Instrumentation Engineering degree from
form of additional signal processing modules. The virtual DSO Haldia Institute of Technology, Haldia, India, in 2002.
can be used for real-time data acquisition in most common-pur- He is currently a Software Analyst with Computer Maintenance Company
(CMC) Ltd., Kolkata, India.
pose low-power- and low-frequency-range applications for un-
dergraduate laboratories. It can also be used as an instructional
tool for undergraduate data acquisition courses for illustrating
complex concepts concerning parallel port programming, A/D Samrat Kar received the Bachelor of Instrumentation Engineering degree from
Haldia Institute of Technology, Haldia, India, in 2002.
conversion, and detailed circuit development. He is currently employed as Executive Engineer with Bhaba Atomic Research
Centre (BARC), Mumbai, India.

REFERENCES
[1] Tektronix Inc. (2003, Mar.). [Online] Available: http://www.tek.com
Sudarshan Haldar received the Bachelor of Instrumentation Engineering de-
[2] Gage—A Tektronix Technology Co. (2003, Mar.). [Online] Available:
gree from Haldia Institute of Technology, Haldia, India, in 2002.
http://www.gage-applied.com/tektronix.asp
He is currently employed as an Executive Engineer with BHaldia Petrochem-
[3] S. Celma, A. Carlosena, and P. A. Martinez, “PC-based spectrum ana-
icals, Ltd. (HPL), Haldia, India.
lyzer,” IEEE Trans. Educ., vol. 35, pp. 204–210, Aug. 1992.
[4] S. A. Chickamenahalli and A. Hall, “Interfacing a digital oscilloscope to
a personal computer using GPIB,” in Proc. 27th Annu. Conf. Frontiers
in Education—Teaching and Learning in Era of Change, vol. 2, 1997,
p. 904. Prithwiraj Purkait (M’97) received the B.E.E., M.E.E., and Ph.D. degrees
[5] C. E. Smith and M. D. Tew, “Data acquisition in the undergraduate lab- from Jadavpur University, Kolkata, India, in 1996, 1999, and 2002, respectively.
oratory,” IEEE Trans. Educ., vol. 38, pp. 95–96, Feb. 1995. He formerly worked with M/s Crompton Greaves, Ltd., Mumbai, India, as
[6] C. E. Smith, M. D. Tew, and J. Aschberger, “Computer aided data acqui- a Design Engineer for one year. He served as Lecturer with the Department of
sition in undergraduate laboratories,” in Proc. 22nd Annu. Conf. Fron- Electronics and Instrumentation Engineering, Haldia Institute of Technology,
tiers in Education, 1992, pp. 710–713. Haldia, India, from 1998 to 2002, and he served as Postdoctoral Researcher with
[7] P. H. Anderson. (2003, March) Use of a PC Printer Port for Control the University of Queensland, Queensland, Australia, from 2002 to 2003. He is
and Data Acquisition. [Online] Available: http://et.nmsu.edu/~etti/ currently an Assistant Professor in the Department of Electrical Engneering,
fall96/computer/printer/printer.html Haldia Institute of Technology. His current research includes transformer insu-
[8] I. Harries. (2003, Mar.) Interfacing to the IBM-PC Parallel Printer Port. lation condition assessment techniques and advanced signal processing appli-
[Online] Available: http://www.doc.ic.ac.uk/~ih/doc/par/ cations in high-voltage engineering.

View publication stats

Das könnte Ihnen auch gefallen