Sie sind auf Seite 1von 45

GROUP NO:19

ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

CHAPTER 1:
INTRODUCTION

1.1 Introduction
1.2 Generation of Idea of Project

E.C. BITS Edu Campus

Page 1

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

1.1 INTRODUCTION:
Multichannel data acquisition is a system based on acquiring real time data through sensors
and signal conditioning and the acquired data can be controlled through a remote location
using ARM 7.

1.2 GENERATION OF IDEA OF PROJECT:


Since our past few industrial visits we observed a common problem in a few automated
industries. As the industries are spanned over few acres, it becomes quite tedious for the
engineer to visit different ends of the industry and monitor data continuously. Though DAQ
systems are already used in such big industries we stumped upon the idea that we could build
an integrated system through which we could continuously monitor real time data using
ZIGBEE, instead of GSM and WIMAX which are costlier as compared to ZIGBEE. The
advancements we made to this DAQ system is that this system can be implemented with ease
by changing the sensor inputs and changing references.

E.C. BITS Edu Campus

Page 2

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

CHAPTER 2:
2.1 BRIEF HISTORY OF WORK DONE

E.C. BITS Edu Campus

Page 3

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

2.1 HISTORY OF WORK DONE:


In the beginning of our final year we visited several industries in search of IDP. After many
visits we finally confirmed our project with EMERTECH ELECTRONICS as our final year
IDP Company.

After deciding our final year project Multichannel data acquisition system we ran a
background survey that what exactly is DAQ system and how it is being implemented in
industries. We read many papers regarding DAQ systems and its implementation.

We also did a background research on the types sensors we can implement using ARM 7
and transmit with ease. We also studied in detail the pin description of ARM 7 and its inbuilt
ADCs through which we will interface our sensors.

E.C. BITS Edu Campus

Page 4

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

CHAPTER 3:
LITERATURE SURVEY

3.1 Literature Review


3.2 Overview of DAQ system

3.1 LITERATURE REVIEW:

E.C. BITS Edu Campus

Page 5

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

There are many on-going projects based on Data Acquisition System for Real Time data and
most of them are using 8 bit microcontroller, some also have used Peripheral Interrupt
Controller (PIC), but very few have used ARM. Mostly project have been conducted using
Bluetooth for wireless module but with no future expansion possible like addition of new
sensors.

89C51 microcontroller was also used for the sensor platform for smart wireless transmission
of temperature; here ZigBee is used to address the need of low power supply. Data is logged
every time it is received and a log is maintained in PC. This data is compared with threshold
value and if the value exceeds, it is changed.

On the other end, android based Bluetooth was used for the wireless sensor network, in
which a new approach based on gathering healthcare information using the mobile which is
interfaced with sensors and which can also store data in logs files was implemented .
Literature survey revealed that the drawback with the projects are that it cannot be expanded
with the recent trends in Embedded System in which there is a need to include new sensors
and new devices, so the best candidate for microcontroller would be ARM instead of 89C51
or PIC because it can be expanded with new sensors and with high speed and also high
sampling rate, the power efficiency plays an important role in embedded system, making it
portable. ARM has inbuilt 14 channel, ADC 10bit and it can detect even a 3.2mV change in
ADC input, and is highly precise and accurate.

The wireless network should be able to receive data continuously and also range should
be high, Bluetooth was not used since the range for Bluetooth is only 10m -15m whereas
ZigBee range is 20-30m and also ZigBee can have a maximum of 255 other ZigBee in a
single network while Bluetooth has only 8 devices in network.

3.2 OVERVIEW OF DAQ SYSTEM:


E.C. BITS Edu Campus

Page 6

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

Data acquisition is the process of sampling signals that measure real world physical
conditions and converting the resulting samples into digital numeric values that can be
manipulated

by

computer.

Data

acquisition

systems

(abbreviated

with

the

acronym DAS or DAQ) typically convert analog waveforms into digital values for
processing. The components of data acquisition systems include:

Sensors that convert physical parameters to electrical signals.

Signal conditioning circuitry to convert sensor signals into a form that can be
converted to digital values.

Analog-to-digital converters, which convert conditioned sensor signals to digital


values.

Data acquisition applications are controlled by software programs developed using various
general purpose programming languages such as BASIC C,etc.

