Vous êtes sur la page 1sur 114


1. Abbreviations
2. Figures locations
3. Introduction
4. Block Diagram
5. Block Diagram Description
6. Schematic
7. Schematic Description
8. Hardware Components
9. Circuit Description
10. Software components
a. About Kiel
b. Embedded ‘C’
11. KEIL procedure description
12. Conclusion (or) Synopsis
13. Future Aspects
14. Bibliography

Symbol Name

MAM Memory accelerometer module

VIC Vectored interrupt controller

FIQ Fast interrupt request

PWM Pulse width modulation

GPIO General purpose input/output

UART Universal asynchronous receiver/transmitter

DLAB Data latch access bit

LCR Line control register

LSR Line status register

RDR Receiver data ready

SPI Serial peripheral interface

ADC Analog to digital converter

DAC Digital to analog converter

SSP Synchronous serial port

MOSI Master out slave in

RTC Real time clock

EINT External interrupt

DTR Data terminal ready

AHB Advanced high performance

ATLE Auto transfer length extraction

CTS Clear to send

RTS Request to send

DSR Data set ready

RI Ring indicator

An embedded system is a special-purpose system in which the computer is completely

encapsulated by or dedicated to the device or system it controls. Unlike a general-purpose
computer, such as a personal computer, an embedded system performs one or a few predefined
tasks, usually with very specific requirements. Since the system is dedicated to specific tasks,
design engineers can optimize it, reducing the size and cost of the product. Embedded systems
are often mass-produced, benefiting from economies of scale.
Personal digital assistants (PDAs) or handheld computers are generally considered
embedded devices because of the nature of their hardware design, even though they are more
expandable in software terms. This line of definition continues to blur as devices expand. With
the introduction of the OQO Model 2 with the Windows XP operating system and ports such as a
USB port — both features usually belong to "general purpose computers", — the line of
nomenclature blurs even more.
Embedded systems plays major role in electronics varies from portable devices to large
stationary installations like digital watches and MP3 players, traffic lights, factory controllers, or
the systems controlling nuclear power plants.
In terms of complexity embedded systems can range from very simple with a single
microcontroller chip, to very complex with multiple units, peripherals and networks mounted
inside a large chassis or enclosure.
Examples of Embedded Systems:
 Avionics, such as inertial guidance systems, flight control hardware/software and other
integrated systems in aircraft and missiles
 Cellular telephones and telephone switches
 Engine controllers and antilock brake controllers for automobiles
 Home automation products, such as thermostats, air conditioners, sprinklers, and security
monitoring systems
 Handheld calculators
 Handheld computers
 Household appliances, including microwave ovens, washing machines, television sets,
DVD players and recorders
 Medical equipment
 Personal digital assistant
 Videogame consoles
 Computer peripherals such as routers and printers.
 Industrial controllers for remote machine operation.

The existing system has the ability to yet lack the ability to control indoor humidity. Green
House Monitoring and storing the humidity inside a green house. This software uses an Android
mobile phone, connected using Wi-Fi to a central server which connects via serial
communication to a microcontroller and humidity sensor but here we are not measuring more
sensor values .


This project is designed to overcome the above mentioned disadvantages, using which the
environmental parameters in every greenhouse can be measured and controlled by
microcontroller remotely. Measuring of parameters like Humidity, Water pH, Soil wetness, Light
intensity and temperature is done by sensors. The Parameters settings can be made in two modes
i.e. by using push button keys or by GPRS communication mode remotely. A user can know the
greenhouse status or control the system at any time by sending the commands through the GPRS
technology. This data will be uploaded to cloud server.


In this project we required operating voltage for ARM controller board is 12V. Hence the 12V
D.C. power supply is needed for the ARM board . This regulated 12V is generated by stepping
down the voltage from 230V to 18V now the step downed a.c voltage is being rectified by the
Bridge Rectifier using 1N4007 diodes. The rectified a.c voltage is now filtered using a ‘C’ filter.
Now the rectified, filtered D.C. voltage is fed to the Voltage Regulator. This voltage regulator
provides/allows us to have a Regulated constant Voltage which is of +12V. The rectified; filtered
and regulated voltage is again filtered for ripples using an electrolytic capacitor 100μF. Now the
output from this section is fed to microcontroller board to supply operating voltage.

In this project the heart of the project is microcontroller. To implement this project we are
using the LPC2148 microcontroller. Here we are interfacing temperature sensor, ldr sensor and
gas sensor Here the microcontroller access the sensors information and sends the data to GPRS
WEB PAGE and it will check any abnormal conditions are detected automatically it will
switches the devices like if the temperature exceeds the threshold level automatically DC FAN
will switch on and low light detected automatically BULB will switched on and any gasses
detected automatically DC MOTOR will switched on











Power Supply: This section is meant for supplying Power to all the sections mentioned above. It
basically consists of a Transformer to step down the 230V ac to 9V ac followed by diodes. Here
diodes are used to rectify the ac to dc. After rectification the obtained rippled dc is filtered using
a capacitor Filter. A positive voltage regulator is used to regulate the obtained dc voltage.

Microcontroller: This section forms the control unit of the whole project. This section basically
consists of a Microcontroller with its associated circuitry like Crystal with capacitors, Reset
circuitry, Pull up resistors (if needed) and so on. The Microcontroller forms the heart of the
project because it controls the devices being interfaced and communicates with the devices
according to the program being written.

MAX 232: The microcontroller can communicate with the serial devices using its single Serial
Port. The logic levels at which this serial port operates is TTL logics. But some of the serial
devices operate at RS 232 Logic levels. For example PC and GSM etc. So in order to
communicate the Microcontroller with either GSM modem or PC, a mismatch between the Logic
levels occurs. In order to avoid this mismatch, in other words to match the Logic levels, a Serial
driver is used. And MAX 232 is a Serial Line Driver used to establish communication between
microcontroller and PC (or GSM)

LCD Display: This section is basically meant to show up the status of the project. This project
makes use of Liquid Crystal Display to display / prompt for necessary information.

Temperature sensor: Thermistors are a temperature sensing devise. It is used to sense the
temperature. In this project by depends on the value of temperature the exhaust fan will run.

GAS sensor: GAS sensor is used to detect any leakage of any hazardous gases such that an
alarm can be initiated to avoid any damages in the industries. These sensors are also used in
many applications like corporate and in any office work areas these are linked to fire alarms

GPRS: This section consists of a GPRS modem. The modem will communicate with
microcontroller using serial communication. The modem is interfaced to microcontroller using
MAX 232, a serial driver. The Global Packet Radio Service is a TDMA based digital wireless
network technology that is used for connecting directly to internet. GPRS module will help us to
post data in the web page directly.

LDR: The LDR is used to measure the light intensity.

Humidity sensor: Humidity sensor is a device that measures the relative humidity of in a given
area. A humidity sensor can be used in both indoors and outdoors. Humidity sensors are
available in both analog and digital forms.

DC Motor: DC motor is an output for this project. And DC motor is connected to

microcontroller. And this motor controlled by the microcontroller with the respective inputs
given by us. Its speed will be varied according to the speed set by the switches.

DC Fan: Dc fan is the output section. Dc fan needs dc supply. So we can directly add the dc motor
to micro controller with transistor logic.


In this project we required operating voltage for ARM controller board is 12V. Hence the 12V
D.C. power supply is needed for the ARM board . This regulated 12V is generated by stepping
down the voltage from 230V to 18V now the step downed a.c voltage is being rectified by the
Bridge Rectifier using 1N4007 diodes. The rectified a.c voltage is now filtered using a ‘C’ filter.
Now the rectified, filtered D.C. voltage is fed to the Voltage Regulator. This voltage regulator
provides/allows us to have a Regulated constant Voltage which is of +12V. The rectified; filtered
and regulated voltage is again filtered for ripples using an electrolytic capacitor 100μF. Now the
output from this section is fed to microcontroller board to supply operating voltage.

LCD is connected to port 1 P1.16 to 21.

TEMPARATURE sensor is connected P0.28.

LDR sensor is connected P0.29.

GAS sensor is connected P0.25

HUMIDITY sensor is connected P0.30.

BULB1 is connected P0.16.

BULB2 is connected P0.17.

FAN is connected P0.18

MOTOR is connected to P0.19


Microcontroller (LPC 2148):

ARM stands for Advanced RISC Machines. It is a 32 bit processor core, used for high
end application. It is widely used in Advanced Robotic Applications.

History and Development:

 ARM was developed at Acron Computers ltd of Cambridge, England between 1983 and
 RISC concept was introduced in 1980 at Stanford and Berkley.
 ARM ltd was found in 1990.
 ARM cores are licensed to partners so as to develop and fabricate new microcontrollers
around same processor cores.
Key features:
 16-bit/32-bit ARM7TDMI-S microcontroller in a tiny LQFP64 package.
 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 or full chip erase in 400 ms and programming of 256 bytes
in 1 ms.
 Embedded ICE RT and Embedded Trace interfaces offer real-time debugging with the
on-chip Real Monitor 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/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.
 60 MHz maximum CPU clock available from programmable on-chip PLL with settling
time of 100 μs.
 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.
Pin description:
Core Data path:
 Architecture is characterized by Data path and control path.
 Data path is organized in such a way that, operands are not fetched directly from memory
locations. Data items are placed in register files. No data processing takes place in
memory locations.
 Instructions typically use 3 registers. 2 source registers and 1 destination register.
 Barrel Shifter preprocesses data, before it enters ALU.
