Download The measured current from the developed data acquisition

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Current source wikipedia , lookup

Solar micro-inverter wikipedia , lookup

Multidimensional empirical mode decomposition wikipedia , lookup

Alternating current wikipedia , lookup

Opto-isolator wikipedia , lookup

Metadyne wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Transcript
MICROCONTROLLER BASED DATA ACQUISITION SYSTEM FOR BEAM
CURRENT MONITORING
Shuaib A. Khan*, P. Bhaskar, S. Srivastava and Tapan K. Nayak
Variable Energy Cyclotron Centre, 1-AF, Bidhannagar, Kolkata-700064, India
Abstract
DESIGN OVERVIEW
Data-acquisition systems are widely used to monitor
and logging the beam current from accelerators. An
indigenously developed Precision Current Integrator is
presently in use at the VECC cyclotron for monitoring the
beam current. In this paper, we report the design and
development of a low cost Data Acquisition system based
on Peripheral Interface Controller (PIC) Microcontroller
and LabVIEW software. The Data Acquisition system
will be coupled to the current integrator for logging,
monitoring and analysis of the beam current.
INTRODUCTON
Monitoring and data logging of beam currents is
essential for proper operation of cyclotron systems and its
experiments. Depending on the range of currents to be
measured, various kinds of current integrators and data
acquisition systems are commercially [1,2] available.
However considering very high cost and non
serviceability of commercially available current
integrators, a low cost precision current integrator is
developed in VECC# to measure cyclotron beam current.
The instrument is a combined ampere/coulomb meter
dedicated for beam current measurement in particle
accelerators as well as can be used for isotope separators,
ion implanters etc. A low cost data acquisition system
coupled to this current integrator based on PIC
Microcontroller [3], for data logging, monitoring and
analysis of the beam current has been designed and
developed. The Graphical User Interface (GUI) is built
using Laboratory for Virtual Instrumentation Engineering
Workbench (LabVIEW) software [4]. The acquired data
is transferred to the computer disk for the storage using
RS232 protocol [5]. The strikingly conspicuous feature of
this data acquisition system is its flexibility and
adaptability to the changes in the required operating
parameters. Microcontroller chip can easily be reprogrammed according to the requirement of the system,
thereby providing a way for rapid system development. It
is portable and compact. The uniqueness of the present
system is that it operates for a wide range of current from
nanoampere to microampere with the precision of three
decimal places. It can measure current from 50
picoampere to 100 microampere and the reliability and
stability of this system has been tested. This setup is now
ready and could be used with any accelerator and similar
applications.
The designed data acquisition system consists of
hardware components for acquiring and digitizing the
signals, as well as software for interfacing, displaying and
storing the acquired data in human readable format on a
computer disk. The range of current to be measured can
be set manually in the current integrator. It can measure a
maximum of 100 microampere current and as low as 50
picoampere in 1 nano-ampere range. It also provides an
analog output of 1 volt at full scale (FS) in all the ranges
of operations. This feature is exploited for the
development of the data acquisition system coupled with
this current integrator. The 40 pin microcontroller
PIC16F877A is an integral part of the developed data
acquisition system where the core program will reside. It
has eight input channels, each has 10 bit inbuilt ADC [6].
It accepts 0-5 volt input. The firmware of the
microcontroller has been developed using MICRO-CPRO software [7]. C language is used for programming
since it is easy to understand as well as to interpret.
PICKit2 development programmer by Microchip [8] is
used for deploying the generated bit file of the C program
from the Personal Computer (PC) to the microcontroller
chip.
The
communication between
the
PC
and
microcontroller is done by transmitting and receiving
signal using RS232 protocol at a baud rate of 9600bps.
The microcontroller operates at TTL logic level,
whereas communication port of RS232 operates in the
range of -25V to +25V. So in order to establish the
communication from microcontroller to PC, a voltage
level translator MAX232N Integrated Circuit is used.
Current Source
Current Integrator
Programmer
Power
Supply
Microcontroller Board
Figure 1. Lab Test Setup
____________________________________________
#The Variable Energy Cyclotron Centre (VECC), located at Kolkata,
India is a major research and development unit of the Department of
Atomic Energy, Government of India
*[email protected]
Laboratory test setup is shown in Fig.1. The analog output
from the current integrator is fed to the ADC input pin of
the microcontroller. Programmer takes the input as bit file
in hexadecimal format from the PC to the microcontroller
and the output is displayed in the LabVIEW GUI.
APPLICATION SOFTWARE
Human Machine Interface is the most important part in
the development of this system, also referred to as User
Interface, Operator Panel/Front Panel. It provides a means
of controlling and monitoring in a graphical way.
system from the front panel of the Graphical User
Interface (GUI) built in LABVIEW 7.1 as shown in Fig.
2. LabVIEW is a system design application platform and
development environment for a visual programming
language from National Instruments. It is a data flow
programming language also referred to as G.
Execution is determined by the block diagram on
which the programmer connects different function nodes
by drawing wires. Its programs and subroutines are
called Virtual Instruments (VIs). Each VI has three
components: front panel, block diagram, and a connector
panel as explained in the following sections.
Front panel design
Figure 2: The Front Panel
User can operate and monitor the entire data acquisition
The front panel is the user terminal of a visual
interface, developed in such a way that its appearance and
operation imitate physical instruments. Controls given in
the front panel is to keep track of beam current as per the
functionality of the current integrator. The parameters of
serial communication eg. Baud rate, is shown in the front
panel. Fluctuations of the beam current are visualized in
the graphical form continuously with time. The exact
numerical value of the beam current returned from the
instrument or device connected to the serial port is
displayed in the Read Indicator panel which resembles a
digital meter. The value of beam current is also displayed
in the analog meter panel of the user terminal to convey
the impression of the hardware front panels mounted with
the Current Integrator. In the front panel of this
acquisition system there is a provision to store the data
when required through a toggle switch. In the ON state,
the data logging of the beam current starts, values are
acquired with time stamp and date, and stored in a file at
Figure 3: Block Diagram
a user specified location on personal computer disk. In
OFF state the acquisition is stopped.
Block diagram configuration
After the front panel, graphical representations of
functions to control the front panel objects are added.
The block diagram as shown in Fig. 3 contains this
graphical source code. Objects on the block diagram
include terminals, nodes, and functions. Front panel
objects appear as terminals which exchange the
information between the front panel and block diagram.
Various nodes are used for configuring the block
diagram.
Explaining the block diagram from left to right. The
node Virtual Instrument Software Architecture (VISA)
Resource Name, uniquely identifies the serial port to
which the external device or interface session is
connected. It also identifies the resources to be opened
and written to, as well as read from. The node VISA
Configure Serial Port initializes the serial port specified
by VISA Resource Name node eg. baud rate of
transmission, number of bits in the incoming data, parity
and stop bits for every frame to be received or
transmitted, time out value for the read and write
operations and flow control required for the transfer
mechanism. Output from the VISA Serial port is
connected to the Case structure which has one or more
subdiagrams or cases, one of which executes with the
structure execution. Delay of 500msec is introduced
between read and write operations, which gives the
devices the sufficient time to respond. Data is then fed to
the VISA Read node, which reads the specified number of
bytes from the interface and returns the data to the Read
Buffer. Output of the buffer is fed to a String to Number
converter
function
block
which
converts
fractional/exponential string to a number. The data is then
fed to the analog meter, digital display, graphical display
and the storage file in parallel for the synchronization of
the stored data with the display.
RESULTS
The measured current from the developed data
acquisition system is displayed as a multiple of the analog
output voltage from the precision current integrator and
its range of operation, as shown in Fig. 2. Long time
testing of the data acquisition system is carried out. Input
to the current integrator is given from the Keithley 6221
picoampere current source for testing purpose. The
system is found to be stable with time and the reliability
of the system was tested thoroughly. The collected data is
stored on the disk and a sample of the data collected with
time stamp is shown in Fig. 4
Figure 4: Sample of the Data Stored in a file
REFERENCES
[1] 6487-900-01 Rev. B/Jaunuary 2003. Picoammeter/voltage
source Keithley model 6487.
[2] AH401D, 4- channel Charge Integration Picoammeter.
Product Overview, CAEN. http://www.CAENels.com
[3] PICmicro Mid-Range MCU Family Reference Manual.
Microchip Technology Inc. December 1997
[4] LabView Function and VI reference manual. National
Instruments January 1998. Part Number 321526B-0;
http://www.ni.com
[5] Serial Port complete: Programming and circuits for RS-232
and RS-485 Links and Networks. By: Jan Axelson
[6] PIC16F87XA Data Sheet 28/40/44-Pin Enhanced Flash
Microcontrollers. 2003 Microchip Technology Inc.
[7] MicroC Pro for PIC. Mikroelectronika development tools.
Copyright mikroElektronika, January 2012.
[8] The PICkit2 Development Programmer/Debugger. Part
Number: DV164121. www.microchip.com