Data acquisition begins with the physical phenomenon or physical property to be measured.
Examples of this include temperature, light intensity, gas pressure, fluid flow, and force.
Regardless of the type of physical property to be measured, the physical state that is to be
measured must first be transformed into a unified form that can be sampled by a data
acquisition system. The task of performing such transformations falls on devices
called sensors. A data acquisition system is a collection of software and hardware that lets
you measure or control physical characteristics of something in the real world. A complete
data acquisition system consists of DAQ hardware, sensors and actuators, signal conditioning
hardware, and a computer running DAQ software.

E.C. BITS Edu Campus

Page 7

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

CHAPTER 4:
HARDWARE OVERVIEW

4.1 BLOCK DIAGRAM


4.2 WORKING
4.3 COMPONENTS LIST

E.C. BITS Edu Campus

Page 8

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

Fig 4.1: Transmitter block diagram

The transmitter section consists of different sensors interfaced to the 10 bit ADC of ARM 7.
The sensors acquire real time data from the environment and through signal conditioning,
sends the data to ZigBee. The ZigBee then transmits the data to the Zigbee transmitter.
E.C. BITS Edu Campus

Page 9

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

Fig 4.2 : Receiver Block Diagram

The Zigbee receiver receives the data and sends the data to the PC, through a HyperTerminal
which is an emulation software to communicate between the devices.

E.C. BITS Edu Campus

Page 10

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

4.1 WORKING:

The sensors acquires data from the environment and converts into digital signals
through the process of signal conditioning to the microcontroller.

The microcontroller will process the incoming data from various sensors and sends it
to the Zigbee transmitter. The controller we are using for our project is Philips LPC
2148,it has 10 bit ADC with 12 channels. Hence we have the flexibility to interface
many sensors directly with the microcontroller. LPC 2148 has very fast data
processing rates.

The data from the controller is passed to the Zigbee transmitter. ZigBee has a defined
rate of 250 kbit/s, best suited for intermittent data transmissions from a sensor or input
device. It has very low power consumption and can transmit data from 10 to 100
meters range.

At the other end another Zigbee will receive the data and through a HyperTerminal
send the data to the computer. HyperTerminal is an emulation software used to
interface between devices and communicate.

The data will be seen at the computer screen. Data can be viewed and predetermined
action can be taken as per the data received e.g. if the reference value is set at 50
degree Celsius and the temperature sensor measures any value more than a necessary
action will be taken, in this case it might switching on a fan to reduce the temperature.

4.2 COMPONENT LIST:


1. ARM 7 development kit (LPC 2148)
E.C. BITS Edu Campus

Page 11

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

2. Zigbee transmitter and receiver


3. One DB9 connector
4. Sensors
Analog : temperature, gas detector , humidity, fire, etc.
Digital: voltage and hall sensor, etc.

E.C. BITS Edu Campus

Page 12

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

CHAPTER 5
HARDWARE DESCRIPTION
5.1 ARM 7 DESCRIPTION
5.2 PIN DESCRIPTION
5.3 ON CHIP ADC
5.4 ON CHIP DAC
5.5 RS 232 PORT
5.6 ZIGBEE
5.7 SENSORS

5.1 ARM 7 DESCRIPTION:

The LPC2141/42/44/46/48 microcontrollers are based on a 16-bit/32-bit ARM7TDMI-S CPU


with real-time emulation and embedded trace support, that combine the microcontroller with
E.C. BITS Edu Campus

Page 13

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

embedded high-speed flash memory ranging from 32 kB to 512 kB. A 128-bit wide memory
interface and a unique accelerator architecture enable 32-bit code execution at the maximum
clock rate. For critical code size applications, the alternative 16-bit Thumb mode reduces
code by more than 30 % with minimal performance penalty.

Due to their tiny size and low power consumption, LPC2141/42/44/46/48 are ideal for
applications where miniaturization is a key requirement, such as access control and point-ofsale. Serial communications interfaces ranging from a USB 2.0 Full-speed device, multiple
UARTs, SPI, SSP to I2C-bus and on-chip SRAM of 8 kB up to 40 kB, make these devices
very well suited for communication gateways and protocol converters, soft modems, voice
recognition and low end imaging, providing both large buffer size and high processing power.
Various 32-bit timers, single or dual 10-bit ADC(s), 10-bit DAC, PWM channels and 45 fast
GPIO lines with up to nine edge or level sensitive external interrupt pins make these
microcontrollers suitable for industrial control and medical systems.

5.1.1Memory
512K Flash Program Memory
32K+8K RAM Data Memory

5.1.2 Clock
12MHz crystal for maximum(5xPLL = 60MHz CPU clock) | 32 KHz RTC crystal