- Barrel Shifter is basically a combinational logic circuit, which can shift data to
left or right by arbitrary number of position in same cycle.
 Increment or Decrement logic can update register content for sequential access.

 In ARM 7, a 3 stage pipeline is used. A 3 stage pipeline is the simplest form of pipeline
that does not suffer from the problems such as read before write.
 In a pipeline, when one instruction is executed, second instruction is decoded and third
instruction will be fetched.
 This is executed in a single cycle.

Register Bank:
 ARM 7 uses load and store Architecture.
 Data has to be moved from memory location to a central set of registers.
 Data processing is done and is stored back into memory.
 Register bank contains, general purpose registers to hold either data or address.
 It is a bank of 16 user registers R0-R15 and 2 status registers.
 Each of these registers is 32 bit wide.

Data Registers- R0-R15:

 R0-R12 - General Purpose Registers
 R13-R15 - Special function registers of which,
 R13 - Stack Pointer, refers to entry pointer of Stack.
 R14 - Link Register, Return address is put to this when ever a subroutine is called.
 R15 - Program Counter
 Depending upon application R13 and R14 can also be used as GPR. But not commonly

In addition there are 2 status registers

 CPSR - Current program status register, status of current execution is stored.

 SPSR - Saved program Status register, includes status of program as well as processor.

CPSR contains a number of flags which report and control the operation of ARM7 CPU.

Conditional Code Flags

N - Negative Result from ALU
Z - Zero result from ALU
C - ALU operation carried out
V - ALU operation overflowed

Interrupt Enable Bits

I - IRQ, Interrupt Disable
F - FIQ, Disable Fast Interrupt

T- Bit
T=0, Processor in ARM Mode.
T=1, Processor in THUMB Mode

Mode Bits
Specifies the processor Modes. Processor Modes will be discussed in the next part of this


1. ARM Prime Cell™ Vectored Interrupt Controller

2. 32 interrupt request inputs
3. 16 vectored IRQ interrupts
4. 16 priority levels dynamically assigned to interrupt requests
5. Software interrupt generation.


 The Vectored Interrupt Controller (VIC) takes 32 interrupt request inputs and
programmably assigns them into 3 categories, FIQ, vectored IRQ, and non-vectored IRQ.
 The programmable assignment scheme means that priorities of interrupts from the
various peripherals can be dynamically assigned and adjusted.
 Fast Interrupt reQuest (FIQ) requests have the highest priority. If more than one request
is assigned to FIQ, the VIC ORs the requests to produce the FIQ signal to the ARM
 The fastest possible FIQ latency is achieved when only one request is classified as FIQ,
because then the FIQ service routine can simply start dealing with that device.
 But if more than one request is assigned to the FIQ class, the FIQ service routine can read
a word from the VIC that identifies which FIQ source(s) is (are) requesting an interrupt.
 Vectored IRQs have the middle priority, but only 16 of the 32 requests can be assigned to
this category.
 Any of the 32 requests can be assigned to any of the 16 vectored IRQ slots, among which
slot 0 has the highest priority and slot 15 has the lowest.
 Non-vectored IRQs have the lowest priority.
 The VIC ORs the requests from all the vectored and non-vectored IRQs to produce the
IRQ signal to the ARM processor. The IRQ service routine can start by reading a register
from the VIC and jumping there. If any of the vectored IRQs are requesting, the VIC
provides the address of the highest-priority requesting IRQs service routine, otherwise it
provides the address of a default routine that is shared by all the non-vectored IRQs.
 The default routine can read another VIC register to see what IRQs are active.
 All registers in the VIC are word registers. Byte and halfword reads and write are not
 Additional information on the Vectored Interrupt Controller is available in the ARM
Register description:

 16 byte Receive and Transmit FIFOs
 Register locations conform to ‘550 industry standard
 Receiver FIFO trigger points at 1, 4, 8, and 14 bytes
 Built-in fractional baud rate generator with autobauding capabilities.
 Mechanism that enables software and hardware flow control implementation

Pin description:

Register description:

 The VPB interface provides a communications link between the CPU or host and the
 The UART0 receiver block, U0RX, monitors the serial input line, RXD0, for valid input.
The UART0 RX Shift Register (U0RSR) accepts valid characters via RXD0. After a
valid character is assembled in the U0RSR, it is passed to the UART0 RX Buffer
Register FIFO to await access by the CPU or host via the generic host interface.

The UART0 transmitter block, U0TX, accepts data written by the CPU or host and buffers the
data in the UART0 TX Holding Register FIFO (U0THR). The UART0 TX Shift Register
(U0TSR) reads the data stored in the U0THR and assembles the data to transmit via the serial
output pin, TXD0

The UART0 Baud Rate Generator block, U0BRG, generates the timing enables used by the
UART0 TX block. The U0BRG clock input source is the VPB clock (PCLK). The main clock is
divided down per the divisor specified in the U0DLL and U0DLM registers. This divided down
clock is a 16x oversample clock, NBAUDOUT. The interrupt interface contains registers U0IER
and U0IIR. The interrupt interface receives several one clock wide enables from the U0TX and
U0RX blocks. Status information from the U0TX and U0RX is stored in the U0LSR. Control
information for the U0TX and U0RX is stored in the U0LCR


 UART1 is identical to UART0, with the addition of a modem interface.

 16 byte Receive and Transmit FIFOs
 Register locations conform to ‘550 industry standard
 Receiver FIFO trigger points at 1, 4, 8, and 14 bytes
 Built-in fractional baud rate generator with autobauding capabilities.
 Mechanism that enables software and hardware flow control implementation
 Standard modem interface signals included with flow control (auto-CTS/RTS) fully
supported in hardware (LPC2144/6/8 only).

Pin description:
Register description:


The VPB interface provides a communications link between the CPU or host and the UART1.
The UART1 receiver block, U1RX, monitors the serial input line, RXD1, for valid input. The
UART1 RX Shift Register (U1RSR) accepts valid characters via RXD1. After a valid character
is assembled in the U1RSR, it is passed to the UART1 RX Buffer Register FIFO to await access
by the CPU or host via the generic host interface The UART1 transmitter block, U1TX, accepts
data written by the CPU or host and buffers the data in the UART1 TX Holding Register FIFO
(U1THR). The UART1 TX Shift Register
U1TSR) reads the data stored in the U1THR and assembles the data to transmit via the serial
output pin, TXD1. The UART1 Baud Rate Generator block, U1BRG, generates the timing
enables used by the UART1 TX block. The U1BRG clock input source is the VPB clock
(PCLK). The main clock is divided down per the divisor specified in the U1DLL and U1DLM
registers. This divided down clock is a 16x oversample clock, NBAUDOUT The modem
interface contains registers U1MCR and U1MSR. This interface is responsible for handshaking
between a modem peripheral and the UART1. The interrupt interface contains registers U1IER
and U1IIR. The interrupt interface receives several one clock wide enables from the U1TX and
U1RX blocks.Status information from the U1TX and U1RX is stored in the U1LSR. Control
information for the U1TX and U1RX is stored in the U1LCR.

 10 bit successive approximation analog to digital converter (one in LPC2141/2 and two
in LPC2144/6/8).
 Input multiplexing among 6 or 8 pins (ADC0 and ADC1).
 Power-down mode.
 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 (LPC2144/6/8 only).


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.

Pin description:
Register description:

Hardware-triggered conversion:

If the BURST bit in the ADCR is 0 and the START field contains 010-111, the ADC will start a
conversion when a transition occurs on a selected pin or Timer Match signal. Th choices include
conversion on a specified edge of any of 4 Match signals, or conversion on a specified edge of
either of 2 Capture/Match pins. The pin state from the selected pad or the selected Match signal,
XORed with ADCR bit 27, is used in the edge detection logic


An interrupt request is asserted to the Vectored Interrupt Controller (VIC) when the DONE bit is
1. Software can use the Interrupt Enable bit for the A/D Converter in the VIC to control whether
this assertion results in an interrupt. DONE is negated when the ADDR is read.


 Measures the passage of time to maintain a calendar and clock.

 Ultra Low Power design to support battery powered systems
 Provides Seconds, Minutes, Hours, Day of Month, Month, Year, Day of Week, and Day
of Year
 Dedicated 32 kHz oscillator or programmable prescaler from VPB clock.
 Dedicated power supply pin can be connected to a battery or to the main 3.3 V


On, and optionally when it is off. It uses little power in Power-down mode. On the
LPC2141/2/4/6/8, the RTC can be clocked by a separate 32.768 KHz oscillator, or by a
programmable prescale divider based on the VPB clock. Also, the RTC is powered by it’s, which
can be connected to a battery or to the same 3.3 V supply used by the rest of the device.

Register description:

The RTC includes a number of registers. The address space is split into four sections by
functionality.The first eight addresses are the Miscellaneous Register Group(Section 19.4.2). The
second set of eight locations are the Time Counter Group(Section 19.4.12). The third set of eight
locations contain the Alarm Register Group(Section 19.4.14). The remaining registers control the
Reference Clock Divider. The Real Time Clock includes the register shown in Table 263.
Detailed descriptions of the registers follow.
RTC interrupts:

