You are on page 1of 6

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

net/publication/281443326

Microcontroller Based Data Acquisition System

Article  in  Journal of Chemical, Biological and Physical Sciences · July 2014

CITATIONS READS
4 3,567

1 author:

Gulam Rabbani
Maulana Azad College
73 PUBLICATIONS   326 CITATIONS   

SEE PROFILE

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

for Biologicaal Mapping View project

All content following this page was uploaded by Gulam Rabbani on 18 September 2015.

The user has requested enhancement of the downloaded file.


May 2014 – July 2014, Vol. 4, No. 3; 3593-3597. E- ISSN: 2249 –1929

Journal of Chemical, Biological and Physical Sciences


An International Peer Review E-3 Journal of Sciences
Available online atwww.jcbsc.org
Section C: Physical Sciences
CODEN ( USA): JCBPAT Research Article

Microcontroller Based Data Acquisition System

Surekha V. Munde 1 , Kapsae S.K2 ., Gulam Rabbani3 , Shaikh Yusuf H*4,


1
P.E.S. College of Engineering, Aurangabad,India-431001
2
S.B.Science College Aurangabad, India -431001
3
Dr.Rafiq Zakaria Campus Maulana Azad College Aurangabad, India -431001
4
Shivaji Arts Commerce and Science College Kannad , India -431103

Received: 26 July 2014; Revised: 05 August 2014; Accepted: 22 August 2014

Abstract: Design and construction of flexible low cost user friendly data acquisition system
(DAS) based on 8051 family microcontroller (89S51/52) is presented. General purpose 8 bit
ADC 0809 with 8 analogue inputs is used and thus the resolution is 1 part in 256 which suits
most of the experiments, the clock is derived from a simple NE555 circuit. With suitable
modifications, more than one channel from the ADC can be used. Basically the DAS is
designed for 5V DC input for full scale reading. The DAS works with standard printer port
of a PC in SPP mode and thus has downward compatibility.The data acquisition system
works under program control and keeps on monitoring the signal at the analogue inputs and
makes the digital equivalent available. The data transferred between microcontrollers based
DAS and PC is in nibble (4 bit) mode and necessary multiplexing is suitably implemented.
PC reads this digital input at pre-decided time intervals through controlling program. The
data read by the controlling program is saved in computer files in suitable format for further
use.
Key Words: Data Acquisition system, ADC, Parallel port, printer port.

INTRODUCTION

With automation and availability of advanced instruments there is growing need of computer interfacing 1,2 of
traditional instruments so that data from experiments could be captured automatically. In view of this a data
acquisition system (DAS)3- 6 is designed and constructed that is cost effective and user friendly and can be
3593 J. Chem. Bio. Phy. Sci. Sec. C, May 2014 – July 2014; Vol.4, No.3; 3593-3597.
Microcontroller … Munde et al.

adopted to different application with little or no modification. The research in the field of Microsystems is
progressively directed towards smart electronic interfacing which provides the ability of performing complex
operations. Specially designed interfacing electronics for specific applications improve the performances and
provide a user-friendly environment. Data acquisition system is extensively employed in a number of
automatic test and measuring equipments. They are used to collect the required data from any peripheral
input devices, such as meters, sensors etc. via controlling Program7 . The measured data could be stored in the
PC in a file for further processing and the data can be displayed numerically or graphically as a curve on the
screen8 .
A microcontroller (89S51/52) based data acquisition and control system9-11 designed, constructed and tested
is presented. The system makes use of printer port in SPP mode for input and output of digital data. The data
transfer to the controlling computer was in nibble mode and for 8 bits of data two nibbles are used. The two
nibbles of 8 bit data are read one by one by the computer side controlling program and combined to form the
value read. The ADC used (ADC 0809) has 8 analogue channels and thus the number of channels can be
increased if needed to record more than one variable. The microcontroller keeps initiating start of conversion
and the converted data (digital equivalent of analogue input) is made available at the input of the
multiplexers. The controlling program selects the nibbles one by one and reads them and finally computes
the 8 bit value and stores in an array for further processing and saving into computer files.
FEATURES OF 89S51/52
The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of In-System
Programmable Flash memory which is more than sufficient for small applications like the present system.
The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible
with the industry standard 80C51 instruction set and pin-out. The on-chip Flash allows the program memory
to be reprogrammed in-system using suitable programmer. By combining a versatile 8-bit CPU with In-
System Programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which
provides a highly flexible and cost effective solution to many embedded control applications. The AT89S51
provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, Watchdog
timer, two data pointers, two 16-bit timer/counters, a five-vector two-level interrupt architecture, a full
duplex serial port, on-chip oscillator, and clock circuitry. All the 32 I/O lines can individually be configured
as input or output by writing a ‘0’ or ‘1’ to the corresponding line. In addition, the AT89S51 is designed with
static logic for operation down to zero frequency allowing a flexible design. It supports two software
selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters,
serial port, and interrupt system to continue functioning. 89S52 has very much similar features and the
programmable flash memory is 8K and RAM is 256 bytes (against 4K and 128 for 89S51).

DESIGN CONSIDERATIONS

The data acquisition system is developed as a general purpose system that can be used with a wide variety of
application requiring automatic recording of analogue values of signals like voltage. For simplicity and
downward compatibility the printer port was used in SPP mode and the data acquisition was implemented in
nibble mode. Printer port in SPP mode is available on PC as a standard parallel port and using this port
simplifies other interfacing issues including resources. However newer computers are skipping parallel port,
in view of this the design is being modified to support serial and USB port.

3594 J. Chem. Bio. Phy. Sci. Sec. C, May 2014 – July 2014; Vol.4, No.3; 3593-3597.
Microcontroller… Munde et al.