5.1.3 On-Board Peripherals

8 Nos. Point LEDs


8 Nos. Digital Input(Slide Switch)
4x4 Matrix Keypad
2X16 Character LCD with back Light
E.C. BITS Edu Campus

Page 14

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

4 Nos. 7-Segment Display (I2C)


2 Nos. Analog Input (Potentiometer)
Temperature Sensor
Stepper Motor Interface
2 Nos. of SPDT Relay
RTC with Batter-Backup
2 Nos. UART(RS232)
USB 2.0 device interface
Buzzer (Alarm)
PS/2 (keyboard interface)
Digital/Analog Output
Interrupts Study, Reset Button

5.1.4 Power

9-12V, AC/DC- Adaptors,Power form USB (+5V) (+3.3V, 800mA)

5.1.5 Connectors

JTAG (Programming/ Debugging)


D-SUB Connector (Serial Port, ISP)
40 PIN Expansion Connector
Ext Analog Input Connector

5.1.6 General Block Diagram

E.C. BITS Edu Campus

Page 15

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

Fig 5.1: General block diagram of ARM 7 LPC 2148

5.1.7 LPC2148 Processor Features

16-bit/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.

E.C. BITS Edu Campus

Page 16

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

8 kB to 40 kB of on-chip static RAM and 32 kB to 512 kB of on-chip flash memory.


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

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


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

USB 2.0 Full-speed compliant device controller with 2 kB of endpoint RAM. In


addition, the LPC2146/48 provides 8 kB of on-chip RAM accessible to USB by DMA.

One or two (LPC2141/42 vs. LPC2144/46/48) 10-bit ADCs provide a total of 6/14
analog inputs, with conversion times as low as 2.44 s per channel.

Single 10-bit DAC provides variable analog output (LPC2142/44/46/48 only).

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 (RTC) with independent power and 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 (VIC) with configurable priorities and vector addresses.

Up to 45 of 5 V tolerant fast general purpose I/O pins in a tiny LQFP64 package.

Up to 21 external interrupt pins available.

60MHz maximum CPU clock available from programmable on-chip PLL with
settling time of 100s.

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


MHz.

Power saving modes include Idle and Power-down.

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


for additional power optimization.

Processor wake-up from Power-down mode via external interrupt or BOD.

Single power supply chip with POR and BOD circuits:

CPU operating voltage range of 3.0 V to 3.6 V (3.3 V 10 %) with 5 V tolerant I/O
pads.

E.C. BITS Edu Campus

Page 17

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

5.2 PIN CONFIGURATION:

Fig 5.2: Pin diagram of LPC 2148

E.C. BITS Edu Campus

Page 18

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

5.2.1 Pin Description:


P0.0 to P0.31 I/O Port 0: Port 0 is a 32-bit I/O port with individual direction controls for each
bit. Total of 31 pins of the Port 0 can be used as a general purpose bidirectional digital I/Os
while P0.31 is output only pin. The operation of port 0 pins depends upon the pin function
selected via the pin connect block.
Pins P0.24, P0.26 and P0.27 are not available.
P0.0/TXD0/PWM119[1] I/O P0.0 General purpose input/output digital pin (GPIO).
O TXD0 Transmitter output for UART0.
O PWM1 Pulse Width Modulator output 1.
P0.1/RXD0/PWM3/EINT021[2] I/O P0.1 General purpose input/output digital pin
(GPIO).
I RXD0 Receiver input for UART0.
O PWM3 Pulse Width Modulator output 3.
I EINT0 External interrupt 0 input.
P0.2/SCL0/CAP0.022[3] I/O P0.2 General purpose input/output digital pin (GPIO).
I/O SCL0 I2C0 clock input/output. Open-drain output (for I2C-bus compliance).
I CAP0.0 Capture input for Timer 0, channel 0.P0.3/SDA0/MAT0.0/EINT1
26[3] I/O P0.3 General purpose input/output digital pin (GPIO).
I/O SDA0 I2C0 data input/output. Open-drain output (for I2C-bus compliance).
O MAT0.0 Match output for Timer 0, channel 0.
I EINT1 External interrupt 1 input.
P0.4/SCK0/CAP0.1/AD0.627[4] I/O P0.4 General purpose input/output digital pin
(GPIO).

E.C. BITS Edu Campus

Page 19

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