Interrupt generation is controlled through the Interrupt Location Register (ILR), Counter
Increment Interrupt Register (CIIR), the alarm registers, and the Alarm Mask Register (AMR).
Interrupts are generated only by the transition into the interrupt state. The ILR separately enables
CIIR and AMR interrupts. Each bit in CIIR corresponds to one of the time counters. If CIIR is
enabled for a particular counter, then every time the counter is Incremented an interrupt is
generated. The alarm registers allow the user to specify a date and time for an interrupt to be
generated. The AMR provides a mechanism to mask alarm Compares. If all nonmasked alarm
registers match the value in their corresponding time counter, then an interrupt is generated. The
RTC interrupt can bring the microcontroller out of power-down mode if the RTC is operating
from its own oscillator on the RTCX1-2 pins. When the RTC interrupt is enabled for wakeup and
its selected event occurs, XTAL1/2 pins associated oscillator wakeup cycle is started

Miscellaneous register group:

Clock Tick Counter Register (CTCR - 0xE002 4004):

The Clock Tick Counter is read only. It can be reset to zero through the Clock Control
Register (CCR). The CTC consists of the bits of the clock divider counter

Liquid crystal displays (LCDs) have materials, which combine the properties of both liquids and
crystals. Rather than having a melting point, they have a temperature range within which the
molecules are almost as mobile as they would be in a liquid, but are grouped together in an
ordered form similar to a crystal.

An LCD consists of two glass panels, with the liquid crystal material sand witched in between
them. The inner surface of the glass plates are coated with transparent electrodes which define
the character, symbols or patterns to be displayed polymeric layers are present in between the
electrodes and the liquid crystal, which makes the liquid crystal molecules to maintain a defined
orientation angle.

One each polarisers are pasted outside the two glass panels. These polarisers would rotate the
light rays passing through them to a definite angle, in a particular direction. When the LCD is in
the off state, light rays are rotated by the two polarisers and the liquid crystal, such that the light
rays come out of the LCD without any orientation, and hence the LCD appears transparent.

When sufficient voltage is applied to the electrodes, the liquid crystal molecules would be
aligned in a specific direction. The light rays passing through the LCD would be rotated by the
polarisers, which would result in activating/ highlighting the desired characters. The LCD’s are
lightweight with only a few millimeters thickness. Since the LCD’s consume less power, they
are compatible with low power electronic circuits, and can be powered for long durations.

The LCD’s don’t generate light and so light is needed to read the display. By using
backlighting, reading is possible in the dark. The LCD’s have long life and a wide operating
temperature range. Changing the display size or the layout size is relatively simple which makes
the LCD’s more customers friendly.

The LCDs used exclusively in watches, calculators and measuring instruments are the simple
seven-segment displays, having a limited amount of numeric data. The recent advances in
technology have resulted in better legibility, more information displaying capability and a wider
temperature range. These have resulted in the LCDs being extensively used in
telecommunications and entertainment electronics. The LCDs have even started replacing the
cathode ray tubes (CRTs) used for the display of text and graphics, and also in small TV

This section describes the operation modes of LCD’s then describe how to program and
interface an LCD to 8051 using Assembly and C.

LCD operation

In recent years the LCD is finding widespread use replacing LEDs (seven-segment LEDs or
other multisegment LEDs).This is due to the following reasons:

1. The declining prices of LCDs.

2. The ability to display numbers, characters and graphics. This is in contract to LEDs,
which are limited to numbers and a few characters.
3. Incorporation of a refreshing controller into the LCD, there by relieving the CPU of the
task of refreshing the LCD. In the contrast, the LED must be refreshed by the CPU to
keep displaying the data.
4. Ease of programming for characters and graphics.

LCD pin description

The LCD discussed in this section has 14 pins. The function of each pin is given in table.

TABLE 1: Pin description for LCD:

Pin Symbol I/O Description

1 Vss -- Ground

2 Vcc -- +5V power supply

3 VEE -- Power supply to control contrast

4 RS I RS=0 to select command register

RS=1 to select data register

5 R/W I R/W=0 for write

R/W=1 for read

6 E I/O Enable

7 DB0 I/O The 8-bit data bus

8 DB1 I/O The 8-bit data bus

9 DB2 I/O The 8-bit data bus

10 DB3 I/O The 8-bit data bus

11 DB4 I/O The 8-bit data bus

12 DB5 I/O The 8-bit data bus

13 DB6 I/O The 8-bit data bus

14 DB7 I/O The 8-bit data bus

TABLE 2: LCD Command Codes

Code Command to LCD Instruction

(hex) Register

1 Clear display screen

2 Return home

4 Decrement cursor

6 Increment cursor
5 Shift display right

7 Shift display left

8 Display off, cursor off

A Display off, cursor on

C Display on, cursor off

E Display on, cursor on

F Display on, cursor blinking

10 Shift cursor position to left

14 Shift cursor position to right

18 Shift the entire display to the left

1C Shift the entire display to the right

80 Force cursor to beginning of 1st line

C0 Force cursor to beginning of 2nd line

38 2 lines and 5x7 matrix


The LCDs used exclusively in watches, calculators and measuring instruments are the simple
seven-segment displays, having a limited amount of numeric data. The recent advances in
technology have resulted in better legibility, more information displaying capability and a wider
temperature range. These have resulted in the LCDs being extensively used in
telecommunications and entertainment electronics. The LCDs have even started replacing the
cathode ray tubes (CRTs) used for the display of text and graphics, and also in small TV
Sending commands and data to LCDs with a time delay:

Fig 21: Interfacing of LCD to a micro controller

To send any command from table 2 to the LCD, make pin RS=0. For data, make RS=1.Then
sends a high –to-low pulse to the E pin to enable the internal latch of the LCD.

The power supplies are designed to convert high voltage AC mains electricity to a suitable
low voltage supply for electronic circuits and other devices. A power supply can by broken
down into a series of blocks, each of which performs a particular function. A d.c power
supply which maintains the output voltage constant irrespective of a.c mains fluctuations or
load variations is known as “Regulated D.C Power Supply”. For example a 5V regulated
power supply system as shown below:

A transformer is an electrical device which is used to convert electrical power from one
Electrical circuit to another without change in frequency.

Transformers convert AC electricity from one voltage to another with little loss of power.
Transformers work only with AC and this is one of the reasons why mains electricity is AC.
Step-up transformers increase in output voltage, step-down transformers decrease in output
voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains
voltage to a safer low voltage. The input coil is called the primary and the output coil is called
the secondary. There is no electrical connection between the two coils; instead they are linked
by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in
the middle of the circuit symbol represent the core. Transformers waste very little power so the
power out is (almost) equal to the power in. Note that as voltage is stepped down current is
stepped up. The ratio of the number of turns on each coil, called the turn’s ratio, determines the
ratio of the voltages. A step-down transformer has a large number of turns on its primary (input)
coil which is connected to the high voltage mains supply, and a small number of turns on its
secondary (output) coil to give a low output voltage.

An Electrical Transformer

Turns ratio = Vp/ VS = Np/NS

Power Out= Power In

Vp = primary (input) voltage
Np = number of turns on primary coil
Ip = primary (input) current


A circuit which is used to convert a.c to dc is known as RECTIFIER. The process of conversion
a.c to d.c is called “rectification”


 Half wave Rectifier

 Full wave rectifier
1. Centre tap full wave rectifier.

2. Bridge type full bridge rectifier.

Comparison of rectifier circuits:

Type of Rectifier

Parameter Half wave Full wave Bridge

Number of diodes 1 2 4

PIV of diodes Vm 2Vm Vm

D.C output voltage Vm/ 2Vm/ 2Vm/

Vdc, at no-load 0.318Vm 0.636Vm 0.636Vm

Ripple factor 1.21 0.482 0.482

Ripple frequency f 2f 2f

Rectification efficiency 0.406 0.812 0.812

Transformer 0.287 0.693 0.812

Utilization Factor(TUF)

RMS voltage Vrms Vm/2 Vm/√2 Vm/√2

Full-wave Rectifier:

From the above comparison we came to know that full wave bridge rectifier as more advantages
than the other two rectifiers. So, in our project we are using full wave bridge rectifier circuit.
Bridge Rectifier: A bridge rectifier makes use of four diodes in a bridge arrangement to
achieve full-wave rectification. This is a widely used configuration, both with individual diodes
wired as shown and with single component bridges where the diode bridge is wired internally.

A bridge rectifier makes use of four diodes in a bridge arrangement as shown in fig (a) to
achieve full-wave rectification. This is a widely used configuration, both with individual diodes
wired as shown and with single component bridges where the diode bridge is wired internally.

Fig (A)


During positive half cycle of secondary, the diodes D2 and D3 are in forward biased while D1
and D4 are in reverse biased as shown in the fig(b). The current flow direction is shown in the
fig (b) with dotted arrows.

Fig (B)
During negative half cycle of secondary voltage, the diodes D1 and D4 are in forward biased
while D2 and D3 are in reverse biased as shown in the fig(c). The current flow direction is
shown in the fig (c) with dotted arrows.


A Filter is a device which removes the a.c component of rectifier output but allows the d.c
component to reach the load

Capacitor Filter:

We have seen that the ripple content in the rectified output of half wave rectifier is 121% or that
of full-wave or bridge rectifier or bridge rectifier is 48% such high percentages of ripples is not
acceptable for most of the applications. Ripples can be removed by one of the following
methods of filtering.

(a) A capacitor, in parallel to the load, provides an easier by –pass for the ripples voltage
though it due to low impedance. At ripple frequency and leave the d.c.to appears the load.

(b) An inductor, in series with the load, prevents the passage of the ripple current (due to high
impedance at ripple frequency) while allowing the d.c (due to low resistance to d.c)

