Sie sind auf Seite 1von 25

INTRODUCTION

1.1 Overview of Project

In environments like factories, power plants and transformers in electricity

substations, controlling temperature to a safe value is important. Supervisory and control

systems are used to monitor the temperature and other physical parameters on a centralized

machine whereby one can monitor and control the remote devices. The ARM

microcontroller based system described here does the same job of acquiring the analogue

data and sending it to a remote terminal for monitoring.

The above fig shows the block diagram of the twelve-channel data acquisition and

logging system using ARM microcontroller.

The software is user-friendly and written in labVIEW.

Data is acquired through serial port of the PC and displayed graphically on

the screen of PC monitor.

Precise analogue signal conversion using ARM analogue-to-digital converter

with 10-bit resolution.


All data acquired by the system is logged into a database for future reference

with date and time of sampling.

The internal analogue-to-digital conversion (ADC) channels of the ARM are

used to acquire real-time data in the form of analogue signal. The data is sent

to the PC via UART channel.

Today, most scientists and engineers use personal computers (PCs) with parallel or

serial ports for data acquisition in laboratory research, test and measurement, and industrial

automation. Many applications use plug-in devices to acquire data and transfer it directly to

computer memory. Others use data acquisition (DAQ) hardware remote from the PC that is

coupled via parallel or serial port. Obtaining proper results from a PC-based DAQ system

depends on each of the following system elements.

The PC
Transducers
Signal Conditioning
DAQ Hardware
Software
Figure 1.1 PC based DAQ System

1.2 Objectives
To implement the industrial automation in low cost to replace
DAQ card with ARM processor.

Increasing the Efficiency Power consumption.

Control entire industry using personal computer with labVIEW through Low

Cost Data Acquisition Card.

1.3 Project Plan

Phase-II:

In phase-2, interfacing the Low Cost Data Acquisition Card with personal
computer using labVIEW.
Control all the transducers in labVIEW through Low Cost Data
Acquisition Card in industry.
To develop coding using RTOS.

Interfacing all the transducers with board.


To configure onchip DAC to all transducers.
To write separate code for DAC.
Interface Low Cost Data Acquisition Card to PC using RS232 cable.

1.4 Organization of the Project

The system design and test plan to make the requirements of the system
general constraints such as which is the Real Time Operating environment have been
used in the project and hardware requirements and software requirements in detail.
The implementation and result will show all modules and find out which of the each
module input and output and finally form the results. Finally, this document to
explain the conclusion of my project and to explain the future enhancement of my
project.
CHAPTER 2

LITERATURE SURVEY

2.1 Low-Cost Data Acquisition Card for School Network Cosmic Ray
Detectors

The Cosmic Ray Observatory Project (CROP) at University of


Nebraska/Lincoln and the Washington Area Largescale Time coincidence Array at
University of Washington/Seattle are among several outreach projects siting cosmic-
ray detectors at local high schools in cities around North America, to study the
origins and interactions of high-energy cosmic rays. In a collaboration between
QuarkNet, the outreach program based at Fermilab, CROP, and WALTA, a low-cost
data acquisition electronics card has been developed to collect and synchronize the
data from each detector site. The cost for each card is under US$500 for parts,
functionally replacing much more expensive electronics crates and modules at each
high school site. The card has 4 analog discriminator inputs for photo-multiplier tube
signals, a 4-channel Time-to-Digital converter for local coincidence and time-over-
threshold measurements at 0.75 ns resolution, programmable trigger logic via a
CPLD and microcontroller, and a built-in low-cost GPS receiver/antenna module
(via external cable) to provide event trigger time stamps at better than 100 ns
accuracy. Temperature sensors and a barometer are also integrated to record
environmental data along with the counter data. The card connects to any PC or
laptop via a standard RS-232 serial port for data output and control. The
microcontroller and CPLD are field programmable and therefore make the card
functionality flexible and easy to upgrade.

2.2 LabView Interface for School Network DAQ Card


Low-cost DAQ card has been developed for school-network cosmic ray
detector projects, providing digitized data from photomultiplier tubes via a standard
serial interface. To facilitate analysis of these data and to provide students with a
starting point for custom readout systems, a model interface has been developed
using the National Instruments LabVIEW system. This user-friendly interface
allows one to initialize the trigger coincidence conditions for data-taking runs and to
monitor incoming or pre-recorded data sets with updating singles- and coincidence-
rate plots and other user-selectable histograms.

CHAPTER 3

EXISTING WORK
3.1 Requirement Specification

3.1.1 Hardware Requirements


ARM7 Core (LPC2148)
Transducers
RS-232 cable
3.1.1.1 ARM7 Core (LPC2148)
Features:
8 to 40 kB of on-chip static RAM and 32 to 512 kB of on-chip flash program
memory.

128 bit wide interface/accelerator enables high speed 60 MHz operation.