As parallel printer port operating in SPP mode allows only 5 input lines, the data transfer is implemented in
nibble mode (4 bit at a time). The 8 bit data from the analogue to digital convertor ADC0809 is split into two
nibbles using multiplexer 74LS257. The controlling program sends signal to the multiplexer pin No 1 that
selects the nibble based on the signal received via pin No 2 of the printer port. Detailed circuit diagram of the
data acquisition system with multiplexing part is shown in Fig. 1 below.

Fig. 1: Circuit diagram of the data acquisition system to be interfaced to printer port.

The 4 bit bus from the 74LS257, the control signal coming from printer port of controlling computer and its
ground connection i.e. 6 pins are brought on a single 8 pin header and a cable was constructed to connect to
the 25 pin D type printer port connector on one side and 8 pin header on the other side. The data acquisition
system was constructed on a commercially available printed circuit board and fitted with minimum required
system, IC’s, crystal etc and ISP port for in system programming. The advantage of using 89S51/52 is that it
is in system programmable so that the firmware programs can be modified without removing the
microcontroller from its circuit. The circuit was carefully constructed using necessary decoupling and taking
care of stray pickups, according to the circuit diagram is shown in Fig 1.
The microcontroller firmware program was developed to implement the controls discussed above in
assembly language and it was debugged and assembled to generate .HEX file to be downloaded into the
microcontroller. This code (Firmware) is then downloaded in to the microcontroller using a USB ISP
programmer. The program firmware can be modified easily to incorporate new modifications if needed.
After downloading the program into the microcontroller, it starts running independently and when connected
to the computer, allows for the data transfer via printer port using appropriate controlling program.

3595 J. Chem. Bio. Phy. Sci. Sec. C, May 2014 – July 2014; Vol.4, No.3; 3593-3597.
Microcontroller … Munde et al.

The computer side controlling program was developed in Visual Basic, there is no instruction in VB to
access ports, for this purpose a supporting file ‘inpout32.dll’ is needed to support functionality with ports. A
user friendly program was written and tested in visual basic to monitor the input from the microcontroller
based DAS board. The program was successfully tested and the results obtained were found to be in
agreement with what is expected. The data acquisition system was tested several times using standard input
voltages to confirm the accuracy of measurement, it was found to be in good experiment with the expected
value with an error of ± 1 bit as imposed by the ADC.
CONCLUSION
The data acquisition system based on 8051 family microcontroller (89S51/52) from Atmel Corporation is
designed, developed and tested. The DAS is designed to acquire data from a diffusion cell to measure
conductivity of solution. The system is tested with the diffusion cell for collecting conductivity data over
prolonged durations of few hours. Manually conducting systematic and continuous recordings of reading is
tedious task and chances of missing an observation or two are more, further recording large number of
observation in succession is laborious task that is very much simplified by the present DAS onc e the system
is running one is free to handle other tasks.
Future Plans: In view of the present needs and availability of microcontrollers with additional features, we
plan to revise the whole system and design the same based on AVR family microcontrollers having built in
ADC with 10 bit resolution (1 part in 1024). Also latest desktop computers and laptops don’t have parallel
port, to keep the system versatile the data transmission will be implemented using serial or USB port.

REFERENCE

1. George Smith, “Computer interfacing” published by Newness, 2000.


2. Ramesh Gaonkar Fundamentals of Microcontrollers and Application In embedded System
published by Penram International, 2010.
3. Data acquisition ‘the technology interface’: http://www.access.digex.net/~pha.
4. Dr R. B. ‘Fundamentals of Microprocessors and Microcomputers’ Fifth edition, 1991: 311.
5. A.Peter ‘Use of a PC Printer Port for control and Data Acquisition’ The Electronic Journal for
Engineering Technology: pha @eng.morgan.edu
6. R. F. Graf ‘The encyclopedia of Electronic circuits’ (BPB Publication, NewDelhi) (First Indian
Edition) 1989.
7. A. Sagahyroon, T. Al-khudairi,”FPGA Based Acquisition of Sensor Data” Proc. of Int. Conf. on
Ind. Tech., ICIT 2004:1398.
8. S. Thanee S. Somkuarnpanit and K. Saetang, “FPGA-Based Multi Protocol Data Acquisition
System with High Speed USB Interface” Proceedings of the international MultiConference of
Engineers and Computer Scientists 2010 Vol II,IMCES 2010, 17,Hong Kong.
9. Vladimír Vašek, Petr Dostálek and Jan Dolinay, ‘Microcontroller-based Data Acquisition
Device for Process Control and Monitoring Applications’ Tomas Bata University in Zlín Czech
Republichttp://cdn.intechweb.org/pdfs/12263.pdf
10. P. Asimakopoulos, G. Kaltsas and A. G. Nassiopoulou, ‘A microcontroller based interface
circuit for data acquisition and control of a micromechanical thermal flow sensor’ Institute of

3596 J. Chem. Bio. Phy. Sci. Sec. C, May 2014 – July 2014; Vol.4, No.3; 3593-3597.
Microcontroller… Munde et al.

Physics Publishing Journal of Physics: Conference Series,2005, 10 , 301 (http://iopscience.


iop.org/1742-6596/10/1/074)
11. Y. H. Shaikh, A. R. Khan, Patange, K. B., J. M Pathan, S. H. Behere “Resistance of cell in
fractal growth in electrodeposition”International Journal of Artifical Life research” issue,2011,
2(1), 17-27.

* Corresponding author: Shaikh Yusuf H;


Shivaji Arts Commerce and Science College Kannad , India -431103

3597 J. Chem. Bio. Phy. Sci. Sec. C, May 2014 – July 2014; Vol.4, No.3; 3593-3597.

View publication stats

You might also like