I/O SCK0 Serial clock for SPI0. SPI clock output from master or input to slave.
I CAP0.1 Capture input for Timer 0, channel 1.
I AD0.6 ADC 0, input 6.
P0.5/MISO0/MAT0.1/AD0.729[4] I/O P0.5 General purpose input/output digital pin
(GPIO).
I/O MISO0 Master In Slave Out for SPI0. Data input to SPI master or data output from
SPI slave.
O MAT0.1 Match output for Timer 0, channel 1.
I AD0.7 ADC 0, input 7.
P0.6/MOSI0/CAP0.2/AD1.030[4] I/O P0.6 General purpose input/output digital pin
(GPIO).
I/O MOSI0 Master Out Slave In for SPI0. Data output from SPI master or data input to
SPI slave.
I CAP0.2 Capture input for Timer 0, channel 2.
I AD1.0 ADC 1, input 0. Available in LPC2144/46/48 only.
P0.7/SSEL0/PWM2/EINT231[2] I/O P0.7 General purpose input/output digital pin
(GPIO).
I SSEL0 Slave Select for SPI0. Selects the SPI interface as a slave.
O PWM2 Pulse Width Modulator output 2.

E.C. BITS Edu Campus

Page 20

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

5.3On-Chip ADC
Basic clocking for the A/D converters is provided by the VPB clock. A programmable divider
is included in each converter, to scale this clock to the 4.5 MHz (max) clock needed by the
successive approximation process. A fully accurate conversion requires 11 of these clocks.
In ARM214X Kit, for testing on-board analog input, port lines P0.29 and P0.30 connected
through 10K potentiometer selected by jumpers. The signals P0.29 and P0.30 can be used as
general purpose pins if the analog inputs are not used and in this case the analog voltages can
easily be removed by removing the two jumpers on JP4 and JP5.

5.3.1 Features

10 bit successive approximation analog to digital converter (two in LPC2148).

Input multiplexing among 8 pins.

Power-down mode | Measurement range 0 to 3 V.

10 bit conversion time 2.44 s.

Burst conversion mode for single or multiple inputs.

Optional conversion on transition on input pin or Timer Match signal.

Global Start command for both converters (LPC2148 only).

On-Chip
ADC

ADC Inputs LPC2148

POT (R16)

AD0.2

P0.29

POT (R17)

AD0.3

P0.30

ADC Select

Table no 5.2: On Chip ADC of LPC 2148

E.C. BITS Edu Campus

Page 21

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

5.4 On-Chip Digital-to-Analog Converter (DAC)


DAC Features

10 bit digital to analog converter


Resistor string architecture
Buffered output
Power-down mode
Selectable speed vs. power

5.4.1 DAC Pin Description

table no 5.1: DAC pin description

5.4.2 Operation
Bits 19:18 of the PINSEL1 register, control whether the DAC is enabled and controlling the
state of pin P0.25/AD0.4/AOUT. When these bits are 10, the DAC is powered on and active.
The settling times noted in the description of the BIAS bit are valid for a capacitance load on
the AOUT pin not exceeding 100pF. A load impedance value greater than that value will
cause settling time longer than the specified time.

On-Chip DAC

DAC Output

LPC2148

JP12

Aout

P0.25

Table no 5.3: On Chip DAC of LPC 2148

E.C. BITS Edu Campus

Page 22

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

5.5 RS-232 Communication

RS-232 communication enables point-to-point data transfer. It is commonly used in


data acquisition applications, for the transfer of data between the microcontroller and a PC.

The voltage levels of a microcontroller and PC are not directly compatible with those
of RS-232, a level transition buffer such as MAX3232 be used.

LPC2148
UART DB-9 Processor
Connector

Lines

TXD-0

P0.0

ISP PGM

RXD-0

P0.1

UART1

TXD-1

P0.8

(P2)

RXD-1

P0.9

UART0(P1)

Serial Port Section

Table no 5.5: RS 232 Connector

5.6 ZIGBEE:
ZigBee is a specification for a suite of high-level communication protocols used to
create personal area networks built from small, low-power digital radios. ZigBee is based on
an IEEE 802.15 standard. Though its low power consumption limits transmission distances to
10100

meters line-of-sight,

depending

on

power

output

and

environmental

characteristics, ZigBee devices can transmit data over long distances by passing data through
a mesh network of intermediate devices to reach more distant ones. ZigBee is typically used
in low data rate applications that require long battery life and secure networking (ZigBee
networks are secured by 128 bit symmetric encryption keys.) ZigBee has a defined rate of
250 kbit/s, best suited for intermittent data transmissions from a sensor or input device.
Applications include wireless light switches, electrical meters with in-home-displays, traffic
management systems, and other consumer and industrial equipment that requires short-range
low-rate wireless data transfer. The technology defined by the ZigBee specification is
E.C. BITS Edu Campus