(c) Various combinations of capacitor and inductor, such as L-section filter section filter,
multiple section filter etc. which make use of both the properties mentioned in (a) and (b)
above. Two cases of capacitor filter, one applied on half wave rectifier and another with full
wave rectifier.

Filtering is performed by a large value electrolytic capacitor connected across the DC supply to
act as a reservoir, supplying current to the output when the varying DC voltage from the
rectifier is falling. The capacitor charges quickly near the peak of the varying DC, and then
discharges as it supplies current to the output. Filtering significantly increases the average DC
voltage to almost the peak value (1.4 × RMS value).
To calculate the value of capacitor(C),
C = ¼*√3*f*r*Rl
f = supply frequency,
r = ripple factor,
Rl = load resistance
Note: In our circuit we are using 1000µF. Hence large value of capacitor is placed to reduce
ripples and to improve the DC component.

Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output
voltages. The maximum current they can pass also rates them. Negative voltage regulators are
available, mainly for use in dual supplies. Most regulators include some automatic protection
from excessive current ('overload protection') and overheating ('thermal protection'). Many of
the fixed voltage regulator ICs has 3 leads and look like power transistors, such as the 7805 +5V
1A regulator shown on the right. The LM7805 is simple to use. You simply connect the positive
lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin,
connect the negative lead to the Common pin and then when you turn on the power, you get a 5
volt supply from the output pin.

Fig 6.1.6 A Three Terminal Voltage Regulator


The Bay Linear LM78XX is integrated linear positive regulator with three terminals. The
LM78XX offer several fixed output voltages making them useful in wide range of applications.
When used as a zener diode/resistor combination replacement, the LM78XX usually results in
an effective output impedance improvement of two orders of magnitude, lower quiescent
current. The LM78XX is available in the TO-252, TO-220 & TO-263packages,


 Output Current of 1.5A

 Output Voltage Tolerance of 5%
 Internal thermal overload protection
 Internal Short-Circuit Limited
 No External Component
 Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V
 Offer in plastic TO-252, TO-220 & TO-263
 Direct Replacement for LM78XX

DC motors are configured in many types and sizes, including brush less, servo, and gear motor
types. A motor consists of a rotor and a permanent magnetic field stator. The magnetic field is
maintained using either permanent magnets or electromagnetic windings. DC motors are most
commonly used in variable speed and torque.

Motion and controls cover a wide range of components that in some way are used to generate
and/or control motion. Areas within this category include bearings and bushings, clutches and
brakes, controls and drives, drive components, encoders and resolves, Integrated motion control,
limit switches, linear actuators, linear and rotary motion components, linear position sensing,
motors (both AC and DC motors), orientation position sensing, pneumatics and pneumatic
components, positioning stages, slides and guides, power transmission (mechanical), seals, slip
rings, solenoids, springs.

Motors are the devices that provide the actual speed and torque in a drive system. This family
includes AC motor types (single and multiphase motors, universal, servo motors, induction,
synchronous, and gear motor) and DC motors (brush less, servo motor, and gear motor) as well
as linear, stepper and air motors, and motor contactors and starters.

In any electric motor, operation is based on simple electromagnetism. A current-carrying

conductor generates a magnetic field; when this is then placed in an external magnetic field, it
will experience a force proportional to the current in the conductor, and to the strength of the
external magnetic field. As you are well aware of from playing with magnets as a kid, opposite
(North and South) polarities attract, while like polarities (North and North, South and South)
repel. The internal configuration of a DC motor is designed to harness the magnetic interaction
between a current-carrying conductor and an external magnetic field to generate rotational

Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet or
winding with a "North" polarization, while green represents a magnet or winding with a "South"
Fig : Block Diagram of the DC motor

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field
magnet(s), and brushes. In most common DC motors (and all that Beamers will see), the external
magnetic field is produced by high-strength permanent magnets1. The stator is the stationary part
of the motor -- this includes the motor casing, as well as two or more permanent magnet pole
pieces. The rotor (together with the axle and attached commutator) rotates with respect to the
stator. The rotor consists of windings (generally on a core), the windings being electrically
connected to the commutator. The above diagram shows a common motor layout -- with the
rotor inside the stator (field) magnets.

The geometry of the brushes, commutator contacts, and rotor windings are such that when power
is applied, the polarities of the energized winding and the stator magnet(s) are misaligned, and
the rotor will rotate until it is almost aligned with the stator's field magnets. As the rotor reaches
alignment, the brushes move to the next commutator contacts, and energize the next winding.
Given our example two-pole motor, the rotation reverses the direction of current through the
rotor winding, leading to a "flip" of the rotor's magnetic field, and driving it to continue rotating.

In real life, though, DC motors will always have more than two poles (three is a very common
number). In particular, this avoids "dead spots" in the commutator. You can imagine how with
our example two-pole motor, if the rotor is exactly at the middle of its rotation (perfectly aligned
with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole motor, there is a
moment where the commutator shorts out the power supply (i.e., both brushes touch both
commutator contacts simultaneously). This would be bad for the power supply, waste energy,
and damage motor components as well. Yet another disadvantage of such a simple motor is that
it would exhibit a high amount of torque” ripple" (the amount of torque it could produce is cyclic
with the position of the rotor).

Fig: Block Diagram of the DC motor having two poles only

So since most small DC motors are of a three-pole design, let's tinker with the workings of one
via an interactive animation (JavaScript required):

Fig: Block Diagram of the DC motor having Three poles

You'll notice a few things from this -- namely, one pole is fully energized at a time (but two
others are "partially" energized). As each brush transitions from one commutator contact to the
next, one coil's field will rapidly collapse, as the next coil's field will rapidly charge up (this
occurs within a few microsecond). We'll see more about the effects of this later, but in the
meantime you can see that this is a direct result of the coil windings' series wiring:
Fig: Internal Block Diagram of the Three pole DC motor

There's probably no better way to see how an average dc motor is put together, than by just
opening one up. Unfortunately this is tedious work, as well as requiring the destruction of a
perfectly good motor. This is a basic 3-pole dc motor, with 2 brushes and three commutator

Relay is an electrically operated switch. Current flowing through the coil of the relay creates a
magnetic field which attracts a lever and changes the switch contacts. The coil current can be on
or off so relays have two switch positions and they are double throw (changeover) switches.

Relays allow one circuit to switch a second circuit which can be completely separate
from the first. For example a low voltage battery circuit can use a relay to switch a 230V AC
mains circuit. There is no electrical connection inside the relay between the two circuits; the link
is magnetic and mechanical.

The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it
can be as much as 100mA for relays designed to operate from lower voltages. Most ICs (chips)
cannot provide this current and a transistor is usually used to amplify the small IC current to the
larger value required for the relay coil. The maximum output current for the popular 555 timer
IC is 200mA so these devices can supply relay coils directly without amplification.

Relays are usually SPDT or DPDT but they can have many more sets of switch contacts,
for example relays with 4 sets of changeover contacts are readily available. For further
information about switch contacts and the terms used to describe them please see the page on

Most relays are designed for PCB mounting but you can solder wires directly to the pins
providing you take care to avoid melting the plastic case of the relay. The supplier's catalogue
should show you the relay's connections. The coil will be obvious and it may be connected either
way round. Relay coils produce brief high voltage 'spikes' when they are switched off and this
can destroy transistors and ICs in the circuit. To prevent damage you must connect a protection
diode across the relay coil.

The animated picture shows a working relay with its coil and switch contacts. You can
see a lever on the left being attracted by magnetism when the coil is switched on. This lever
moves the switch contacts. There is one set of contacts (SPDT) in the foreground and another
behind them, making the relay DPDT.

The relay's switch connections are usually labelled COM, NC and NO:

 COM = Common, always connect to this, it is the moving part of the switch.
 NC = Normally Closed, COM is connected to this when the relay coil is off.
 NO = Normally Open, COM is connected to this when the relay coil is on.
 Connect to COM and NO if you want the switched circuit to be on when the relay coil is
 Connect to COM and NC if you want the switched circuit to be on when the relay coil is

Choosing a relay

You need to consider several features when choosing a relay:

1. Physical size and pin arrangement If you are choosing a relay for an existing PCB you
will need to ensure that its dimensions and pin arrangement are suitable. You should find
this information in the supplier's catalogue.
2. Coil voltage the relay's coil voltage rating and resistance must suit the circuit powering
the relay coil. Many relays have a coil rated for a 12V supply but 5V and 24V relays are
also readily available. Some relays operate perfectly well with a supply voltage which is
a little lower than their rated value.
3. Coil resistance the circuit must be able to supply the current required by the relay coil.
You can use Ohm's law to calculate the current:
supply voltage
Relay coil current =
coil resistance

4. For example: A 12V supply relay with a coil resistance of 400 passes a current of
30mA. This is OK for a 555 timer IC (maximum output current 200mA), but it is too
much for most ICs and they will require a transistor to amplify the current.
5. Switch ratings (voltage and current) the relay's switch contacts must be suitable for the
circuit they are to control. You will need to check the voltage and current ratings. Note
that the voltage rating is usually higher for AC, for example: "5A at 24V DC or 125V
6. Switch contact arrangement (SPDT, DPDT etc).
Most relays are SPDT or DPDT which are often described as "single pole changeover"
(SPCO) or "double pole changeover" (DPCO). For further information please see the
page on switches

Protection diodes for relays