In-System/In-Application Programming (ISP/IAP) via on-chip boot-loader


software. Single flash sector or full chip erase in 400 ms and programming of
256 bytes in 1 ms.

EmbeddedICE RT and Embedded Trace interfaces offer real-time debugging


with the on-chip RealMonitor software and high speed tracing of instruction
execution.

USB 2.0 Full Speed compliant Device Controller with 2 kB of endpoint RAM.

In addition, the LPC2146/8 provide 8 kB of on-chip RAM accessible to USB

by DMA.

Two (LPC2144/6/8) 10-bit A/D converters provide a total of 6/14 analog


inputs, with conversion times as low as 2.44 s per channel.
Single 10-bit D/A converter provides variable analog output.

Two 32-bit timers/external event counters (with four capture and four
compare channels each), PWM unit (six outputs) and watchdog.

Low power real-time clock with independent power and dedicated 32 kHz
clock input.

Multiple serial interfaces including two UARTs (16C550), two Fast I2C-bus
(400 kbit/s), SPI and SSP with buffering and variable data length capabilities.

Vectored interrupt controller with configurable priorities and vector


addresses.
60 MHz maximum CPU clock available from programmable on-chip PLL with

settling time of 100 ms.

On-chip integrated oscillator operates with an external crystal from 1 MHz to 25

MHz.

Individual enable/disable of peripheral functions as well as peripheral clock scaling

for additional power optimization.


Figure 3.1 Block diagram (LPC2148)
Architectural overview

The ARM processor core is a key component of many successful 32-bit


embedded systems.You probably own one yourself and may not even realize it!
ARM cores are widely used in mobile phones, handheld organizers, and a multitude
of other everyday portable consumer devices.

The ARM7TDMI-S is a general purpose 32-bit microprocessor, which offers


high performance and very low power consumption. The ARM architecture is based
on Reduced Instruction Set Computer (RISC) principles, and the instruction set and
related decode mechanism are much simpler than those of microprogrammed
Complex Instruction Set Computers. This simplicity results in a high instruction
throughput and impressive real-time interrupt response from a small and cost-
effective processor core.
The ARM processor, like all RISC processors, uses a load-store architecture.
This means it has two instruction types for transferring data in and out of the
processor: load instructions copy data from memory to registers in the core, and
conversely the store instructions copy data from registers to memory. There are no
data processing instructions that directly manipulate data in memory. Thus, data
processing is carried out solely in registers.
Data items are placed in the register filea storage bank made up of 32-bit
registers. Since the ARM core is a 32-bit processor, most instructions treat the
registers as holding signed or unsigned 32-bit values. The sign extend hardware
converts signed 8-bit and 16-bit numbers to 32-bit values as they are read from
memory and placed in a register.
ARM instructions typically have two source registers, Rn and Rm, and a
single result or destination register, Rd. Source operands are read from the register
file using the internal buses A and B, respectively.
Data enters the processor core through the Data bus. The data may be an
instruction to execute or a data item. Figure 2.1 shows a Von Neumann
implementation of the ARM data items and instructions share the same bus. In
contrast, Harvard implementations of the ARM use two different buses.
The instruction decoder translates instructions before they are executed. Each
instruction executed belongs to a particular instruction set.

3.1.1.2 Transducers
Transducers sense physical phenomena and produce electrical signals that the
DAQ system measures. For example, thermocouples, resistance temperature
detectors (RTDs), thermistors, and IC sensors convert temperature into an analog
signal that an analog-to-digital converter (ADC) can measure. Other examples
include strain gauges, flow transducers, and pressure transducers, which measure
force, rate of flow, and pressure, respectively. In each case, the electrical signals
produced are proportional to the physical parameters they monitor.

The electrical signals generated by the transducers must be optimized for the
input range of the DAQ device. Signal conditioning accessories amplify low-level
signals and then isolate and filter them for more accurate measurements. In addition,
some transducers use voltage or current excitation to generate a voltage output.
Depicts a typical DAQ system with National Instruments SCXI signal conditioning
accessories.

Temperature sensor LM335


The LM135 series are precision, easily-calibrated, integrated circuit
temperature sensors. Operating as a 2-terminal zener, the LM135 has a breakdown
voltage directly proportional to absolute temperature at +10 mV/K. With less than
1W dynamic impedance the device operates over a current range of 400 A to 5 mA
with virtually no change in performance. When calibrated at 25C the LM135 has
typically less than 1C error over a 100C temperature range. Unlike other sensors
the LM135 has a linear output.
Applications for the LM135 include almost any type of temperature sensing
over a 55C to +150C temperature range. The low impedance and linear output
make interfacing to readout or control circuitry especially easy.