Page 23

GROUP NO:19
ACQUISITION BASED ON ARM 7

intended

to

be

simpler

and

MULTICHANNEL DATA

less

expensive

than

other wireless

personal

area

networks (WPANs), such as Bluetooth or Wi-Fi.


The transmitted data is received by ZigBee which is configured as router before reception
of any data. The received data is given to PC where it is displayed on GUI (graphical user
interface).The data received is also stored as database for future reference. The control Unit,
indicate that controlling action will happen at transmitter side and corresponding control
command word will be transmitted explicitly by the person on receiver side. Therefore the
system as whole can be classified into two design modules as, transmitter module which
having ARM 7 as a core controller and receiver module having computer along with GUI ,
based on software for display of acquired data by software tool Visual Basic 2010 developed
by Microsoft.
Transmit power:

1mW (0 dBm),

Receiver Sensitivity:

-92dBm,

Xigbee Current:

45mA (@3.3V),

RX Current:

50mA (@3.3 V),

Power down current :

< 10 A.

5.7 SENSORS:
The fast development of Embedded system has lead to the need to acquire the different data
and this paper present a system capable of interfacing 8 different sensors to sense the
environmental like temperature, humidity, carbon monoxide and ammonia concentration in
air (other parameters can also be sensed), This project uses Temperature sensor LM35-DZ to
measure ambient temperature, which has a range of 0 to 150 degree Celsius.
The temperature output by the sensor is interfaced with ARM 7 Development board, with
has inbuilt 10-channel 12bit ADC, which converts the analog value to 12bit digital data.

5.7.1 CURRENT SENSOR

E.C. BITS Edu Campus

Page 24

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

A current sensor is a device that detects and converts current to an easily measured output
voltage, which is proportional to the current through the measured path.
Current measurement is of vital importance in many power and instrumentation systems.
Traditionally, current sensing was primarily for circuit protection and control. However, with
the advancement in technology, current sensing has emerged as a method to monitor and
enhance performance.

Knowing the amount of current being delivered to the load can be useful for wide variety of
applications. Current sensing is used in wide range of electronic systems, viz., Battery life
indicators and chargers, 4-20 mA systems, over-current protection and supervising circuits,
current and voltage regulators, DC/DC converters, ground fault detectors, programmable
current sources, linear and switch-mode power supplies, communications devices ,
automotive power electronics, motor speed controls and overload protection, etc.

5.7.2 HUMIDITY SENSOR


Humidity sensor SY-HS-220 series is interfaced on the second ADC channel which gives
output in mV, which is directly proportional to the Relative Humidity.

E.C. BITS Edu Campus

Page 25

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

CHAPTER 6
SOFTWARE SPECIFICATIONS

6.1 LIST OF SOFTWARES


6.2 SOFTWARE DESCRIPTION

6.1LIST OF SOFTWARES USED:


1. PROTEUS 8 PROFESSIONAL
E.C. BITS Edu Campus

Page 26

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

2.FLASH MAGIC
3.KIEL MICROVISION

6.2DESCRIPTION:
6.2.1. PROTEUS 8 PROFESSIONAL

Fig 5: Proteus 8 Professional


The Proteus Design Suite is wholly unique in offering the ability to co-simulate both high and
low-level micro-controller code in the context of a mixed-mode SPICE circuit simulation.
With this Virtual System Modelling facility, you can transform your product design cycle,
reaping huge rewards in terms of reduced time to market and lower costs of development.
If one person designs both the hardware and the software then that person benefits as the
hardware design may be changed just as easily as the software design. In larger organisations
where the two roles are separated, the software designers can begin work as soon as the
schematic is completed; there is no need for them to wait until a physical prototype exists.
In short, Proteus VSM improves efficiency, quality and flexibility throughout the design
process..

E.C. BITS Edu Campus

Page 27

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

What is Proteus VSM?


Proteus Virtual System Modelling (VSM) combines mixed mode SPICE circuit simulation,
animated components and microprocessor models to facilitate co-simulation of complete
microcontroller based designs. For the first time ever, it is possible to develop and test such
designs before a physical prototype is constructed.
This is possible because you can interact with the design using on screen indicators such as
LED and LCD displays and actuators such as switches and buttons. The simulation takes
place in real time (or near enough to it): a 1GMHz Pentium III can simulate a basic 8051
system clocking at over 12MHz. Proteus VSM also provides extensive debugging facilities
including breakpoints, single stepping and variable display for both assembly code and high
level language source.