Transistors and ICs (chips) must be protected from the brief high voltage 'spike' produced when
the relay coil is switched off. The diagram shows how a signal diode (eg 1N4148) is connected
across the relay coil to provide this protection. Note that the diode is connected 'backwards' so
that it will normally not conduct. Conduction only occurs when the relay coil is switched off, at
this moment current tries to continue flowing through the coil and it is harmlessly diverted
through the diode. Without the diode no current could flow and the coil would produce a
damaging high voltage 'spike' in its attempt to keep the current flowing.
Reed relays

Reed relays consist of a coil surrounding a reed switch. Reed switches are normally operated
with a magnet, but in a reed relay current flows through the coil to create a magnetic field and
close the reed switch.

Reed relays generally have higher coil resistances than standard relays (1000 for example) and
a wide range of supply voltages (9-20V for example). They are capable of switching much more
rapidly than standard relays, up to several hundred times per second; but they can only switch
low currents (500mA maximum for example).

Relays and transistors compared

Like relays, transistors can be used as an electrically operated switch. For switching small DC
currents (< 1A) at low voltage they are usually a better choice than a relay. However transistors
cannot switch AC or high voltages (such as mains electricity) and they are not usually a good
choice for switching large currents (> 5A). In these cases a relay will be needed, but note that a
low power transistor may still be needed to switch the current for the relay's coil! The main
advantages and disadvantages of relays are listed below:

Advantages of relays:

 Relays can switch AC and DC, transistors can only switch DC.
 Relays can switch high voltages, transistors cannot.
 Relays are a better choice for switching large currents (> 5A).
 Relays can switch many contacts at once.

Disadvantages of relays:

 Relays are bulkier than transistors for switching small currents.

 Relays cannot switch rapidly (except reed relays), transistors can switch many times per
 Relays use more power due to the current flowing through their coil.
 Relays require more current than many chips can provide, so a low power transistor
may be needed to switch the current for the relay's coil.

LDRs or Light Dependent Resistors are very useful especially in light/dark sensor circuits.
Normally the resistance of an LDR is very high, sometimes as high as 1000 000 ohms, but when
they are illuminated with light resistance drops dramatically.

The general purpose photoconductive cell is also known as LDR – light dependent resistor. It is
a type of semiconductor and its conductivity changes with proportional change in the intensity
of light. The complete principle of an LDR is as follows. In a semiconductor an energy gap
exists between conduction electrons and valence electrons. As an LDR is also known as
semiconductor photo-conductive transducer, when light is incident on it, a photon is absorbed
and thereby it excites an electron from valence band into conduction band. Due to such new
electrons coming up in conduction band area, the electrical resistance of the device decreases.
Thus the LDR or photo-conductive transducer has the resistance which is the inverse function of
radiation intensity.


λ0 = threshold wavelength, in meters

e = charge on one electron, in Coulombs

Ew = work function of the metal used, in eV

Here we must note that any radiation with wavelength greater than the value obtained in above
equation CANNOT PRODUCE any change in the resistance of this device.

Construction of a Light Dependent Resistor: there two common types of materials used to
manufacture the photoconductive cells. They are Cadmium Sulphide (CdS) and Cadmium
Selenide (CdSe).

The band gap energy of Cadmium Sulphide is 2.42eV and for Cadmium Selenide it is 1.74eV.
Due to such large energy gaps, both the materials have extremely high resistivity at room
temperature. Hence, these materials are widely used in LDR for practical purpose.

A long, thin and narrow strip of CdS is fixed on the surface of ceramic substrate in the form of
zigzag wire as shown in following figure. This construction gives minimum area and maximum
length. Then the structure is enclosed in round metallic or plastic case and two terminals (made
up of either tin or indium) are taken out for external connections. The structure is covered with
glass sheet to protect it from moisture and dust and allows only light to fall on it.

Characteristics of photoconductive cells

Photoconductor Time Constant Spectral Band

Cadmium Sulphide CdS 100 milli sec 0.47 to 0.72 um

Cadmium Selenide CdSe 10 milli sec 0.6 to 0.77 um

Lead Sulphide PbS 410 micro sec 1 to 3.2 um

Lead Selenide PbSe 10.2 micro sec 1.52 to 4.2 um

Now when the device is dark, its resistance is called as dark resistance. This resistance is
typically of the order of 1013 ohms. When light falls on it, its resistance decreases up to several
kilo ohms or even hundreds of ohms, depending on the intensity of light, falling on it.

The spectral response characteristics of two commercial cells were compared in our laboratory.
And we found that there is almost no response to the radiation of a wavelength which was
shorter than 300nm. It was very interesting to note that the Cadmium Sulphide cell has a peak
response nearer or within the green color of the spectrum within a range of 520nm. Thus it can
be used nearer to the infra-red region up to 750nm. It was found that the maximum response of
Cadmium Sulphoselenide is in the yellow-orange range at 615nm and also it can be used in the
infra-red region up to about 970nm.

Mathematical analysis of photoconductive cell

The sensitivity of photoconductive transducer is defined as the ratio of change in resistance to

the proportional change in the irradiation level. Thus, the spectral response of the sensor must
match with the appropriate response from light source.

Mathematically –

Since the photoconductive cell has relatively large sensitive area, a small change in light
intensity will cause a large change in its resistance. Generally, all photoconductive cells show
the property of change in resistance in the ratio of 1000:1 for dark to light irradiance change of
0.005W/m2 to 50W/m2.

But it is also interesting to note that the the relation between irradiance and its resistance is
NOT LINEAR. It is actually exponential relationship, as follows –

Where, Rf = dark resistance in ohms

Ri = final resistance when light is incident on it

Rt = resistance at any time (t)

and τ = standard time constant

Though this all discussion sounds good for a photoconductive cell i.e. an LDR, it has a
disadvantage that when its temperature changes, its resistance changes drastically for a
particular light intensity. Hence, this device is NOT SUITABLE for precise measurements in
analog applications.


 It is used in burglar alarm to give alarming sound when a burglar invades sensitive
 It is used in street light control to switch on the lights during dusk (evening) and switch
off during dawn (morning) automatically.
 It is used in Lux meter to measure intensity of light in Lux.
 It is used in photo sensitive relay circuit.
Two cadmium sulphide (cds) photoconductive cells with spectral responses similar to that of the
human eye. The cell resistance falls with increasing light intensity. Applications include smoke
detection, automatic lighting control, and batch counting and burglar alarm systems.
Photoconductive cells are used in many different types of circuits and applications.

Electrical Characteristics:
Parameter Conditions Min Typ Max Unit

Cell resistance 1000 LUX - 400 - Ohm

10 LUX - 9 - K Ohm
Dark Resistance - - 1 - M Ohm
Dark Capacitance - - 3.5 - pF
Rise Time 1000 LUX - 2.8 - ms
10 LUX - 18 - ms

Fall Time 1000 LUX - 48 - ms

10 LUX - 120 - ms
Voltage AC/DC Peak - - 320 V max
Current - - 75 mA max
Power Dissipation 100 mW max
Operating 60 - +75 Deg. C


The sensitivity of a photo detector is the relationship between the light falling on the device and
the resulting output signal. In the case of a photocell, one is dealing with the relationship
between the incident light and the corresponding resistance of the cell.

The LM35 is an integrated circuit sensor that can be used to measure temperature with an
electrical output proportional to the temperature (in oC)

The LM35 - An Integrated Circuit Temperature Sensor

 You can measure temperature more accurately than a using a thermistor.

 The sensor circuitry is sealed and not subject to oxidation, etc.
 The LM35 generates a higher output voltage than thermocouples and may not require
that the output voltage be amplified.

Working of LM35:

 It has an output voltage that is proportional to the Celsius temperature.

 The scale factor is .01V/oC
 The LM35 does not require any external calibration or trimming and maintains an
accuracy of +/-0.4 oC at room temperature and +/- 0.8 oC over a range of 0 to +100 oC.
 Another important characteristic of the LM35DZ is that it draws only 60 micro amps
from its supply and possesses a low self-heating capability. The sensor self-heating
causes less than 0.1 oC temperature rise in still air.

The LM35 comes in many different packages, including the following.

 TO-92 plastic transistor-like package,
 T0-46 metal can transistor-like package
 8-lead surface mount SO-8 small outline package
 TO-202 package. (Shown in the picture above)

Circuit Connection:

 Here is a commonly used circuit. For connections refer to the picture above.
 In this circuit, parameter values commonly used are:
 Vc = 4 to 30v
 5v or 12 v are typical values used.
 Ra = Vc /10-6
 Actually, it can range from 80 K to 600 K , but most just use 80 K .

 Here is a photo of the LM 35 wired on a circuit board.

 The white wire in the photo goes to the power supply.
 Both the resistor and the black wire go to ground.
 The output voltage is measured from the middle pin to ground

Used in gas leakage detecting equipments for detecting of LPG, iso-butane, propane, LNG
combustible gases. The sensor does not get trigger with the noise of alcohol, cooking fumes and
cigarette smoke.


 Gas leak detection system

 Fire/Safety detection system
 Gas leak alarm
 Gas detector


 High sensitivity LPG, iso-butane, propane

 Small sensitivity to alcohol, smoke
 Fast response
 Wide detection range
 Stable performance and long life
 Simple drive circuit