Included on the LM135 chip is an easy method of calibrating the device for
higher accuracies. A pot connected across the LM135 with the arm tied to the
adjustment terminal allows a 1-point calibration of the sensor that corrects for
inaccuracy over the full temperature range.
This single point calibration works because the output of the LM135 is
proportional to absolute temperature with the extrapolated output of sensor going to
0V output at 0K (273.15C). Errors in output voltage versus temperature are only
slope (or scale factor) errors so a slope calibration at one temperature corrects at all
temperatures.

3.1.1.3 RS-232 cable


The Serial Port is harder to interface than the Parallel Port. In most cases, any
device you connect to the serial port will need the serial transmission converted back
to parallel so that it can be used. This can be done using a UART. On the software
side of things, there are many more registers that you have to attend to than on a
Standard Parallel Port. (SPP)

Serial Cables can be longer than Parallel cables. The serial port transmits a '1'
as -3 to -25 volts and a '0' as +3 to +25 volts where as a parallel port transmits a '0'
as 0v and a '1' as 5v. Therefore the serial port can have a maximum swing of 50V
compared to the parallel port which has a maximum swing of 5 Volts. Therefore
cable loss is not going to be as much of a problem for serial cables than they are for
parallel.
You don't need as many wires than parallel transmission. If your device needs
to be mounted a far distance away from the computer then 3 core cable (Null Modem
Configuration) is going to be a lot cheaper that running 19 or 25 core cable. However
you must take into account the cost of the interfacing at each end.

Serial transmission involves the sending of data one bit at a time,over a single
communications line. In contrast, parallel communications require at least as many
lines as there are bits in a word being transmitted (for an 8-bit word, a minimum of
8 lines are needed). Serial transmission is beneficial for long distance
communications, whereas parallel is designed for short distances or when very high
transmission rates are required.

MAX232
MAX232 is used as the signal-level converter. For voltage-level conversion,
four electrolytic capacitors are used with MAX232.
The MAX232 is a dual driver/receiver that includes a capacitive voltage
generator to supply TIA/EIA-232-F voltage levels from a single 5-V supply. Each
receiver converts TIA/EIA-232-F inputs to 5-V TTL/CMOS levels. These receivers
have a typical threshold of 1.3 V, a typical hysteresis of 0.5 V, and can accept 30-
V inputs. Each driver converts TTL/CMOS input levels into TIA/EIA-232-F levels.
The driver, receiver, and voltage-generator functions are available as cells in the
Texas Instruments LinASIC library.

3.1.2.1 labVIEW

DAQ hardware without software is of little use-and without proper controls


the hardware can be very difficult to program. The purpose of having a appropriate
software is the following

Acquire data at specified sampling rate


Acquire data in the background while processing in foreground
Stream data to and from disk
Integrate different DAQ boards in a computer and use various functions of a
DAQ board from a single user interface.
LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a
development environment based on the graphical programming language G.
LabVIEW is integrated fully for communication with hardware such as GPIB, VXI,
PXI, RS-232, RS-485, and plug-in data acquisition boards. LabVIEW also has built-
in libraries for using software standards such as TCP/IP Networking and ActiveX.

Using LabVIEW, you can create 32-bit compiled programs that give you the fast
execution speeds needed for custom data acquisition, test, and measurement
solutions. You also can create stand-alone executables because LabVIEW is a true
32-bit compiler.

You can use LabVIEW with little programming experience. LabVIEW uses
terminology, icons, and ideas familiar to technicians, scientists, and engineers, and
relies on graphical symbols rather than textual language to describe programming
actions.

LabVIEW contains comprehensive libraries for data collection, analysis,


presentation, and storage. LabVIEW also includes traditional program development
tools. You can set breakpoints, animate program execution to see how the program
executes, and single-step through the program to make debugging and program
development easier.

The purpose of this lab was to introduce the student to the LabVIEW software,
and learn to create and analyze systems with analog and digital inputs using
LabVIEW and computers equipped with DAQ cards.
There are two theories, which were analyzed during the lab. The first theory is
that computers are able to read in data at discrete moments in time, then after the
data is read in, calculations can then be performed on the data. The second theory is
concerned with how to read in data. Two options are; writing programs, or using
specially designed software. In this lab the use of LabVIEW is introduced and
applied. LabVIEW allows the user to write programs for data collection by drawing
function blocks and connecting them, (these are referred to as schematics). The
connection between function blocks determines how the data will flow in the
program (system). Examples of the function blocks include data that is read in (input
devices), data calculations, output devices, timers, switches, various waveform
signals, temperature readings, etc.

The first procedure for this lab was to go through the LabView Quick Start Guide
(tutorial) provided in the laboratory. This was done to familiarize the student with
LabView and to re-acquaint those who have used it previously in other applications.