Circuit Simulation
At the heart of Proteus VSM is ProSPICE. This is an established product that combines uses a
SPICE3f5 analogue simulator kernel with a fast event-driven digital simulator to provide
seamless mixed-mode simulation. The use of a SPICE kernel lets you utilise any of the
numerous manufacturer-supplied SPICE models now available and around 6000 of these are
included with the package.

Proteus VSM includes a number of virtual instruments including an Oscilloscope, Logic


Analyser, Function Generator, Pattern Generator, Counter Timer and Virtual Terminal as well
as simple voltmeters and ammeters. In addition, we provide dedicated Master/Slave/Monitor
mode protocol analysers for SPI and I2C - simply wire them onto the serial lines and monitor
or interact with the data live during simulation. Should you wish to take detailed
measurements on graphs, or perform other analysis types such as frequency, distortion, noise
or sweep analyses of analogue circuits, you can purchase the Advanced Simulation Option.
This option also includes Conformance Analysis - a unique and powerful tool for Software
Quality Assurance.

E.C. BITS Edu Campus

Page 28

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

Co-Simulation of Microcontroller Software


The most exciting and important feature of Proteus VSM is its ability to simulate the
interaction between software running on a microcontroller and any analog or digital
electronics connected to it.
The micro-controller model sits on the schematic along with the other elements of your
product design. It simulates the execution of your object code (machine code), just like a real
chip. If the program code writes to a port, the logic levels in circuit change accordingly, and if
the circuit changes the state of the processor's pins, this will be seen by your program code,
just as in real life.
The VSM CPU models fully simulate I/O ports, interrupts, timers, USARTs and all other
peripherals present on each supported processor. It is anything but a simple software
simulator since the interaction of all these peripherals with the external circuit is fully
modelled down to waveform level and the entire system is therefore simulated.
VSM can even simulate designs containing multiple CPUs, since it is a simple enough matter
to place two or more processors on a schematic and wire them together.

Source Level Debugging


Whilst Proteus VSM is already unique in its capabililty to run near real time simulations of
complete micro-controller systems, its real power comes from its ability to perform these
simulations in single step mode. This works just like your favourite software debugger,
except that as you single step the code, you can observe the effect on the entire design including all the electronics external to the microcontroller.

E.C. BITS Edu Campus

Page 29

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

In addition to traditional debugging where you set one or breakpoints in your source and then
step the code when they are triggered, Proteus allows you to set breakpoints on the schematic
so that a hardware condition can trigger a breakpoint. Whenever it is the case that a problem
is identifiable on the hardware using hardware breakpoints is ideal to track down the issue.
For example, if malformed characters were appearing on the LCD display setting a hardware
breakpoint on the busy line would be a good place to start investigating.

6.2.2. FLASH MAGIC:

Fig 6.1: Flash Magic


Flash Magic is a tool which used to program hex code in EEPROM of micro-controller. it is a
freeware tool. It only supports the micro-controller of Philips and NXP. You can burn a hex
code into these controller which supports ISP (in system programming) feature. To check
whether your micro-controller supports ISP or not take look at its datasheet. So if your device
supports ISP then you can easily burn a hex code into EEPROM of your device.
The procedure to program code memory is very easy and needs only five steps to configure
Flash magic for better operation. Flash magic use Serial or Ethernet protocol to program the
flash of device. Below is the screenshot of flash magic.

E.C. BITS Edu Campus

Page 30

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

Fig 6.2 : Loading of programme through flash magic

6.2.3 KIEL MICROVISION:


The Micro-Vision IDE is a Windows-based software development platform that combines a
robust editor, project manager, and makes facility. Micro-Vision integrates all tools including
the C compiler, macro assembler, linker/locator, and HEX file generator.

Fig 6.3: Kiel Microvision 3


E.C. BITS Edu Campus

Page 31

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

It helps expedite the development process of your embedded applications by providing the
following:

Full-featured source code editor .


Device database for configuring the development tool setting .
Project manager for creating and maintaining your projects .
Integrated make facility for assembling, compiling, and linking your embedded

applications .
Dialogs for all development tool settings.
True integrated source-level Debugger with high-speed CPU and peripheral simulator
Flash programming utility for downloading the application program into Flash ROM,