Humidity is the amount of water vapor in the air. In daily language the term "humidity" is
normally taken to mean relative humidity. Relative humidity is defined as the ratio of the partial
pressure of water vapor in a parcel of air to the saturated vapor pressure of water vapor at a
prescribed temperature. Humidity may also be expressed as absolute humidity and specific
humidity. Relative humidity is an important metric used in forecasting weather. Humidity
indicates the likelihood of precipitation, dew, or fog. High humidity makes people feel hotter
outside in the summer because it reduces the effectiveness of sweating to cool the body by
preventing the evaporation of perspiration from the skin.

Absolute humidity

Absolute humidity is the quantity of water in a particular volume of air. The most common units
are grams per cubic meter, although any mass unit and any volume unit could be used.

Relative humidity

Relative humidity is defined as the ratio of the partial pressure of water vapor in a gaseous
mixture of air and water vapor to the saturated vapor pressure of water at a given temperature.
Relative humidity is expressed as a percentage.

Specific humidity

Specific humidity is the ratio of water vapor to air (including water vapor and dry air) in a
particular volume. Measuring and regulating humidity
A hygrometer is a device used for measuring the humidity of the air

There are various devices used to measure and regulate humidity. A device used to measure
humidity is called a psychrometer or hygrometer. A humidistat is used to regulate the humidity
of a building with a de-humidifier. These can be analogous to a thermometer and thermostat for
temperature control.

Humidity is also measured on a global scale using remotely placed satellites. These satellites are
able to detect the concentration of water in the troposphere at altitudes between 4 and 12
kilometers. Satellites that can measure water vapor have sensors that are sensitive to infrared
radiation. Water vapor specifically absorbs and re-radiates radiation in this spectral band.
Satellite water vapor imagery plays an important role in monitoring climate conditions (like the
formation of thunderstorms) and in the development of future weather forecasts.

Hygrometers are instruments used for measuring humidity. A simple form of a hygrometer is
specifically known as a "psychrometer" and consists of two thermometers, one of which
includes a dry bulb and the other of which includes a bulb that is kept wet to measure wet-bulb
temperature. Evaporation from the wet bulb lowers the temperature, so that the wet-bulb
thermometer usually shows a lower temperature than that of the dry-bulb thermometer, which
measures dry-bulb temperature. When the air temperature is below freezing, however, the wet
bulb is covered with a thin coating of ice and yet may be warmer than the dry bulb. Relative
humidity is computed from the ambient temperature as shown by the dry-bulb thermometer and
the difference in temperatures as shown by the wet-bulb and dry-bulb thermometers. Relative
humidity can also be determined by locating the intersection of the wet- and dry-bulb
temperatures on a psychrometric chart. One device that uses the wet/dry bulb method is the
sling psychrometer, where the thermometers are attached to a handle or length of rope and spun
around in the air for a few minutes.


Accurate calibration of the thermometers used is of course fundamental to precise humidity

determination by the wet-dry method; it is also important for the most accurate results to protect
the thermometers from radiant heat and ensure a sufficiently high speed of airflow over the wet
bulb. One of the most precise types of wet-dry bulb psychrometer was invented in the late 19th
century by Adolph Richard Aßmann in English-language references the device is usually
spelled "Assmann psychrometer." In this device, each thermometer is suspended within a
vertical tube of polished metal, and that tube is in turn suspended within a second metal tube of
slightly larger diameter; these double tubes serve to isolate the thermometers from radiant
heating. Air is drawn through the tubes with a fan that is driven by a clockwork mechanism to
ensure a consistent speed (some modern versions use an electric fan with electronic speed
control). According to Middleton, 1966, "an essential point is that air is drawn between the
concentric tubes, as well as through the inner one."

One solution sometimes used for accurate humidity measurement when the air temperature is
below freezing is to use a thermostatically-controlled electric heater to raise the temperature of
outside air to above freezing. In this arrangement, a fan draws outside air past (1) a thermometer
to measure the ambient dry-bulb temperature, (2) the heating element, (3) a second thermometer
to measure the dry-bulb temperature of the heated air, then finally (4) a wet-bulb thermometer.
According to the WMO Guide, "The principle of the heated psychrometer is that the water
vapor content of an air mass does not change if it is heated. This property may be exploited to
the advantage of the psychrometer by avoiding the need to maintain an ice bulb under freezing
conditions." . Since the humidity of the ambient air is calculated indirectly from three
temperature measurements, in such a device accurate thermometer calibration is even more
important than for a two-bulb configuration.

A sling psychrometer for outdoor use

Other types of hygrometers are also commonly used to determine the ambient humidity. Such
devices frequently use a human or animal hair under tension. The traditional folk art device
known as a "weather house" works on this principle. In order to see changes that occur over
time, several hygrometers record the value of humidity on a piece of graduated paper so that the
values can be read off the chart.


A digital humidity sensor works via two micro sensors that are calibrated to the relative humidity
of the given area. These are then converted into the digital format via an analog to digital
conversion process which is done by a chip located in the same circuit. A machine made
electrode based system made out of polymer is what makes up the capacitance for the sensor.
This protects the sensor from user front panel (interface).

Technical/Catalog Information 3610KL-04W-B10-D00

Vendor NMB Technologies Corporation

Category Fans, Thermal Management

Voltage - Rated 12VDC

Power (Watts) 0.88W

Bearing Type Ball

Size / Dimension Square - 92mm L x 92mm H x 25mm W

Air Flow 26.5 CFM (0.750m&sup3;/min)

Features -

Termination 2 Wire Leads

Fan Type Tubeaxial

Noise 25 dB

RPM 1750 RPM

Static Pressure 0.057 in H2O (14.2 Pa)

Weight 0.209 lb (94.8g)

Current Rating 73mA

Voltage Range 6 ~ 13.8VDC

Operating Temperature 14 ~ 158°F (-10 ~ 70°C)

Life Expectancy 70000 hrs @ 25°C

Lead Free Status Lead Free

RoHS Status RoHS Compliant

3610KL 04W B10 D00

Other Names P13415 ND


 Using of High-Precision Bearings

 Internal Sourcing of All Parts


Personal Computers (Desk top type/Note book type).

Communication Equipment.
Machine tools.
Portable amusements.
Copy machines.
Facsimile machines.

An embedded system is a special-purpose system in which the computer is

completely encapsulated by or dedicated to the device or system it controls.
Unlike a general-purpose computer, such as a personal computer, an embedded
system performs one or a few pre-defined tasks, usually with very specific
requirements. Since the system is dedicated to specific tasks, design engineers
can optimize it, reducing the size and cost of the product. Embedded systems are
often mass-produced, benefiting from economies of scale.

What is GSM

Global System for Mobile Communication (GSM) is a set of ETSI standards specifying the
infrastructure for a digital cellular service. The standard is used in approx. 85 countries in the
world including such locations as Europe, Japan and Australia1.

GSM Call Routing

Mobile Subscriber Roaming

When a mobile subscriber roams into a new location area (new VLR), the VLR automatically
determines that it must update the HLR with the new location information, which it does using
an SS7 Location Update Request Message. The Location Update Message is routed to the HLR
through the SS7 network, based on the global title translation of the IMSI that is stored within
the SCCP Called Party Address portion of the message. The HLR responds with a message that
informs the VLR whether the subscriber should be provided service in the new location.

Mobile Subscriber ISDN Number (MSISDN) Call Routing

When a user dials a GSM mobile subscriber's MSISDN, the PSTN routes the call to the Home
MSC based on the dialed telephone number. The MSC must then query the HLR based on the
MSISDN, to attain routing information required to route the call to the subscribers' current
The MSC stores global title translation tables that are used to determine the HLR associated with
the MSISDN. When only one HLR exists, the translation tables are trivial. When more than one
HLR is used however, the translations become extremely challenging; with one translation
record per subscriber (see the example below). Having determined the appropriate HLR address,
the MSC sends a Routing Information Request to it.

When the HLR receives the Routing Information Request, it maps the MSISDN to the IMSI, and
ascertains the subscribers' profile including the current VLR at which the subscriber is registered.
The HLR then queries the VLR for a Mobile Station Roaming Number (MSRN). The MSRN is
essentially an ISDN telephone number at which the mobile subscriber can currently be reached.
The MSRN is a temporary number that is valid only for the duration of a single call.

The HLR generates a response message, which includes the MSRN, and sends it back
across the SS7 network to the MSC. Finally, the MSC attempts to complete the call using the
MSRN provided

GSM (Global System for Mobile communication) is a digital mobile telephone system
that is widely used in many parts of the world. GSM uses a variation of Time Division Multiple
Access (TDMA) and is the most widely used of the three digital wireless telephone technologies
(TDMA, GSM, and CDMA). GSM digitizes and compresses data, then sends it down a channel
with two other streams of user data, each in its own time slot. GSM operates in the 900MHz,
1800MHz, or 1900 MHz frequency bands.

GSM has been the backbone of the phenomenal success in mobile telecoms over the
last decade. Now, at the dawn of the era of true broadband services, GSM continues to evolve to
meet new demands. One of GSM's great strengths is its international roaming capability, giving
consumers a seamless service. This has been a vital driver in growth, with around 300 million. In
the Americas, today's 7 million subscribers are set to grow rapidly, with market potential of 500
million in population, due to the introduction of GSM 800, which allows operators using the 800
MHz band to have access to GSM technology too.

GSM together with other technologies is part of an evolution of wireless mobile

telecommunication that includes High-Speed Circuit-Switched Data (HCSD), General Packet
Radio System (GPRS), Enhanced Data GSM Environment (EDGE), and Universal Mobile
Telecommunications Service (UMTS).