The second procedure for this lab required us to connect inputs and outputs to the
DAQ cards, and use the test panel to test the circuits that were required to be built.
This was done using the DAQ Configure Utility for the PCI-1200 DAQ card. The
test panel was used to tell us if the inputs and outputs were working correctly (if the
LED in our circuit would light or not). Using the CDT boards, we were to create 2
simple circuits and connect them to their respective positions on the DAQ interface
cable. These circuits are shown in Figure.
Figure 1. Circuits designed on CDT for procedure 2.

After these circuits were built and connected to the interface cable, using a
diagram of the interface cable located on page 47 of the EGR 345 Lab Manual [Jack,
1998] as a reference, the circuits were to be developed using LabVIEW. The
schematics are found in Figure 2. After the program (system) was created
schematically, we were to run the program and observe the relationship between the
input and output.

Figure 2. Schematics of LabView screen for Procedure 2.

The third procedure required creating a program to analyze a signal generator.


The circuit for Procedure 3 is found in Figure 3, and the schematic for Procedure 3
is found in Figure 4. After creating the system we were to run it beginning with a
low frequency and then gradually increase the frequency and observe the changes.

Figure 3. Circuit designed on CDT for Procedure 3.

Figure 4. Schematic of LabView screen for Procedure 3.

The fourth procedure required creating a program (system) that allowed for
control of an output voltage from the screen (via entering input voltages). The circuit
created is found in Figure 5. The schematic is found in Figure 6. Once the program
was developed, we were to run it and observe the resulting relationships between the
input and output voltages.
Figure 6. Schematic of LabView screen for Procedure 4.

After setting up the circuit for Procedure 2, we had some difficulty getting the
DAQ Configure Utility to configure to our circuit. After experimenting with the
controls from the inputs and outputs we were finally able to run the program we had
created. Theoretically, if our DAQ card was configured correctly to our program,
when we ran the program we would be able to turn the LED on and off using the
switch in the schematic. We tested the switch repeatedly and were successful each
time.

After setting up the circuit for Procedure 3, we again configured the DAQ card
to our program and ran it. Theoretically if our DAQ card was configured correctly
to our program, when we ran the program we would be able to see a sine wave on
the schematic, and be able to see changes in the amplitude and frequency as we
adjusted frequency on the CDT. We ran the program and changed the frequency to
various levels to see the changes in the waveforms period and amplitude.

After setting up the circuit for Procedure 4, we again configured the DAQ card
to our program and ran it. Theoretically if our DAQ card was configured correctly
to our program, when we ran the program we would be able to see an output voltage
displayed on the screen that equaled the voltage reading on the digital multimeter.
By adjusting the input voltage we were able to observe different output voltages, as
well as an indicator showing that the voltage we used for input was greater than the
maximum allowable input voltage (which we could set in this procedure).

This lab was designed to introduce the student to LabVIEW and teach the
student to be able to create and run different types of programs. The use of the
tutorial in this lab was helpful in getting to know how to begin setup of program
schematics and seeing how data flows in a LabVIEW program. This lab required
that the student to become pro-active in learning new software. Many of the features
needed for this program were to be discovered as the lab went along. Although this
made the lab frustrating at times, it helped to strengthen the students ability to tackle
obstacles as they came along. It was a good lesson in learning and trouble shooting.
It also developed a students ability to think critically and aggressiveness towards
new learning experiences, despite the initial frustration. This lab proved to be very
helpful in learning LabVIEW and in seeing computer software integration into real
life systems.

3.1.2.2 OrCAD

OrCAD Capture offers a comprehensive solution for entering, modifying, and


verifying complex system designs quickly and cost-effectively. Whether used to
design a new analog circuit, revise a schematic diagram for an existing PCB, or
design a digital block diagram with an HDL module, OrCAD Capture allows
designers to enter, modify, and verify the PCB design.

The schematic editor enables users to place and connect parts from a
comprehensive set of functional libraries. It uniquely packages the parts, ensures
design integrity, and creates design netlists for any of the formats supported by
Cadence.

In the schematic page editor, you can display and edit schematic pages. You
can place parts, wires, buses, and draw graphics. The schematic page editor has a
tool palette that you can use to draw and lace everything you need to create a
schematic page. You an print from within the schematic page editor, or from the
project manager window.

At the heart of the OrCAD PCB Designer Basics suite is OrCAD PCB Editor
Basicsan intuitive, easy-to-use, constraint-driven environment for creating and
editing PCBs. Its extensive feature set addresses a wide range of todays design and
manufacturability challenges. The PCB editor provides a powerful and flexible set
of floorplanning tools. Powerful shape-based shove/hug interactive etch
creation/editing provides a highly productive interconnect environment. Dynamic
shape capability offers real-time copper pour plowing/healing functionality during
placement and routing iterations. The PCB editor can also generate a full suite of
phototooling, bare-board fabrication and test outputs, including Gerber 274x, NC
drill, and bare-board test in a variety of formats.

Das könnte Ihnen auch gefallen