Links to development tools manuals, device datasheets & users guides.


The Micro-Vision IDE offers numerous features and advantages that help you quickly
and successfully develop embedded applications.

CHAPTER 7:
RESULT AND TESTING
E.C. BITS Edu Campus

Page 32

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

7.1 INITIAL TESTING AND SIMULATION


7.2 INTERFACING LCD WITH LPC2148
7.3 SOURCE CODE

7.1 INITIAL TESTING AND SIMULATION:


7.1.1 Testing the LCD Module with LPC2148
By giving +3.3V power supply to LPC2148 Primer Board; the LCD is connected with
microcontroller LPC2148 Primer Board. When the program is downloading into LPC2148 in
Primer Board, the screen should shows the predetermined text messages.
7.1.2 ARM7 LPC2148 Primer Board
The ARM7 LPC2148 Primer board is specifically designed to help students to master the
required skills in the area of embedded systems. The kit is designed in such way that all the
possible features of the microcontroller will be easily used by the students. The kit supports
in

system

programming

(ISP)

which

is

done

through

serial

port.

7.1.3 LCD (Liquid Crystal Display)


Liquid Crystal Display also called as LCD is very helpful in providing user interface as well
as for debugging purpose. A liquid crystal display (LCD) is a flat panel display that uses the
E.C. BITS Edu Campus

Page 33

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

light modulating properties of liquid crystals (LCs). LCD Modules can present textual
information to user.
7.1.4 Interfacing LCD
The 2x16 character LCD interface card with supports both modes 4-bit and 8-bit interface,
and also facility to adjust contrast through trim pot. In 4-bit interface 7 lines needed to create
4-bit interface; 4 data bits (D0 D3), three control lines, address bit (RS), read/write bit
(R/W) and control signal (E).

Fig 7.1: LCD interfacing with LPC2148


7.2 Interfacing 4 bit LCD with LPC2148
The ARM7 LPC2148 board has seven numbers of LCD connections are needed to create 4bit interface; connected with 4 data bits (P0.19 P0.22, D4-D7), address bit (RS-P0.16),
read/write bit (R/W-P0.17) and control signal (E-P0.18) to make LCD display.
Pin Assignment with LPC2148

E.C. BITS Edu Campus

Page 34

GROUP NO:19
ACQUISITION BASED ON ARM 7
LCD
MODULE

LPC2148
LINES

RS

P0.16

RW
CONTRO
L
E

DATA
LINES

MULTICHANNEL DATA

2x16 LCD Selection

P0.17
P0.18

D0-D3

NC

D4

P0.19

D5

P0.20

D6

P0.21

D7

P0.22

Table

Make switch SW28 to LCD label marking


position

7.1:

Assignment with LPC2148

Circuit Diagram to Interface 4 bit LCD with LPC2148

Fig 7.2: 4-bit LCD interfacing with LPC 2148

E.C. BITS Edu Campus

Page 35

no
Pin

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

Fig 7.3 : proteus simulation

7.3 Source Code


The Interfacing 4 bit LCD with LPC2148 program is very simple and straight forward, which
display a text in 2 X 16 LCD module using 4 data lines only.
7.3.1 C Program to display a text in 4 bit LCD using LPC2148

#include <lpc214x.h>
#include <stdio.h>
#define RS 0x10000
#define RW 0x20000
#define EN 0x40000

void lcd_cmd (unsigned char);


E.C. BITS Edu Campus

Page 36

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

void lcd_data (unsigned char);


void lcd_initialize (void);
void lcd_display (void);
void LCD4_Convert(unsigned char);

const unsigned char cmd[4] = {0x28,0x0c,0x06,0x01};


unsigned char msg[] = {">PS-Primer 2148<"};
unsigned char msg1[]= {":: LCD Demo! ::"};

void main()
{
PINSEL1 = 0;
IODIR0 = 0xFF << 16;
lcd_initialize();
lcd_display();
while(1);
}

void delay(unsigned int n)


{

E.C. BITS Edu Campus

Page 37

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

unsigned int i,j;


for(i=0;i<n;i++)
for(j=0;j<12000;j++);
}

void lcd_cmd(unsigned char data)


{
IOCLR0 |= RS;

//0x1000;

IOCLR0 |= RW;

//0x2000;

//RS
//RW

LCD4_Convert(data);
}