GSM security issues such as theft of service, privacy, and legal interception continue to raise
significant interest in the GSM community. The purpose of this portal is to raise awareness of
these issues with GSM security.

The mobile communications has become one of the driving forces of the digital revolution.
Everyday, millions of people are making phone calls by pressing a few buttons. Little is known
about how one person's voice reaches the other person's phone that is thousands of miles away.
Even less is known about the security measures and protection behind the system. The
complexity of the cell phone is increasing as people begin sending text messages and digital
pictures to their friends and family. The cell phone is slowly turning into a handheld computer.
All the features and advancements in cell phone technology require a backbone to support it. The
system has to provide security and the capability for growth to accommodate future
enhancements. General System for Mobile Communications, GSM, is one of the many solutions
out there. GSM has been dubbed the "Wireless Revolution" and it doesn't take much to realize
why GSM provides a secure and confidential method of communication.
Digital containers offer an alternative way of securely delivering content to consumers. They can
offer many advantages, particularly for content delivery over mobile phone networks:

 Scalability
 Micro transactions/Micro payments compatibility
 Content channel neutrality (heterogeneous networks, unicast /multicast/broadcast etc)
 Possibility of DRM
 Consumer anonymity
 Etc.

GSM Modems

A GSM modem can be an external modem device, such as the Wavecom FASTRACK Modem.
Insert a GSM SIM card into this modem, and connect the modem to an available serial port on
your computer.

A GSM modem can be a PC Card installed in a notebook computer, such as the Nokia Card

A GSM modem could also be a standard GSM mobile phone with the appropriate cable and
software driver to connect to a serial port on your computer. Phones such as the Nokia 7110
with a DLR-3 cable, or various Ericsson phones, are often used for this purpose.

A dedicated GSM modem (external or PC Card) is usually preferable to a GSM mobile phone.
This is because of some compatibility issues that can exist with mobile phones. For example, if
you wish to be able to receive inbound MMS messages with your gateway, and you are using a
mobile phone as your modem, you must utilize a mobile phone that does not support WAP push
or MMS. This is because the mobile phone automatically processes these messages, without
forwarding them via the modem interface. Similarly some mobile phones will not allow you to
correctly receive SMS text messages longer than 160 bytes (known as “concatenated SMS” or
“long SMS”). This is because these long messages are actually sent as separate SMS messages,
and the phone attempts to reassemble the message before forwarding via the modem interface.
(We’ve observed this latter problem utilizing the Ericsson R380, while it does not appear to be a
problem with many other Ericsson models.)

When you install your GSM modem, or connect your GSM mobile phone to the computer, be
sure to install the appropriate Windows modem driver from the device manufacturer. To
simplify configuration, the Now SMS/MMS Gateway will communicate with the device via this
driver. An additional benefit of utilizing this driver is that you can use Windows diagnostics to
ensure that the modem is communicating properly with the computer.

The Now SMS/MMS gateway can simultaneously support multiple modems, provided that your
computer hardware has the available communications port resources.

Fig:16 GSM smart modem



Analogic’s GSM Smart Modem is a multi-functional, ready to use, rugged and versatile modem
that can be embedded or plugged into any application. The Smart Modem can be customized to
various applications by using the standard AT commands. The modem is fully type-approved
and can directly be integrated into your projects with any or all the features of Voice, Data, Fax,
SMS, and Internet etc.

Smart Modem kit contain the following items:

Analogic’s GSM/GPRS Smart Modem

SMPS based power supply adapter.

3 dBi antenna with cable (optional: other types)

Data cable (RS232)

User Manual


The connectors integrated to the body, guarantee the reliable output and input connections. An
extractible holder is used to insert the SIM card (Micro-SIM type). Status LED indicates the
operating mode.

Fig 17: Block diagram of modem with key connections

Physical Characteristics

Dimensions 100 x 78 x 32 mm (excluding connectors)

Weight 125 grams
Housing Aluminum Profiled

Temperature Range:

Operating temperature: from -200C to +550C

Storage temperature: from -250C to +700C

Fig 18: Internal diagram of GSM modem

Installing the modem:

To install the modem, plug the device on to the supplied SMPS Adapter. For Automotive
applications fix the modem permanently using the mounting slots (optional as per your
requirement dimensions).

Inserting/ Removing the SIM Card:

To insert or Remove the SIM Card, it is necessary to press the SIM holder ejector button with
Sharp edged object like a pen or a needle. With this, the SIM holder comes out a little, then pulls
it out and insert or remove the SIM Card

Fig 19: Inserting/Removing the sim card into the modem

Make sure that the ejector is pushed out completely before accessing the SIM Card holder do not
remove the SIM card holder by force or tamper it (it may permanently damage). Place the SIM
Card Properly as per the direction of the installation. It is very important that the SIM is placed
in the right direction for its proper working condition

Connecting External Antenna:

Connect GSM Smart Modem to the external antenna with cable end with SMA male. The
Frequency of the antenna may be GSM 900/1800 MHz. The antenna may be ( 0 dbi, 3 dbi or
short length L-type antenna) as per the field conditions and signal conditions.

DC Supply Connection

The Modem will automatically turn ON when connection is given to it. The following is the
Power Supply Requirement:

Parameters MIN Avg Max

Supply Voltage 5V 9V 12 V
Peak Current at 5 V supply 1.8A(during
Average Current at 5 V supply in idle Mode 35 mA
Average Current at 5 V supply in idle Mode and RS232 13 mA
Power Saving Activated
Connecting Modem to external devices:

RS232 can be used to connect to the external device through the D-SUB/ USB (for USB model
only) device that is provided in the modem.


Connector Function
SMA RF Antenna connector
15 pin or 9 pin D-SUB RS232 link Audio link (only for 15 D-SUB) Reset (only for 15 D-
USB (optional) SUB) USB communication port (optional)
2 pin Phoenix tm Power Supply Connector
SIM Connector SIM Card Connection
RJ11 (For 9 D-SUB and Audio link Simple hand set connection (4 wire) 2 wire desktop
USB only) phone connection

Description of the interfaces:

The modem comprises several interfaces:

 LED Function including operating Status

 External antenna (via SMA)
 Serial and control link
 Power Supply (Via 2 pin Phoenix tm contact)
 SIM card holder

LED Status Indicator:

The LED will indicate different status of the modem:

OFF Modem Switched off

ON Modem is connecting to the network

Flashing Slowly Modem is in idle mode

Flashing rapidly Modem is in transmission/communication (GSM only)

9 - PIN D-SUB Female Connector

PIN NAME Designation Type

1 X None NC NC
2 TX Transmit Data Input
3 Rx Receive Data Output
4 DSR Data Set Ready Output
5 GND Ground Ground
6 DTR Data Terminal Ready Input
7 CTS Clear to send Output
8 RTS Request to send Input
9 X None NC NC

Protecting Modem:

Do not expose to the modem to extreme conditions such as High temperatures, direct sunlight,
High Humidity, Rain, Chemicals, Water, Dust etc. For these details see the specifications given.

Do not drop, Shake or hit the Modem. (Warranty may void)

The Modem should not be used in extreme vibrating conditions

Handle the Antenna and cable with care.

AT commands features:

Line settings:

A serial link handler is set with the following default values Autobaud, 8 bits data, 1 stop bit, no
parity, flow control.
Command line

Commands always start with AT (which means attention) and finish with a <CR> character.

Information responses and result codes

Responses start and end with <CR><LF>,.

If command syntax is incorrect, an ERROR string is returned.

If command syntax is correct but with some incorrect parameters, the +CME ERROR: <Err> or
+CMS ERROR: <SmsErr> strings are returned with different error codes.

If the command line has been performed successfully, an OK string is returned.

In some cases, such as “AT+CPIN?” or (unsolicited) incoming events, the product does not
return the OK string as a response.

Services provided by GSM

GSM was designed having interoperability with ISDN in mind, and the services provided by
GSM are a subset of the standard ISDN services. Speech is the most basic, and most important,
teleservice provided by GSM.

In addition, various data services are supported, with user bit rates up to 9600 bps. Specially
equipped GSM terminals can connect with PSTN, ISDN, Packet Switched and Circuit Switched
Public Data Networks, through several possible methods, using synchronous or asynchronous
transmission. Also supported are Group 3 facsimile service, videotex, and teletex. Other GSM
services include a cell broadcast service, where messages such as traffic reports, are broadcast to
users in particular cells.

A service unique to GSM, the Short Message Service, allows users to send and receive point-to-
point alphanumeric messages up to a few tens of bytes. It is similar to paging services, but much
more comprehensive, allowing bi-directional messages, store-and-forward delivery, and
acknowledgement of successful delivery.
Supplementary services enhance the set of basic teleservices. In the Phase I specifications,
supplementary services include variations of call forwarding and call barring, such as Call
Forward on Busy or Barring of Outgoing International Calls. Many more supplementary
services, including multiparty calls, advice of charge, call waiting, and calling line identification
presentation will be offered in the Phase 2 specifications.

Architecture of the GSM network

A GSM network is composed of several functional entities, whose functions and interfaces are
specified. Figure 1 shows the layout of a generic GSM network. The GSM network can be
divided into three broad parts. The Mobile Station is carried by the subscriber. The Base Station
Subsystem controls the radio link with the Mobile Station. The Network Subsystem, the main
part of which is the Mobile services Switching Center (MSC), performs the switching of calls
between the mobile users, and between mobile and fixed network users. The MSC also handles
the mobility management operations. Not shown are the Operations

A GSM network is composed of several functional entities, whose functions and interfaces are
specified. Figure 1 shows the layout of a generic GSM network. The GSM network can be
divided into three broad parts. Subscriber carries the Mobile Station. The Base Station
Subsystem controls the radio link with the Mobile Station. The Network Subsystem, the main
part of which is the Mobile services Switching Center (MSC), performs the switching of calls
between the mobile users, and between mobile and fixed network users. The MSC also handles
the mobility management operations. Not shown is the Operations intendance Center, which
oversees the proper operation and setup of the network. The Mobile Station and the Base Station
Subsystem communicate across the Um interface, also known as the air interface or radio link.
The Base Station Subsystem communicates with the Mobile services Switching Center across the
A interface.
Fig 20: General architecture of a GSM network

Mobile Station:

The mobile station (MS) consists of the mobile equipment (the terminal) and a smart card called
the Subscriber Identity Module (SIM). The SIM provides personal mobility, so that the user can
have access to subscribed services irrespective of a specific terminal. By inserting the SIM card
into another GSM terminal, the user is able to receive calls at that terminal, make calls from that
terminal, and receive other subscribed services.

The mobile equipment is uniquely identified by the International Mobile Equipment Identity
(IMEI). The SIM card contains the International Mobile Subscriber Identity (IMSI) used to
identify the subscriber to the system, a secret key for authentication, and other information. The
IMEI and the IMSI are independent, thereby allowing personal mobility. The SIM card may be
protected against unauthorized use by a password or personal identity number.

Base Station Subsystem:

The Base Station Subsystem is composed of two parts, the Base Transceiver Station (BTS) and
the Base Station Controller (BSC). These communicate across the standardized Abis interface,
allowing (as in the rest of the system) operation between components made by different

The Base Transceiver Station houses the radio transceivers that define a cell and handles the
radio-link protocols with the Mobile Station. In a large urban area, there will potentially be a
large number of BTSs deployed, thus the requirements for a BTS are ruggedness, reliability,
portability, and minimum cost.

The Base Station Controller manages the radio resources for one or more BTSs. It handles radio-
channel setup, frequency hopping, and handovers, as described below. The BSC is the
connection between the mobile station and the Mobile service Switching Center (MSC).

Network Subsystem

The central component of the Network Subsystem is the Mobile services Switching Center
(MSC). It acts like a normal switching node of the PSTN or ISDN, and additionally provides all
the functionality needed to handle a mobile subscriber, such as registration, authentication,
location updating, handovers, and call routing to a roaming subscriber. These services are
provided in conjunction with several functional entities, which together form the Network
Subsystem. The MSC provides the connection to the fixed networks (such as the PSTN or
ISDN). Signalling between functional entities in the Network Subsystem uses Signalling System
Number 7 (SS7), used for trunk signalling in ISDN and widely used in current public networks.

The Home Location Register (HLR) and Visitor Location Register (VLR), together with the
MSC, provide the call-routing and roaming capabilities of GSM. The HLR contains all the
administrative information of each subscriber registered in the corresponding GSM network,
along with the current location of the mobile. The location of the mobile is typically in the form
of the signaling address of the VLR associated with the mobile as a distributed database station.
The actual routing procedure will be described later. There is logically one HLR per GSM
network, although it may be implemented

The Visitor Location Register (VLR) contains selected administrative information from the
HLR, necessary for call control and provision of the subscribed services, for each mobile
currently located in the geographical area controlled by the VLR. Although each functional
entity can be implemented as an independent unit, all manufacturers of switching equipment to
date implement the VLR together with the MSC, so that the geographical area controlled by the
MSC corresponds to that controlled by the VLR, thus simplifying the signalling required. Note
that the MSC contains no information about particular mobile stations --- this information is
stored in the location registers.

The other two registers are used for authentication and security purposes. The Equipment
Identity Register (EIR) is a database that contains a list of all valid mobile equipment on the
network, where each mobile station is identified by its International Mobile Equipment Identity
(IMEI). An IMEI is marked as invalid if it has been reported stolen or is not type approved. The
Authentication Center (AuC) is a protected database that stores a copy of the secret key stored in
each subscriber's SIM card, which is used for authentication and encryption over the radio

Software used: Keil UVISION


It is possible to create the source files in a text editor such as Notepad, run the Compiler on each
C source file, specifying a list of controls, run the Assembler on each Assembler source file,
specifying another list of controls, run either the Library Manager or Linker (again specifying a
list of controls) and finally running the Object-HEX Converter to convert the Linker output file
to an Intel Hex File. Once that has been completed the Hex File can be downloaded to the target
hardware and debugged. Alternatively KEIL can be used to create source files; automatically
compile, link and covert using options set with an easy to use user interface and finally simulate
or perform debugging on the hardware with access to C variables and memory. Unless you have
to use the tolls on the command line, the choice is clear. KEIL Greatly simplifies the process of
creating and testing an embedded application.


The user of KEIL centers on “projects”. A project is a list of all the source files required to build
a single application, all the tool options which specify exactly how to build the application, and
– if required – how the application should be simulated. A project contains enough information
to take a set of source files and generate exactly the binary code required for the application.
Because of the high degree of flexibility required from the tools, there are many options that can
be set to configure the tools to operate in a specific manner. It would be tedious to have to set
these options up every time the application is being built; therefore they are stored in a project
file. Loading the project file into KEIL informs KEIL which source files are required, where
they are, and how to configure the tools in the correct way. KEIL can then execute each tool
with the correct options. It is also possible to create new projects in KEIL. Source files are
added to the project and the tool options are set as required. The project can then be saved to
preserve the settings. The project is reloaded and the simulator or debugger started, all the
desired windows are opened. KEIL project files have the extension


The simulator/ debugger in KEIL can perform a very detailed simulation of a micro controller
along with external signals. It is possible to view the precise execution time of a single
assembly instruction, or a single line of C code, all the way up to the entire application, simply
by entering the crystal frequency. A window can be opened for each peripheral on the device,
showing the state of the peripheral. This enables quick trouble shooting of mis-configured
peripherals. Breakpoints may be set on either assembly instructions or lines of C code, and
execution may be stepped through one instruction or C line at a time. The contents of all the
memory areas may be viewed along with ability to find specific variables. In addition the
registers may be viewed allowing a detailed view of what the microcontroller is doing at any
point in time.


About KeilARM:

1. Click on the Keil u Vision3 Icon on Desktop

2. The following fig will appear
3.Click on the Project menu from the title bar
4.Then Click on New Project
5.Save the Project by typing suitable project name with no extension in u r own folder sited
in either C:\ or D:\
6.Then Click on Save button above.
7.Select the component for u r project. i.e.NXP……
8.Click on the + Symbol beside of NXP
9.Select LPC2148 as shown below
10.Then Click on “OK”
11.The Following fig will appear
12.Then Click YES
13.Now your project is ready to USE
14.Now double click on the Target1, you would get another option “Source group 1” as
shown in next page.
15.Click on the file option from menu bar and select “new”
16.The next screen will be as shown in next page, and just maximize it by double clicking on its
blue boarder.
17.Now start writing program in either in “C” or “ASM”
18.For a program written in Assembly, then save it with extension “. asm” and for “C”
based program save it with extension “ .C”
19.Now right click on Source group 1 and click on “Add files to Group Source”
20.Now you will get another window, on which by default “C” files will appear
21.Now select as per your file extension given while saving the file
22.Click only one time on option “ADD”
23.Now Press function key F7 to compile. Any error will appear if so happen.
24.If the file contains no error, then press Control+F5 simultaneously.
25.The new window is as follows
26.Then Click “OK”

27.Now Click on the Peripherals from menu bar, and check your required port as shown in fig
29.Drag the port a side and click in the program file
29.Now keep Pressing function key “F11” slowly and observe.
30.You are running your program successfully

Flash Magic is a PC tool for programming flash based microcontrollers from NXP using a serial
or Ethernet protocol while in the target hardware. The figures below show how the baud rate is
selected for the microcontroller, how are the registers erased before the device is programmed.

Figure 4.4 Dumping of the code into Microcontroller

Figure 4.5 Dump process finished

If dumping process of the hex file is completed, then the controller will work as per our


AGRICULTURE” has been successfully designed and tested. Integrating features of all the
hardware components used have developed it. Presence of every module has been reasoned out
and placed carefully thus contributing to the best working of the unit. Secondly, using highly
advanced IC’s and with the help of growing technology the project has been successfully
[1]. ARM7TDMI datasheet ARM
[2]. LPC2119/2129/2194/2292/2294 User Manual Philips
[3]. ARM System on chip architecture Steve Furber
[4]. Architecture Reference Manual David Seal
[5]. ARM System developers guide Andrew N. Sloss,
Domonic Symes,
[6]. Chris Wright
[7]. Micro C/OS-II Jean J. Labrosse
GCC The complete reference Arthur Griffith

[1]. http://www.arm.com
[2]. http://www.philips.com
[3]. http://www.lpc2000.com
[4]. http://www.semiconductors.philips.com/
[5]. http://ieeexplore.ieee.org
[6]. http://ww.hitex.co.uk
[7]. http://www.keil.co.uk
[8]. http://www.ucos-ii.com
[9]. http://www.ristancase.com
[10]. http://gcc.gnu.org/onlinedocs/gcc/Evaluation Boards And Modules
[11]. http://www.knox.com