void lcd_initialize(void)
{
int i;
for(i=0;i<4;i++)
{
IOCLR0 = 0xF << 19;

//IOCLR 0/1

lcd_cmd(cmd[i]);
delay(15);

E.C. BITS Edu Campus

Page 38

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

}
}

void lcd_data (unsigned char data)


{
IOSET0 |= RS;

//0x1000;

//RS

IOCLR0 |= RW;

//0x2000;

//RW

LCD4_Convert(data);
}

void lcd_display (void)


{
char i;
lcd_cmd(0x80);
delay(15);
i=0;
while(msg[i]!='\0')
{
delay(5);
lcd_data(msg[i]);

E.C. BITS Edu Campus

Page 39

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

i++;
}

delay(15);
lcd_cmd(0xc0);
delay(15);
i=0;

while(msg1[i]!='\0')
{
delay(5);
lcd_data(msg1[i]);
i++;
}
delay(15);
}

void LCD4_Convert(unsigned char c)


{
if(c & 0x80) IOSET0 = 1 << 22; else IOCLR0 = 1 << 22;

E.C. BITS Edu Campus

Page 40

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

if(c & 0x40) IOSET0 = 1 << 21; else IOCLR0 = 1 << 21;
if(c & 0x20) IOSET0 = 1 << 20; else IOCLR0 = 1 << 20;
if(c & 0x10) IOSET0 = 1 << 19; else IOCLR0 = 1 << 19;
IOSET0 = EN;
delay(8);
IOCLR0 = EN;

if(c & 0x08) IOSET0 = 1 << 22; else IOCLR0 = 1 << 22;
if(c & 0x04) IOSET0 = 1 << 21; else IOCLR0 = 1 << 21;
if(c & 0x02) IOSET0 = 1 << 20; else IOCLR0 = 1 << 20;
if(c & 0x01) IOSET0 = 1 << 19; else IOCLR0 = 1 << 19;

IOSET0 = EN;
delay(8);
IOCLR0 = EN;
}

To compile the above C code you need the KEIL software. They must be properly set up and
a project with correct settings must be created in order to compile the code. To compile the
above code, the C file must be added to the project.

E.C. BITS Edu Campus

Page 41

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

In Keil, you want to develop or debug the project without any hardware setup. You must
compile the code for generating HEX file. In debugging Mode, you want to check the port
output without microcontroller Board.
The Flash Magic software is used to download the hex file into your microcontroller through
UART0.

CHAPTER 8
CONCLUSION AND FUTURE EXPANSION

E.C. BITS Edu Campus

Page 42

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

8.1 CONCLUSION
8.2 FUTURE EXPANSION

8.1CONCLUSION
The Data Acquisition and logger system designed here integrates a data acquisition system
which is designed around ARM 7 MCU (microcontroller unit) and Visual Basic application.
The combination of the two proves very beneficial in analysis. Each has unique peculiarities
which is utilized together to give best performance required. Field related to automation,
acquisition and networking will be best suited and perfectly matched by ARM Cortex
solutions. The low cost MCU based design makes system affordable to the industries. The
visual basics platform interfaces with the ARM i.e. data acquisition system. These tools
available with it prove very beneficial in developing applications faster and easier. An
administrator can monitor and control the equipment with a simple but enhanced and more
powerful user interface without additional hardware.

8.2 FUTURE EXPANSION


E.C. BITS Edu Campus

Page 43

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

Our project has the flexibility that the required sensors can be changed according to the
requirements of the user. Using ARM 7 has high data processing rates. And other Zigbee
configurations can be use to in long distance remote data transmission.

REFERENCES

Patel Hiren et al, (IJCSIT) International Journal of Computer Science and


Information Technologies, Vol. 3 (1), 2012, 3199-3204 Arm Details.

Vivek Kumar Sehgal,Nitin,Durg Singh Chauhan,Rohit Sharma, Smart wireless


Temeperature Data Loggers Using IEEE 802.15.15.4/ZigBee Protocol

International Journal of Applied Engineering Research, ISSN 0973-4562, Vol. 8,


No. by Rai Suresh Jaishankar, Narayankar Sonal Ramachandra

Embedded systems-Raj Kamal

Websites:

www.google.com/patents

E.C. BITS Edu Campus

Page 44

GROUP NO:19
ACQUISITION BASED ON ARM 7

MULTICHANNEL DATA

www.wikipedia.com
www.engineersgarage.com
www.sourcecodes.com
www.mcus.com/arm7

E.C. BITS Edu Campus

Page 45

Das könnte Ihnen auch gefallen