Download GSM Based Temperature Monitoring System GSM Based

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

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

Document related concepts

Variable-frequency drive wikipedia , lookup

Pulse-width modulation wikipedia , lookup

Alternating current wikipedia , lookup

Rectifier wikipedia , lookup

Voltage optimisation wikipedia , lookup

Integrating ADC wikipedia , lookup

Control system wikipedia , lookup

Schmitt trigger wikipedia , lookup

Mains electricity wikipedia , lookup

Analog-to-digital converter wikipedia , lookup

Power electronics wikipedia , lookup

Metadyne wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Surge protector wikipedia , lookup

Buck converter wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Opto-isolator wikipedia , lookup

Transcript
GSM Based Temperature Monitoring System
GSM Based Temperature Monitoring System
By
Sujadevi.S.
DeepuDevaraj
Guided by
Mr. Asni.H.
Mrs. Sumol
Elby Basil
ABSTRACT
In recent years industrial automation and control systems are an integral part of an industry
and hence the project temperature monitoring system is an important system in this state of affairs.
TMS aims at monitoring the temperature statistics in a factory, room etc, and controlling
peripheral systems. It uses embedded technology from Intel Corporation and built for application in
highly sensitive and critical systems.
Through the system we try to bring down the overhead involved in monitoring the
temperature statistics in various fields such as factory, air condition areas etc. With the obvious and
immediate usage as a system controller it is a complete implementation of dynamic system
management.
The system is aimed to meet the following prerequisites:
•
To sense the temperature
•
To display the temperature
•
To display the date and time
•
To set temperature limits
•
To control the connected systems
•
To save the history of limit crossings
Advantages
In a dynamic scenario wherein the breed and nature of real time systems are subjected to
promising changes TMS is aimed at adding the fundamental functionality of interfacing them with
varying ambience enabling them to be stable and reliable.
GSM Based Temperature Monitoring System
BLOCK DIAGRAM:
Temperature
Transducer 1
Level
Translator
2 Channel
ADC
------ * -----Display
■t
M cro
Cont roller
Temperature
Transducer 2
DC Power
Supply
AC Source
Department of Electronics and Communication. SNGCE, Kolenchery
w
GSM
Module
GSM
Channel
I
GSM Based Temperature Monitoring System
CIRCUIT DIAGRAM:
ycc
CONNECTOR DB9
PI 0/T2
PO.O/ADO
P1.1/T2-EX
PO 1/AD1
P1 2
P0.2/AD2
PI.3
PO 3/AD3
PI 4/SS
P0.4/AD4
P1.S/MOSI
P0.5/AD5
PI 6/M1SO
P0.6/AD6
PO 11 AD 7
PI 7/SCK
P2 0/A8
P3 7/RD
P2 1/A9
P2 2/A10
P3 6/WR
P2 3/A11
P3 5/T1
P2 4/A12
P3 4/TO
P2.5/A13
P3 3/iHJJ
P2 6/A14
P3 2/INTO
P2.7/A15
RST
ALg/PROG
EA/VPP
XTAL2
P3 0/RXD
P3 1/TXD
XTAL1
Department of Electronics and Communication. SNGCE, Kolenchery
Z
GSM Based Temperature Monitoring System
BLOCK DIAGRAM DESCRIPTION
SIGNAL CONITIONING CIRCUIT: Signal conditioning circuit consists of two temperature transducers and an Analog to
Digital Converter. The transducer converts the temperature to proportional electrical signal.
The Temperature sensor used here is LM35 which has a resolution of
1 ° Celsius.
ANALOG TO DIGITAL CONVERTER:
An 8 Channel ADC is used since there is more than one sensor output that should be
converted into digital format before feeding to the Micro Controller.
INTERFACING OF GSM UNIT: Interfacing of GSM unit through a serial communication link with
microcontroller 89S51. Whatever data is to be sent to GSM unit is done through this RS 232
link.
LEVEL TRASLATOR: Level translator Translates TTL voltage level to RS-232 compatible level. It
is realized with MAX 232.
GSM Based Temperature Monitoring System
SIGNAL CONDITIONING CIRCUIT:
Signal conditioning is widely used in the word of data acquisition. Signal
conditioning circuit have two parts- two temperature transducers and an analog to digital
converter.
Transducer Section (Temperature Sensor) LM 35:
VCC
LM35D
1—A
+VS g VOUT
Transducers convert physical data such as temperature, light intensity, flow
and speed to electrical signals. Depending on the transducer the output produced is in the
form of voltage, current, resistance or capacitance.
The temperature transducers convert temperature into electrical parameters,
e.g.: thermistor, thermocouple. A thermistor responds to temperature change by changing
resistance but its response is not linear. Simple and widely used temperature sensors include
the LM 34 and LM 35 series.
The LM 35 series sensors are 3 pin precision integrated circuit temperatures
whose output voltage is linearly proportional to the Celsius (centigrade) temperature. The
LM35 thus has an advantage over linear temperature sensors calibrated in 0 Kelvin, as the
user is not required to subtract a large constant voltage from its output to obtain convenient
Centigrade scaling. The LM35 does not require any external calibration or trimming to
provide typical accuracies of ±1/4°C at room temperature and ±3/4°C over a full -55 to
+150°C temperature range. It can be used with single power supplies, or with plus and minus
supplies. As it draws only 60 uA from its supply, it has very low self-heating, less than 0.1
°C in still air.
Features:
> Calibrated directly in ° Celsius (Centigrade)
> Linear + 10.0 mV/°C scale factor
> Rated for full -55° to +150°C range
GSM Based Temperature Monitoring System
> Suitable for remote applications
> Operates from 4 to 30 volts
> Less than 60 uA current drain
Analog to Digital Converter 0808:
vcc
vcc
+VS
GND
+VS
GND
VOUT
LM35D
VOUT
LM35D
Analog to digital converters are among the most widely used devices for data
acquisition. Microcontrollers use binary (discrete) values, but in the physical world
everything is analog (continuous). Here the output of LM 35 is an analog signal in the form
of voltage. Therefore, we need an analog to digital converter to translate the analog voltage
to digital form so that the microcontroller can read and process them.
An 8 Channel ADC is used since there is more than one sensor output that should be
converted into digital format before feeding to the Micro Controller.
GSM Based Temperature Monitoring System
Both the sensor outputs are fed to the two different channels of ADC 0808.The channels are
selected using the select pins which are controlled according to the signals from micro
controller.
The ADC0808 is a monolithic CMOS device with an 8-bit Analog-to-Digital
converter, 8-channel multiplexer and microprocessor compatible control logic. The 8-bit A/D
converter uses successive approximation as the conversion technique. The converter features
a high impedance chopper stabilized comparator, a 256R voltage divider with analog switch
tree and a successive approximation register. . The 8-channel multiplexer can directly access
any of 8-single-ended analog signals. The device eliminates the need for external zero and full
scale adjustments. Easy interfacing to microprocessors is provided by the latched and decoded
multiplexer address inputs. The ADC0808 offers high speed, high accuracy, minimal
temperature dependence, excellent long-term accuracy and repeatability, and consumes
minimal power. These features make this device ideally suited to applications from process
and machine control to consumer and automotive applications.
In ADC 0808. Vref (+) and Vref (-) set the reference voltage. If Vref (-) =
GND and Vref-(+) = 5V, the step size is 5v/256 = 19.53mv. Therefore to set a lOmv step size
we need to set Vref (+) = 2.56v and Vref (-) = GND. SC is for Start Conversion. SC is the
same as the WR pins in other chips. EOC is for End Of Conversion and OE is for Output
Enable (READ). The EOC and OE are the same as INTR and RD pins respectively.
The ADC 0808 has no self clocking. So the clock must be provided from an
external source to the CLK pin. Although the speed of conversion depends on the frequency
of the clock connected to the CLK pin, it cannot be faster than lOOmicrosecs.
GSM Based Temperature Monitoring System
Timing diagram
3C
0U1PJT
t<lH.( '
'iOC
f
<
>
Features:
> Easy interface to all microprocessors
> 8-channel multiplexer with address logic
> OV to 5V input range with single 5V power supply
> Outputs meet TTL voltage level specifications
> Resolution 8 Bits
> Single Supply 5 VDC
> Conversion Time 100 ms
CLOCK GENERATOR:
An astable multivibrator using IC 555 is used here for providing the clock
signals. The frequency of the clock signal is 500Hz. NE 555 is a timer IC configured as the
frequency running oscillator provides the clock for ADC. It is basically switching circuit that has
two distinct output levels. As a result the circuit continuously switches back and forth between
two unstable states. In other words, circuit oscillates and output is a periodic rectangular
waveform. Since neither output
GSM Based Temperature Monitoring System
state is stable, then circuit is said to be astable and is often referred to as free running or
astable multivibrator.
V„ +5V
O/P CLK
In the circuit, the capacitor, the timing capacitor is charged towards +Vcc
through Rl and R2. The charging time Tl is given as
T1=0.693(R1+R2)C1.
This is the time during which output is high. The timing capacitor CI is then
discharged towards GND through the resistor R2. The discharge time T2 is gives as
T2=0.693R2.C1
This is the time during which the time is low. The period T of the oscillating clock is
the sum of Tl and T2. Thus
T= Tl+T2= 0.693(R1+2R2).C1
The frequency oscillation is then found as
F=1/T=1.44/(R1+2R2)C
GSM Based Temperature Monitoring System
MICROCONTROLLER 89S51:
The AT89S51 is a low-power, high-performance CMOS 8-bit
microcontroller with 4K bytes of downloadable Flash programmable and erasable read-only
memory. The on-chip downloadable Flash allows the program memory to be reprogrammed
In-System through an SPI serial interface or by a conventional nonvolatile memory
programmer. The AT89S51 provides the following standard features: 4K bytes of
downloadable Flash. 128 bytes of RAM, 32 I/O lines, programmable watchdog timer, two
data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full
duplex serial port. In addition, the AT89S51 is designed with static logic for operation down
to zero frequency and supports two software selectable power saving modes. The Idle Mode
stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to
continue functioning. The Power-down mode saves the RAM contents but freezes the
oscillator, disabling all other chip functions until the next external interrupt or hardware reset.
Features:
> 4K Bytes of In-System Reprogrammable Downloadable Flash Memory
> 4V to 6V Operating Range
> Fully Static Operation: 0 Hz to 24 MHz
> 128 x 8-bit Internal RAM
> 32 Programmable I/O Lines
> Three 16-bit Timer/Counters
> SPI Serial Interface
AT 89S51 Serial Programming
The microcontroller AT 89S51 can be programmed in both serial mode and parallel
mode. The Serial programming was carried out as it does not required extra burning module.
The serial programming of AT 89S51 is done using the personal computer, through the
printer port. The AT89S51 in its serial mode programming mode is shown in the figure.
GSM Based Temperature Monitoring System
P
AD DR.
QOOOB'FFF AO - A7
A8-A11
AT89S
P I 0-P1.7
5
P2.0 - P2.3
P2.6 P2.7
PGM
DATA
PG
ALE
PROG
P 3 3 P3.6
H
SEE FLASH
PRCGRA'vlMINCH
MODES TABLE
P3..7
XTAL2
XTAL I
GND
EA
P3.0
RST
PS EN
RDY/
BSY
3-33 MHz
The microcontroller AT 89S51 is serially programmed using the software ATMEL
ISP Flash Programmer Version 3.0 through the printer port of the computer.
Serial Programming Algorithm
To program and verify the AT89S52 in the serial programming mode, the following
sequence is recommended:
1. Power-up sequence: Apply power between VCC and GND pins. Set RST pin to "H". If a
crystal is not connected across pins XTAL1 and XTAL2, apply a 3 MHz to 33 MHz clock to
XTAL1 pin and wait for at least 10 milliseconds.
2. Enable serial programming by sending the Programming Enable serial instruction to pin
MOSI/P1.5. The frequency of the shift clock supplied at pin SCK/P1.7 needs to be less than
the CPU clock at XTAL1 divided by 16.
3. The Code array is programmed one byte at a time by supplying the address and data
together with the appropriate Write instruction. The write cycle is self timed and typically
takes less than 1 ms at 5V.
4. Any memory location can be verified by using the Read instruction which returns the
content at the selected address at serial output MISO/P1.6.
5. At the end of a programming session, RST can be set low to commence normal device
operation.
;i' ..................
GSM Based Temperature Monitoring System
The connection diagram with the pins of the serial port for serial
programming of AT 89S51 is as shown in the figure below
«2;ad: |J«S/AIC
O ». K
fO?IA0?
P3SRKC
e<0
10
"if-*
'•ii
«.2
(!•■}
msa
I
*S1
I*
VCC
nans
~3r
1"
V
HfcStt
T
Drawn by Kidiit sirichcts, kswictutikmitl.ac th
A n i l 's ISP Voafct! c6.">*wx
LIQUID CRYSTAL DISPLAY:
Liquid state have been called the fourth state of matter(after solids, liquids and gases)
because they have certain crystal properties normally found in solids, yet flow like liquids.
Unlike LEDs and other electronic devices, LCDs do not generate light energy, but simply
alter or control existing light to make selected areas appear bright or dark.
There are two fundamental ways in which liquid crystal are used to control properties
of light and therefore after its appearance. In the dynamic scattering method, the molecules
of the liquid crystal acquire a random orientation by virtue of an extremely applied electric
potential. As a result light passing through the material is reflected in many different
directions and has a bright frosty appearance as it emerges.
■
In the absorption method the molecules are oriented in such a way that then after the
polarization of light passing through the material. Polarizing filters are used 2 absorb or pass
the light depending on the polarization it has given, so light is visible only in those regions
where it cam emerge from the filter.
GSM Based Temperature Monitoring System
In recent years, LCD is finding wide spread use of replacing LEDs. This is due to the
following reasons:
1. The declining prices of LCDs.
2. The ability to display numbers, characteristics and graphics. This is in contrast to
LEDs which are limited to numbers and a few characteristics.
3. In corporation of a refreshing controller into the LCD, thereafter relieving the CPU
of the task of refreshing the LCD. In contrast, the LED must be refreshed by the
CPU to keep displaying the date.
4. Ease of programming for characteristics and graphics.
LCD INTERFACE:
vcc
The connection of LCD with microprocessor is shown in the figure.
The 8-bit data pins, D0-D7, are used to send information to the LCD or read the
contents of the LCDs internal registers. To display letters and numbers, we send ASCII
codes for the letters A-Z, a-z and numbers 0-9 to these pins while making RS=1( to select
data registers).
There are also instruction command codes that can be sent to the LCD to clear the
display or force the cursor to the home position or blink the cursor.
We also use RS=l(to select command register) to check the flag bit if the LCD is ready to
receive information. The flag is D7 and can be read when R/W=l and ■ RS=0. When D7=l
(flag=l), the LCD is taking care of internal operation and will not accept any new
information. When D7=0, the LCD is ready to receive new information.
;i' ...................
GSM Based Temperature Monitoring System
RS 232 INTERFACE:
5V
C
BYPASS = 1 U'F
1
ci
1
uf
4
C2 — 1 MF
From CMOS or TTL <",
I
I,
| ^ ..........................
16
3
5
11
10
12
C 3 t ^ 1 uF
'CC
C1 +
„..:... + 8 5
v
C1-
..... - ......... ► -3.5 V
C2+
C4'X^ 1 u F
C2-
9
14 EIA-232 Output EIA-232
To CMOS or TTL <.
1, *"
Output EIA-232 input
13 EIA-232 Input
0
JT
V
I 15
GND
Serial port is harder to interface than parallel port. In most cases, any device you
connect to serial port will need the serial transmission converted back to parallel so that it can
be used. This can be done using a UART. On the software side of things, there are many
more registers that you have to attend then on a standard parallel port (SPP). Serial cables can
be longer than parallel cables. They also do not need as many wires as parallel transmission.
RS 232 stands for Recommended Standard 232. RS 232 is the most widely used
serial I/O interfacing standard. This standard is used in PCs and numerous types of
equipment.
In RS 232, a l is represented by -3 to -25V while a 0 is represented by +3 to
+25V,making -3 to +3 undefined where as a serial port transmits a 0 as 0V and l as 5V. This
standard was set long before the advent of the TTL family, its input and output voltage levels
are not TTL compatible. For this reason to connect any RS 232 to a microcontroller system
we must use voltage converts such as MAX 232 to convert the TTL logic levels to the RS 232
levels and vice versa.
GSM Based Temperature Monitoring System
MAX 232:
The 8051 has two pins that are used specifically for transferring and receiving data
serially. These two pins are TxD and RxD which are TTL compatible. Therefore this
requires a line driver to make their RS 232 compatible. One such line driver is the MAX 232
chip from maximum co-orperation.the MAX 232 converts from RS 232 voltage levels to
TTL voltage levels and vice versa. One advantage of the MAX 232 chip is that it uses a +5V
power source which is the same source voltage for the 8051. In other words with a single
+5v power supplies we can power both 8051 and MAX 232, with no need for the dual
power supplies that are common in many older systems.
The MAX 232 has two sets of line drivers for transferring and receiving data. The
line drivers used for TxD are called Tl and T2 which the line drivers for RxD are designated
as Rland R2. In many applications only one of each is used. Here also used only one set of
transmitter and receiver Tl and Rl.MAX 232 requires four capacitors ranging from 1 to
22microF.the most widely used value for these capacitors is 22microF.
GSM Based Temperature Monitoring System
GSM EQUIPMENT:
Introduction to GSM:
GSM (Global System for Mobile Communications) is world's most famous Mobile
platform. Mobile phones with SIM cards use GSM technology to help you communicate
with your family, friends and business associates.
GSM systems have following advantages over basic land line telephony systems:
1. Mobility
2. Easy availability
3. High uptime
We use communication feature of Telephone landlines for internet, e-mail, data
connectivity, remote monitoring, computer to computer communication, security systems. In
the same way we can use GSM technology and benefit from its advantages.
Uses GSM technology for following applications:
1. Access control devices: Access control devices can communicate with servers
and security staff through SMS messaging. Complete log of transaction is available at the
head-office Server instantly without any wiring involved and device can instantly alert
security personnel on their mobile phone in case of any problem.
2. Transaction terminals: EDC (Electronic Data Capturing) machines can use
SMS messaging to confirm transactions from central servers. The main benefit is that central
server can be anywhere in the world.
3. Supply Chain Management: With a central server in your head office with
GSM capability, you can receive instant transaction data from all your branch offices,
warehouses and business associates with nil downtime and low cost.
GSM UNIT:
The GSM Modem supports popular "AT" command set so that users can develop
applications quickly. The product has SIM card holder to which activated SIM card is
inserted for normal use. The power to this unit can be given from UPS to provide
uninterrupted operation. This product provides great feasibility for devices in remote location
to stay connected which otherwise would not have been possible where telephone line do not
exist.
"AT" COMMANDS:
GSM Based Temperature Monitoring System
AT commands, also called Hayes AT commands, are based on the Hayes Modem de
facto standard, ATTENTION Commands for modems. They are used to communicate with
your modem. These commands modify your modem's behaviour or instruct the modem to do
something specific, such as dialling a telephone number. The "AT" refers to getting the
Attention of your modem.
To send a command to modem, we need to start a terminal program such as
Windows Hyper Terminal .No matter which terminal program you use, it should be
configured to communicate with the COM port that your modem is attached to. You then
type commands in the Terminal window. The modem executes the command and responds
appropriately. One set of AT commands will identify your modem and version information.
Eg: -ATD [<dial_string>][;]
Dials the phone number specified in the <dial string>parameter.
INTERFACING OF GSM UNIT:
Interfacing of GSM modem is done through a serial communication link between the
modem and microcontroller 89S51. Whatever data is to be sent to GSM modem is done
through this RS 232 link. The different initialising signals and commands are sent as data
packets.
GSM Based Temperature Monitoring System
APPLICATIONS OF GSM MODULE:
1.
Remote Condition Monitoring:
Wire free telemetry allows the early identification of a problem and can save
expensive down time and repair costs. Automated data collection means the information is
available at any time, any place, saving costly visits to site. In a typical remote industrial
monitoring application, when perhaps a cellular solution is being used to check the status of a
machine using GSM, then the use of a wireless monitor comes into its own.
2. Data Capture for Remote People Counting:
Remote monitoring techniques used in conjunction with suitable sensors
are used capture data and count people in retail outlets. By knowing how many people have
entered or left each establishment then the effectiveness of sales and marketing campaigns
can be monitored. When used in conjunction with RFID then the movement of staff can be
monitored which is particularly appropriate in areas where there are a lot of staff and
relatively few customers. By monitoring footfall remotely the data can be viewed centrally,
so you could look at many stores across regions to compare effectiveness geographically.
3. Wire Free Security Alarms:
Wire free security alarms using cable free motion detectors and GSM capable
communication devices for sending text messages are well suited to building sites, temporary
offices. The lack of cable means that the can be installed very quickly, location of sensors
can be quickly altered to suit the changing needs of the building and alarms can be quickly
and easily configured to be sent to mobile phones. The remote alarm system can also works
without mains power.
GSM Based Temperature Monitoring System
POWER SUPPLY SECTION:
D1
4-
U1
^
IN
OUT Q
C1
T2
C2
C78L05
V1
D3
►f
The power section consists of a transformer, bridge rectifier and voltage regulator.
This project uses a transformer of 230V ac primary to 0-9V, 1A secondary. A transformer
isolates dc supply from ac main. The bridge rectifier converts AC signal into DC and is
filtered using capacitor filter. Its output voltage changes when load current or line voltage
varies. An electronic circuit which keeps the output voltage constant irrespective of the
variation in the load current, line voltage and temperature is an electronic voltage regulator.
This is added at the output of the unregulated power supply.
The voltage regulator is a circuit that provides a precision output voltage under
varying load condition and possibly varying input voltage. Here we need a +5V so that the
output of the filter is fed to LM 7805, a voltage regulator which gives an output voltage of
+5v dc.
Voltage Regulator LM7805C:
The LM78XXC monolithic 3-terminal positive voltage regulators employ internal
Current-limiting, thermal shutdown and safe-area compensation, making them essentially
indestructible. If adequate heat sinking is provided, they can deliver over 1 .OA output
current. They are intended as fixed voltage regulators in a wide range of applications
including on-card regulation for elimination of noise and distribution problems associated
with single-point regulation. In addition to use as fixed voltage regulators, these devices can
be used with external components to obtain adjustable output voltages and currents.
Block diagram:
pass
INPUT
lO—
SERES
EIEMEN1
OUTPUT
CUR
G£ME(
}ENT
SATOft
REFERENCE
VOUACE
S
OA
PRO
TEC
TION
STARTING
CIRCIKT
ERROR
AMPUFEfi
—OZ
GSM Based Temperature Monitoring System
THERMAL
PROTECTIO
N
GNO 03
Application Circuit:
L78XX
O
mil i/i £ j
™|a33/uF
3
2 _________ ^
Co:
OJ/u
F
5 -2703/ 2
Features:
> Complete specifications at 1A load
> Line regulation of 0.01 % at 1A load
> Load regulation of 0.3%
> Internal thermal overload protection
> Internal short-circuit current limit
GSM Based Temperature Monitoring System
SOFTWARE
IDE- KEIL uVision:
The software for GSM based temperature monitoring system is
written in Assembly language of 8051. The program is assembled using KEIL pVision
assembler which is available in the internet. pVision, from Keil Software, combines Project
Management, Source Code Editing, Program Debugging, and Flash Programming in a
single, powerful environment.
"Li
Eh &t
Sofia
Q
Qffaucj
iii s£
IB-IS
y- & w ■<
& .11 © ?> W Ci>
.•IP
» a feAOC0.CR OxOOOQOOOO
ntervi; ltcwdbul[i + l j )
;
AOCO.MR' 0x00000910 TRGSEL: TIOAO
\ riPisp t «y ;-tii
1JCH2
U5 PXP.DY)4) !
while ( ' (USO_C3R
indisplay " 1 ; while
(rodisplay) «V
bjem
bCHO
A0COJMR CWXOXBOO
OVRF?CM1E?nvPF1
OVREO
EOC3EOC2EOC1 EOCO
D □ □ G□□□
:.r.L1 ni» pTk^I ^^feOJ234g? pwiE■0x0FFF448l analog-0x023j
0
|cM.ent
Q SLEEP
PRESCAL:
0x09
P] RES G
Com-TineTRGEN
5 500u
*
Lham<ef'S;eiu$ ■ ■ ADCO.CHSR OkOOKIOOOF
|Ox000005fcCl-
ADO: 0 2O0O
AD1: *<00O AD2 1 2000 A03: 06600
AOVREF: 3 0000
Cutent Module Me*tu« : Module i/Finctiom
E5953000
E3530000
1AFFFFFC
R3
QxQ10QQAB4
E313QO
TST
C1
3
2 3 10AFFFFF
:
■23
MOV S T R
t r l s pfiadi
l s y sp!av/ :
wl)
-11r a1&
L-DR
R3. [R5]
E 3 A0 3 0 0 1
232:
p
0 1 0E0508AB
53C
000
cmp
Vflr« i i 'T
BB1N0E0 0 AC O
D 1 0 0 0 AC 4
Execution
,#0*0000.0
peicentage
OX oi
31 r
R3.#0x00000001 R3.[R5]
Oxl
*'t
:urrent MeasurBments: (ESC to abort)
233: 234:
00:03.547
P A : 0 1 2 3 4 5 6 7 P B : 0 F F 7 4 4 8 9 AO : 0 . 2 O V A1 : 2 . 4 G V A2 : 1 . 2 0 V A3 : 0 . 6
> : 0 1 0 0 0 AC 6
x O l O OLDR
O ACRCE
3 5943010
P jOIOOOAP
STR E 5 8 D 3 0 O 0
P
LDMI E894000F
x Q1 0 Q0
A AD 4 E 8 0 0 O 0 2 A
{Display
[Tine: 0
M«mu»
S«T
S SwaUM
a)
£ Di>4>*en*K<
m
0*000000
00
Rl
0*C000031
B
[JT
j
0-
R2
O0OOC318
0*0000000
1j
0*0000056
01
0x0000020
4!
OxHfcOOC
O i
OxIllcQOC
O j
0x0100115
R3
R4
R5
R6
R7
R8
1
4
0x0000001
0
0x0000004
R9
RIO
1
c
0x0000113
4.
0xCO001e5
41
0x0000110
R11
R12
R13|SP|
1
R141LRI
R15IPCI
* CPSR
■* SPSR
♦
4
Oxoioooae
:
GxOlOOOa
bc !
0x6000001
0■
0x6000001
01
>:'•• >
- F«s>
Interne*
R8
R9
RIO
0*00000000
oxcoxmn i
OxOOOOO
R11
OOO
OxOOOOO
OOO
1
0x00000
000
oxooooi
ire
R12
R13JSPJ
R14ILRI
OxOOOOO
OOO
OxOOOOO
OOO
* SPSR
Inlenupt
Supeivisw
Abo.'
Undetw)
Infernal PC t Mode Stales
117224943
295669019
2 U\1u *» *
■ Adie«.
AnalogO
ASSIGN
(3.000000)
B r e a kD i s a b l e B r e a k E n a b l e B r e a k F . i l l
stmct
:
OnOI
:
clock (
234567
Cb4TFF4488
0xfl0000570(
ent»r«d.
t<
«W*F2to
:
B_iecoKj
0 x O 0 C O 0 5 A0 : O O 0 0 O 0 F F 0 0 0 0 0 0 0 0
O x O 0 O O 0 5 AC : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
!OxO0DO05 B8: 00000000 00000000
000005C4: 00000000 O OOOOOFF
00000000
OOOOOOFF
00000000
00000000
nn nnnnn
GSM Based Temperature Monitoring System
"Q£!CuV""i- rii-.r.nr-innn nnnnnnfifi winn^nfi
|ljl.Hi\Mefn
orv#i
j\
Mernory^
fig. Screenshot of KEIL micro vision
A
Mtmory #3 /, Mem
GSM Based Temperature Monitoring System
FLOW CHART:
START
INITIALISE ALL PORTS TO
FFH
DISABLE ALL INTERRUPTS
INITIALISE THE DISPLAY
INITIALISE UART WITH
BAUDRATE 9600
1
READ DATA FROM ADC
DISPLAY PRESENT TEMP
1
x
YES
r
SEND FORMATTED
MESSAGE TO GSM UNIT
STOP
AND LIMIT
GSM Based Temperature Monitoring System
A LGORITHM :
Stepl: Initialise all Ports to FFH
Step2: Disable all interrupts.
Step3: Initialise LCD and UART with Baud Rate 9600 Step4:
Read the output of ADC from both the channels Step5:
Display the present temperature and limit Step6: Compare
present temperature with the limit set.
Step7: If limit is crossed, send the formatted information to the GSM unit through serial
communication link else go back & read the ADC outputs.
GSM Based Temperature Monitoring System
ARTWORK:
GSM Based Temperature Monitoring System
GSM Based Temperature Monitoring System
CONCLUSION:
GSM Based Temperature Monitoring System was a project based on
microcontroller, due to which hardware requirement is reduced. Modifying the software will
be enough for further enhancement of our project. In a dynamic scenario wherein the breed
and nature of real time systems are subjected to promising changes, this project is aimed
adding the fundamental functionality of interfacing them with varying ambience enabling them
to be stable and reliable.
By doing this project, we were better able to understand the various
facets of doing an embedded system project which is emerging as one of the most 'in demand'
technologies right now. Eventhough this project was developed to alert in crucial
circumstances, this can be expanded for controlling the temperature also.
The development of this project has shown how much hard work goes
into the creation of a system. Embarking of this project has helped us in developing a team
spirit, patience and time management necessary for today's technical professionals. This
project has built in us confidence that any problem can be solved with sheer determination,
hard work and optimism.
GSM Based Temperature Monitoring System
APPENDIX
GSM Based Temperature Monitoring System
APPENDIX - A
SOURCE CODE:
/* PORT ASSFNGMENT:P0->LCD DATA LINES
P1->ADC DATA P3.4>SELECT LINE A P3.5>SELECT LINE B P3.6>SELECT LINE C P2.5>LCD RS P2.6->LCD E
P2.7->LCD R/W */
ORG 0000H
AJMP 0020H;
ORG 0020H
MAINE
MOV P1.#0FFH;
ACALL DISPINIT;
MOV A,#80H; ACALL
CWRT; ACALL
DORG; MOV A,#0C0H
ACALL CWRT;
ACALL DORG1;
ACALL ADCREAD;
MOV R5,#0FFH;
ACALL DELAY; MOV
R5,#0FFH; ACALL
DELAY; MOV
R5.#0FFH; ACALL
DELAY; JMP MAIN1 ;
PORT 1 AS I/P
LOC:
FIRST LINE OF LCD
INITIALIZING
;SECOND LINE OF
LCD
DISPLAY ORG IN** *
DORG:
CLR A;
MOV DPTR,#8F8H;
ACALL DSEND;
MOV R5,#02H;
LOADING;
CALL DELAY;
GSM Based Temperature Monitoring System
ACALL
RET;
DELAY;
SPLAY ORG IN 1
DORG1:
CLR A;
MOV DPTR,#911H;
ACALL DSEND;
RET;
LOAD GSM TEMP
I* ****************** DISPLAY INITIALISATION* * *******************/
DISPINIT:
MOV A,#38H;
ACALL CWRT;
MOV A,#14H;
LCD 5*7&2LINES
DISPLAY ON CURSER NOT
BLINK
ACALL CWRT;
MOV A,#0CH;
DISPLAY ON CURSER NOT
BLINK
ACALL CWRT;
MOV A,#01H;
ACALL CWRT;
RET;
DISPLAY CLEAR
COMMAND WRITE TO LCD**********************/
CWRT:
MOV P0,A; CLR
P2.5; SETB P2.6;
ACALL SDELAY;
CLR P2.6; ACALL
SDELAY; SETB
P2.6; RET;
RS->0
E->1
E->0
E->1
/********************Q^'T'^ WRITE TO LCD*************************/
DWRT:
MOV P0,A;
SETB P2.5;
SETBP2.6;
ACALL SDELAY;
CLR P2.6;
ACALL SDELAY;.
SETB P2.6;
ACALL SDELAY;
RET;
RS->1
E->1
E->0
E->1
GSM Based Temperature Monitoring System
SHORT DELAY*******************/
SDELAY:
LOCI:
MOV R3,#10H;
DJNZ R3,LOCl;
RET;
/*************************L)ATA
SEND
TO
LCD**************/ DSEND:
CLR A;
ACALL SDELAY; MOVC
A,@A+DPTR; CJNE
A,#00H,LOC4; RET;
LOC4:
ACALL DWRT;
INC DPTR; SJMP
DSEND;
DELAY:
HERE:
MOV R4, #0FFH;
DJNZ R4, HERE;
DJNZ R5, DELAY;
RET;
ADCREAD:
MOV P1,#0FFH;
CLR P3.4;
CLRP3.5;
CLR P3.6;
CLR P3.7;ALE
ACALL SDELAY;
SETB P3.7;
ACALL SDELAY;
CLR P3.7;
MOV R5,#010H;
CALL DELAY;
MOV A,P 1;
ANL A,#1FH;
MOV R7.A;
SETB P3.5;
CLR P3.7;ALE
ACALL SDELAY;
SETB P3.7:
ACALL SDELAY;
CLRP3.7;
MOV R5,#010H;
CALL DELAY;
PORT 1 AS I/P
ADD SELECT
READING ADC
GSM Based Temperature Monitoring System
MOV A,P1;
ANL A,#1FH;
ADD A,R7
RRC A;
MOV R6.#030H;
JC FIVE;
CARRY:
MOV R7,A;
CLRC
SUBB A,#018H;
JNC ALARM;
MOV A.R7;
ACALL CONVE;
MOV A,R0;
ACALL DWRT;
MOV A,R1;
ACALL DWRT;
MOV A.R2;
ACALL DWRT;
MOV A,#02EH;
ACALL DWRT;
MOV A,R6;
ADDING DECIMAL POINT &
DISPLAY
ACALL DWRT;
LOC3:
^**SI:********
RET;
H <****** I_JC7^
TO f3CD (CONVERSION***********************/
CONVE:
MOV R(),#30H;
MOV R1,#30H;
MOV R2,#30H
MOV B,#02H;
MUL AB; MOV
B,#64H
DIV AB; ADD
A?R0 MOV
RO.A; MOV
A,B; JZ LOC2;
MOV B.#0AH;
DIV AB; ADD
A.Rl; MOV
Rl.A; MOV A,B
JZ LOC2; ADD
A,R2; MOV
R2,A; RET;
LOC2:
ALARM* * *************
**/
GSM Based Temperature Monitoring Syste
ALARM:
MOV A,#01H; ACALL
CWRT; MOV R5,#02H;
ACALL DELAY; MOV
A,#80H; ACALL CWRT;
MOV R5,#02H; ACALL
DELAY; CLR A;
MOV DPTR,#91BH;
ACALL DSEND; CALL
SERIALROUTINE; JMP
LOC3;
CALL DELAY;
CALL DELAY;
y***************** * *S£RiALROUTINE* * *******************************/
SERIALROUTINE:
UARTINIT:
MOV TMOD,#020H;#10H
MOV TH1,#0FDH MOV
SCON,#050H;#10H SETB
TR1 CLRTF1
MOV PCON,#070H
TIMER1 IN MODE [(ADC)JIMERO IN
MODE 2(RS232) BAUD RATE SET
SERIAL MODE
RUN TIMERO
• * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * !(:*
GSM Based Temperature Monitoring System
;TX_CHAR TRANSMIT ONE CHAR. THRO' SERIAL INTERFACE ;INPUT CHAR. TO
BE TRANSMITTED IN ACC.
TX CHAR:
MOV DPTR,#800H
TRANS
1:
MOV R5,#010H
ACALL DELAY CLR
A
MOVC A,@A+DPTR;
CINE A,#00H,SKIP
JMP OVE;
SKIP:
INC DPTR; MOV
SBUF, A
HERE2:
JNB Tl, HERE2 CLR Tl
SKIPTX:
JMP TRANS 1;
OVE:
RET:
DATA TO BE DISPLAYED**********
/
ORG 800H
DB "ATD9995238051;"
DB ODH: DB 00H
ORG 900H
DB " INITIALIZING "
DB 00H;
DB "GSM TEMP:"; DB
00H;
DB " ALARM!!!"; DB
00H;
END
(9
December 19S4
N a 11 o a a I S e m i c o n d u c t o r
LM35/LM35A/LM35C/LM35CA/LM35D
Precision Centigrade Temperature Sensors
General Description
THE
LM-JS series aio ptecWtan I ntogratod-ctcuit temperature sensors, whoso
output voltage is Hn early pro cot Her alto tho Celsius (Centigrade) temperature.
THE
LWLis
available m an 8-lead surface mount small outline package and a plastic TO-202
package.
thus has an advantage over linear temperature sensors calibrated m"
Kelvin, as the uses is rat teqiked to subtract a la<go ooiv slant voltage from its
Features
output to obtain convenient Centigrade scaling. The LM3S doos rot iegutre any
■ Calibrate ! .aoctfy in " Celsius (Centigrade)
external calibration or trimming to provide typical accuracies of i V/'C at toom
■ Linear - i
temperature ana '
%"C
ov« a lull
tb
to -150*C tomporature range. Low cost Is
assuroa by trimming arc calibration at the wafer level. The LM3b's tow output
impedance, linear output, and precise inherent calibration make interfacing to
\S mV/"C scale factor
■ 05"C accuracy guarantecaole (at - 2b"C>
■ Rated (oi full bb" to - lbO"C range
readout or control errantry especially easy. It can be used with single power
■ Suitable for remote applications
supplies, or with plus ana minus supplies. As it draws only 60 tiA from its supply, it
■ Low cost due to wafot-level trimming
HAS very tow self-heating, less than 0.1"C in sUI a'sr. The LM3b is rated to operate
over a SS" to - 1S0"C temperature range, white the LM3bC is rated for a - 4 TY to 119*0 range { 10" with unproved accuracy). THO LM35 series is available packaged
■ Operates from 4 to 30 volts
m hermetic TO-46 transistor packages, while the LM3bC, UvtSbCA. and LMSbD
■ Nonlineanty only x Vi"C typical
are- also available m the plastic TO-92 transistor package. The LM36D « also
■ Low importance output, 0.1 SI fen 1 mA load
■ Less than 90 i«A aw rent drain
■ Low self-lieatmg, 0.06*C IB still air
Connection Diagrams
TO-46 Metal Can Package*
SO-8
TO-92 Plastic
Small Outline Molded Package
Package
j +'s Win
SMD \
u
ONC
j
n.c.
iCTTBIK
VW
GSM Based Temperature Monitoring System
CI
"S II c.
_L
i-.-i/sbis i
lime is
Order Number LM35CZ. LM36CAZ or LM3bDZ
I iGNDl
c<tfTi«':4w:i lu ntxjiilvy i
i-.'-niiio 2i
See NS Package Number ZD3A
Top View
Order Number LM3SH. LM 36AH.
HC ~ l*> Ois'rie<tfeet
LM3bCH. LM36CAH or LM36DH See NS
Package Number H03H
Order Number LM36DM See NS Package
Typical Applications
TO-202 Plastic Package
Number M08A
-Us 14* TO mi
t
i» 35
m
outwit
' 0 arV * ICO n«V> G
<
17
T
I -1il I* 3
TUM«5t« -i -
FIGURE 1. Basic Centigrade
Vs.'» uA
Temperature Sensori ;-2"C to 1bO"C)
-i253 mV 4 • J5-C
- -«50 tivai -sre FIGURE 2. Full-Range
It'lli^l'.i 2A
Centigrade Temperature Sensor
Order Number LM36DP See NS Package
Number PD3A
Absolute Maximum Ratings (Note 10}
TO-92 Package, (SotdennR. 10 socoias)
tl Military/Aerospace specified devices are required, please contact the National
TO-202 Package. (Soldering. 10 seconds)
26CTC
-■ 23 OC
Semiconductor Sales Olfice/Distributors lor availability and specifications.
Supply Voltage
Electrical Characteristics lNotcD(Note6)
- 36V to -0.2V
Output Voltage
- 6V to - 1.0V
Output Cut rent
SO Package (Note 12): Vapoi Phase (60 seconds) Inlrarea (is
10 mA
21S"C
seconds)
60"C to ■•■ 18CTC
Storage Temp.. TO-46 Package,
220*0
TO-92 Package.
WCto - 1S<TC
ESD Susceptibility- (Note 11!
SO-B Package,
6S"Cto i 1 !>CTC
Spooled Operating Temperature Range: T,lt!H to TMAX (Note 2)
TO -202 Paskage,
LM3S, LMS6A
- 66"C to + 1 S'CfC
55"Cto 1KTC
LM 3SC. LM3BCA
Lcaa Temp.:
TO-«6 Package. (Soldering. 10 seconds)
- 40"C to + 110>'C
0"Cto ■>■ 100"C
LM360
300"C
2600V
;
LM3bCA
Parameter
Tested Limit
Conditions
Typical
Tested Limit
(Note A )
(Note +)
Design Limit
Design Limit
(Note bl
(Note bi
Units (Max.)
Typical
Accuracy (Note
'0.2
1)
- 0.3
1.0 1.5
- 0.4
T A - ! Zb'i
- 0.4
T a- rye
t-0.b
1
1.0 v 1.0 I
0.2
.!. 0.3
I: 0.4 > 0.'.
.tO.Jt ±1.0
T,
Morlirvea'
% (Mote B)
TI • T .
Sorvsor Gam
(Avciago Slope)
9.9, 10,1
i
10.0
■ 1 0 . 1 mV/'-C
I: 0.*$
Load Regulation (Note 3) 0
I;/ 1 MA
TA-
■0.10
T a •'.T i
0.5
0.15
9.9,
1.0
0.5
3.0
• 0.3 5
3,0
mV/ m A
2 &^ U»iS T A
T
TYAX
LIRE Regulator
D ) ta- 2re
(Note
•. 0.01 0 . 0 2 iO. O
:' 0.01 0 . 0 2
0.1
mV/V mV,.* V
0.1
4V1 V'si 30V
Owe
scent
6?
Current
(Note S)
V5 - - SV. - 2S*C Vs " -
67 €-!>
105
1 14 116
131
56.2 1 0 5 . 5
66
(JtA I* A M,A
133
bV V's «. - 30V. - 2S-C
Vs ^ " 30V
91
ye.2
91.5
Clvangoof Quiescent
02 0 . 5
v'.<:
0.5
Current (Note 3)
lV.-iVss.30V. • 25 '«V--
2.0
;Vss30V
Te mporaturo Coefficient
of Ouiescert Currorl
Mini rn iirn T err per atuto lo>
In 2tJ'l of figure
Rated Accuracy
lf*0
Loi^g Term Stability
Tj -T MAX. 'or 1000
1.5
3.01'
0.0b
hours
MAI*
1:UM*««t»rtiile«»ea.l^»6Sl*-fe«to!*
*oy
-55"C
',Tj'.
'
ISCPCNSr
tie
LW3S
»W
LV05A.
-«*.;Tj<
'
110*CtW»W
LM»5C»*tU»SCA,
0'-.Tj'. • 10Q'C tar tfxs
Vs~ ^
ifld iiCAD"-*
t'«r trmrt of r^art* ^. Tr'<***i *i4aK-id!a*s atsu j*sery lnw * 2*C te TJA^c in flur u-jut -:l
Kt/utu i 3pei:1'Oiittfis *i btrfdfaor a:>5% tv«* I?* fur rafc*J tetfncw*ahj* rir-^j
»i<f
Noi* Th<*-rnal re*su.ioe ell.':*.* T04fc eaciw^eia 420*C/W. junction fc sn&fcnt and 24*€rw ymctionlG case Thermal re**iarteeet TO 32 paoka§« :* 1 QO'CW pjictor te art*s*;nt Therms aslant*
&f f?* *rjaii outline iTK>?<Je«f a^* is ^C'C/W sun«fw te arrive The^r^ii fesst^c-ii ef tiis TO 2Q2 paA^i
GSM Based Temperature Monitoring System
Typical Applications
ccoo*
0.1 »f
■ 1WS1KI MM
VOW =lfl lW,"t lliXBitH *V€)
FROM + 2"£TE) 4-49-C
V;u-'<
OH
BHtOStSl
,M y rm%m mm
( I'Maaw ■ ,-r-:
ltlk
FIGURE 6. Two-Wire Remote Temperature Sensor (Output Referred to
Ground)
FIGURE 5. Two-Wire Remote Temperature Sensor (Grounded Sensor)
mam.
IN*™ (
y
m
m
'«Ktt = 18 i»V/*C fteffljm «i»«C)l r
wrc
I
FH Sm -S 'C K -
I1
i
Russia >
FIGURE 7.Ternperature Sensor, Single Supply, 66" TO tbO'C
TUHflllM
FIGURE 8. Two-Wire Remote Temperature Sensor (Output Referred to
Ground)
, as
OffKT
*D0UST
,
ttffWSSI« «
Typical Applications (confinuea)
FIGURE 9. 4-TO-2t>mA Current Source (0"C
LO - 100"C!
T-'>|yaSl«~lO
FIGURE 10. Fahrenheit Thermometer
FIGURE 11. Centigrade Thermometer (Analog Metcrl
"
TUM/5SW
12
FIGURE 12. Expanded Scale Thermometer (bO" to 80" Fahrenheit, tor
Example Shown)
FIGURE 13. Temperature To Digital Converter (Serial Output) (I 128"C Full Scale)
GSM Based Temperature Monitoring System
FIGURE \ 4. Temperature To Digital Converter (Parallel TRI-STATE* Outputs (or Standard Data Busto uP Interface)
(12B"C Full Scale)
GSM Based Temperature Monitoring System
October 1995
(9
r
A a l i o n a I Se
miconducto
r
ADC0808/ADC0809
8-Bit JJP Compatible A/D Converters with
8-Channel
Multiplexer
General Description
"he ACCS806. ADCC-J03 data acquisition conrporetrc is a monolithic CMOS c'ev'ce
with ar -3-bt anaiog-to-dtgita converter. 8-channel nwUo.exef ana microprocessor
compatible control log c. The 8-bit NO converter uses successive approximator as
■
Easy rtfrtace to ail m preprocessors
■
Operates rationietricai'y or with 5 V-.0 or analog scar adjusted voltage
reference
» No zero or fj l-scale adjust required
■
9-cfiannel multiplexer vvth address logic
■
QV to 5V input range with single 5V power sups y
approximation register The ?-channel multiplexer can directly access any of 3-s-ngle-
■
Outputs meet TTL voltage level specifications
ended anaog signals. ~he fi-evce eliminates the need for external zero and fU:l-scale
■
Standard hermetic or mooed 2&-pin DIP package
adjustments. Easy interfacing to microprocessors s provided by the atcneo and
■
2S-p.ii moided ch-p earner package
cecoded multiplexer address nputs and l3tched TTL TRI-STATE*- outputs. The
■
■
ADCOSC? equivalent to MM74C&49
AOCOati equivalent to MM74C949-1
the conversion technique. Trie convener features a high mpedance chopper stapilzed
comparator, a 256R voltage divider with anaog switch tree ano a successive
design of the AQC0808. ADC880& has been optimized ay incorporating the most
desirable asoects of several Afl3 conversion techniques The ADCD80&. APC383&
offers h'gh speed high accuracy, minimal temperature dependence, excellent iongterm accuracy and repeatability, and consumes minima! power. These features make
Key Specifications
■
Resolution
■
Total unadjusted Error
dtput rsamp e'hold port) see ADC0816 data sheer (See AN-2<s7 'or more
■
Singe Supply
nformaticn.i
■
Low Power
■
Conversion Time
this device ideally suited to applications from process and machine control to
consumer ana automotive aao ications For 16-channel multiplexer wish common o-
Features
6 Bits
± >/i LS8 and +1 LSS 5
15
Block Diagram
l
O
tore*
T U HF
3
IDT
IE
IE
,
..■■4.1.1.1
* * I J W'L > « UL » K "«
—
J—
11
111 __l i l
See Ordering Information
Connection Diagrams
Molded Chip Carrier Package
Dual-In-Line Package
saa
■<■<■<
III
Hi-
—
1
fi* — ?
?r
3
1 1 I1
,>i
JR ?« u
— iM
wr,_
-M
I H -—
we-
4
n
-*C0 *
M2-
K? -
5
'.'4
-*» e
sr«" -
F.
IS
-«0
EOC-
7
22
8
21
r
*U_
70 •»
:■
in
11
::t
lg
1
1?
;
14
r "miW
—
13
3
!->-
-2"'MSB
n
IC
t H l f e t -CLOCk 11
'«if<«>- w
CND-
7"-'-
12
■o
4
S ; F|
RS
WTPUT
mW
100 ms
- '«ir(»>
;
B
1!
-r5
1 1 1
1 11
_ .-4
*S"
Z
p, »a
' 7 -r'TSA
a!
!T ~VHF <")
1
ir»
10
,-j
-r'
Order Number ADC
0808C
CV orADC0609C
See HS Package V28A
Order number ADC0808CCN or ADC0809CCN See U S Package
J28A or M28A
GSM Based Temperature Monitoring System
Ordering Information
TEMPERATURE RANGE
Error
p
-55'C to +126X
±'/i LSB Ursaojjsted
±1 LSB Unadjusted
ADC0803CCN'
ADCOSOilCCi!
-40" C to +85'C
AJ5CQ3CSCCV
ADC03SSCCV
ADC06G3CCJ
ADC0303CJ
ackage Ciitire
f.I&A N'.olcec DIP
V2?A Molded Chic :."arrer
J38A Cerarvi c DIP
J2SA Ceramic CIP
Timing Diagram
|.._*4 s?*-fic
A@B»?U
•••a
I
- Jt
X
IRf J"
R *>H
-a*DDI!
____________________
:
HHTt
X
a u fin
1
>
GSM Based Temperature Monitoring System
Functional Description
■Multiplexer, The dev ce certains an 8-channel singe-ended analog signal mtntip exer. A
particular input channel is se-ected by using the address oecocer Tah<e ? Shows the
input states for the address lines to select any channel The address is latched into the
decoder on the ow-to-high transition of the address latc.n enab'e signa,
TABLE 1.
SELECTED ANALOG
C
CHANNEL
INP
INI
IN2
L
L
L
IN3
L
IN4
IM5
IN6
IN7
H
H
H
H
ADDRESS LIME
B
L
L
:-;
L
L
H
H
A
L
H
L
H
L
H
L
H
CONVERTER CHARACTERISTICS The Converter
The heart of this singe chip data acquisition system * its 3-bit ana.og-to-digita converter.
The converter s des gneti to give fast, accurate, and reoeataole conversions over a wide
range of temperatures. The converter s partitioned into 3 major sections: the 2S6R
ladder network, the successive approximation register, and the comparator The
convener's digital outputs are positive true
The 256R adder network approach (Figure ?! was chosen over the conventional R/2R
adoer because of its Inherent monotonicity. which guarantees no missing d gita codes.
Monotonicity is part cu any important in closed loop feedback controisystems Anonmonotomcrelationshipcan cause os-cii ations that will be catastroph c for the system.
Additionally, the 256R network does not cause load variations or, the reference voltage.
The bottom resistor and the top res-stcr of the ladder network in Figure > are not the
same value as the remainder of the network. The difference in these resistors causes
the output characteristic to m symmetrical wth the zero and full-scaie ooints of the
transfer curve The f rst output trans -ton occurs when the analog signal has reached +
1* LSB and succeed ng output transitions occur every 1 LSB ater up to fit -sea e
The successive approximation reg.ster (SAR) performs 8 iterations to approximate the
input voltage. For any SAR type converter, n-iteratons are required for an n-brt
converter. Figure 2 shows 3 typical example of a 3-bit converter. In fie ADC0803.
ADC0809. the approximator technique is extended to 8 bits using the 256R network.
The AID convener's successive appro-nation register (SAR) is reset on the positive edge
of the start conversion (SCI pulse. The conversion is begun on the failing edge of the
start conversion pu'M.A conversion n process w I be interrupted by rece pt of a re*' star
conversion puse. Continuous conversion may oe accomplished by tying the end-ofconversion i'EOC; output to the SC input. If used in this mode, an external start
conversion pulse should be applied after power up Eno-of-eonversion wit go ew
between 0 arc 8 clock pu see after the rising edge of start conversion. The most
important section of the A/D converter is the comparator It is this section which is resporsieie for the ultimate accuracy of the em re converter it is also the comparator dnft
which has the greatest influence on the reoeataWity of the device. A chopper-stabilized
comparator provides the most effective method of satisfying a:I the converter requirements
The chopper-stabi izeo comparator converts the DC input s'gnal into an AC signal. This
signal is then fed through a high gain AC amp ifier ana has tie DC eve restored. This
technique limits the dnft component of the amplifier since the dnft is a DC component
which is not passed by the AC amplifier. This makes the entire A/D converter extreme y
insen-s'tive to temperature long term dnft and input offset errors. Figure J shows a
typical error curve for the ADC2808 as measured using the procedures outlined in AN173.
GSM Based Temperature Monitoring System
Applications Information (Continued!
The average value of the comparator input current varies directly with clock
4.0 ANALOG COMPARATOR INPUTS The dynamic comparator nput current « caused by the
If no filter capacitors are used at the ana ©g inputs signal source impedances are
periodic switching of on-chip stray capacitances. These are connected alternately to ttte output
low, the comparator it rent shou-.O not introduce converter errors, as the i created
of the resistor ladder: sw ten tree networK end to the comparator input as part of the operation
by the capacitance discharge w*l cie out
of the choppe' stabilized comparator.
filter capacJors are desires for noise reouc signal conditioning they wi I tend to
frequency and with V,N as shown in
Fiaure 6.
ix comparator output is strobed. If insut
average out the comparator input current. It wil then take on the cha tics o* a
bias current whose effect can be predic vents5naKy.
Typical Application
READ■
CLK
'M kmAODFLESS
DECODE-•
S'BMV-8
I.AB*-ft0t5r
000 V ■
U
OF
R E F I <;
v
IQ
C.
ntn i
7 '
=, -'>
SIAJU
2ALT
3>
N
]
2 '
J
A D 0-
ADrADJ
L
-
?
A
'■'
\— V|N« "I
5V
AUEOMB
STLPPI.V' 1
A D C 080!)
B
2-6
c
17
z*
•a
GRuuMO —
G
MD
*
•
IKTERWHT
r
^'IP^x* ■
n:i" 1
#>INIER
HUPT
MS
6
D
IB
■>
DB
b ¥
DS
4
1
)83
-♦•
DS
2 ►
OBI
-> am
B-$V
ANALOG ■ INPUT
RANEE
'Ada-ess
jh« -teed*: fcr 838J aw SOVB imrfecinsADCKCi tc a n£'-:cro:es*:r
DC
GSM Based Temperature Monitoring System
Features
•
Compatible with MCS-51* Products
•
4K Bytes of In-Systetn Programmable (ISP) Flash Memory
•
4.0V to 5.5V Operating Range
•
Fully Static Operation: 0 Hz to 33 MHz
•
Three-level Program Memory Lock
•
128 x 8-bit Internal RAM
•
32 Programmable I/O Lines
•
Two 15-bit Timer/Counters
•
Six Interrupt Sources
•
Full Duplex UART Serial Channel
•
Low-power Idle and Power-down Modes
•
Interrupt Recovery from Power-down Mode
•
Watchdog Timer
•
Dual Data Pointer
•
Power-off Flag
•
Fast Programming Time
•
Flexible ISP Programming (Byte and Page Mode)
- Endurance: 1000 Write/Erase Cycles
8-bit
Microcontroller
with 4K Bytes
In-System
Programmable
Flash
Description
The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of in-systen programmable Flash
memory. The device is manufactured using Atmel's high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pinout The on-chip Flash allows the program memory to be reprogrammed in-system or by a
conventional nonvolatile memory programmer By combining a versatile 8-bit CPU with in-system programmable Flash on a
monolithic chip, the Atmel AT89S5I is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many
embedded control applications.
The AT89S51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM. 32 I/O lines, Watchdog timer, two
data pointers, two 18-bit timer/counters, a five-vector two-level interrupt architecture, a fuM duplex serial port, on-chip oscillator,
and clock circuitry In addition, the ATS9S51 is designed with static logic for operation down to zero frequency and supports two
software selectable power saving modes The Idle Mode stops the CPU while allowing the RAM timer/counters, serial port, and
interrupt system to continue functioning The Power-down mode saves the RAM contents but freezes the oscillator, disabling all
other chip functions until the next external interrupt or hardware reset
Pin Configurations
PDIP
PI .CC
Pl.t c
P1. 2
C
□ VCC
P1.3C
CADI:
= •
4C
□ PC
ADO:
.of
□ PC".
1
□ PC.2i.A02;
34
□ P0.3 |AD3)
lIVOS irt.SC
□ PC.4 |AD4;
RVIOC.
□ PC 5 ;AD5]
= • -:
c
□ PC .6 lADBr
□ PC.7 |AD7;
□ E?.-V==
RSTC
=s.:-
IRXCI
□ A.-E-SSQG
□ P5EN
c
iTXC-i
P3.-
□ P2.7 i.Aie!
C (INTO)
P3.2 C JIRTTj = ;..?
C
4c
3P2.6 |A14;
24
□ P2.5
|A1J)
1P2.4 > A V 2 ) J
P2.3 |A11> J P2.2
iA10) 1P2.1 iAS;
itVPp -
i f
R
XTAU2 I;
XTAU R
G\C I
"]P2.0 I A3;
AT89S51
GSM Based Temperature Monitoring System
Block
Diagram
A
A
+I
A
A
A
A
A
A
A
11 ~L {1 F , » » »
A
2
-x
i—_ , I , r
l-IAM
nut
PROGRAM
r3
REGIS"^
6.0 Oil
IS ILK
RE
SISTER
B
STACK -OltrE.R
ACC
T
UTERR JP~ SESIAL PORT *NC
«teR BLOCKS
PROGRAM
COUNTER
3SE
«
N
AND
CONTROL
ALSPROG *
rii~Ruc"ic.
REGISTER
PORT
LATCH
SORT 3
WATCH
DOG
ISP
1
PROGRAM
PORT
LATCH
i
PORT | DRIVERS
r
PORT 3
RTTITTTF
DRIVERS
A
A
A
A
A
i
i
4
A
A
A
A
» » ▼ » ▼
POR" 2 DRIVERS
=OR" 0 DRIVERS
A
LOGIC
A
GSM Based Temperature Monitoring System
Pin Description
VCC
Supply voltage.
GND
Ground.
Port 0
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight
TTL inputs. When Is are written to port 0 pins, the pins can be used as high-impedance inputs.
Fort 0 can also be configured to be the multiplexed low-order address'data bus during accesses to
externa! program and data memory. In this mode, PO has internal pull-ups.
Port 0 also receives the code bytes during Flash programming and outputs the code bytes during
program verification. External pull-ups are required during program verification
Port 1
Port I is an 8-bit bidirectional I/O port with internal puil-jps. The Port 1 output buffers can
sink/source four TTL inputs. When 1s are written to Port I pins, they are pulled high by the interna! pullups ana can be usee as inputs As inputs. Port I pins that are externally being pulled low will source
current (lfLi oecause of the interna! pull-ups.
Port 1 also receives the low-order address bytes during Flash programming and verification
Port Pin
PI.5
PI 6
Alternate Functions
MCSI iuseci for In-System Programming}
MISO fused for h-System
PI .7
Port 2
Programming)
SCK (used for In-System Programming;
Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can
sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pullups and can be used as inputs. As inputs. Port 2 pins that are externally being pulled low will source
current (l,,J because of the interna! pull-ups.
Port 2 emits the high-order address byte during fetches from external program memory and during
accesses to external oata memory that use 16-bit addresses (MOVX @ DPTR). In this application, Port
2 uses strong internal pull-ups when emitting 1s. During accesses to external oata memory that use 8-bit
addresses (MOVX @ R|). Port 2 emits the contents of the P2 Special Function Register,
Port 2 also receives the high-order address bits and some control signals during Flash programming
and verification.
Port 3
Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output Duffers can
sink/source four TTL inputs. When Is are written to Port 3 pins, they are pulled high by the internal pullups and can be used as inputs As inputs. Port 3 pins that are externally being pulled tow will source
current ( y because of the pull-ups.
Port 3 receives some control signals for Flash programming and verification.
Port 3 also serves the functions of various special features of the AT89S51. as shown in the following
table.
GSM Based Temperature Monitoring System
Port Pin
P30
P3J
P3 2
P3.3
P3.4
P3.5
P3.6
Alternate Functions
RXD <senal input ports
TXD (senal output port)
INTO (external interrupt 0)
INT 1 (external interrupt i j
TO (timer 0 external input i
T1 (timer 1 external input)
WR {external data memory write strode;
P3 7
W)
RST
(external data memory read strobe)
Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives High for 98 oscillator
periods after the Watchdog times out The DIS-RTO bit in SFR AUXR (address SEHi can oe used to disable this feature In the default state of bit
DISRTO, the RESET HIGH out feature is enabled.
ALE/PRO
G
Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the
program pulse input (PROG) during Flash programming.
In normal operation. ALE is emitted at a constant rate of 1/6 the oscillator frequency and may oe used for external timing or clocking purposes.
Note, however, that one ALE pulse is skipped during each access to external data memory
If desired. ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC
instruction Otherwise, the pin is weakly pulled high Setting the ALE-oisab e bit has
PSEN
no effect if the microcontroller is in external execution mode.
Program Store Enable (PSEN) is the read strobe to external program memory
When the AT8&S51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN
activations are skipped during each access to external data memory.
EA/VPP
Externa! Access Enable. EA must be strapped to GND in order to enable the device to fetch code from externa! program memory locations
starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be infernally latched on reset.
EA should be strapped to Vcc for internal program executions.
This pin also receives the 12-voft programming enable voltage (Vpp) during Flash programming.
XTAL1
lput to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier Flash Prcgrammng and
Verification Waveforms - Para lei Mode
>? ON
PRC-3RAMM N3
PI 0 - PL.7 P2.0 -
:CR = £3
P2Z
PORT 0
A0-RE3.3
QA"A IN
>
--
DATA OU
LOG C
EAjV,
LOG C 3
(ENABLE)
P3.Q
i'RDY/BSYI
surf
Y R=AC
V
GSM Based Temperature Monitoring System
Flash Memory
Sena:
Down oading
O
ATI9S51
V
INSTRUCTION
IHPUT
---------------- *
DATA CHJTPJT * ------------
P l .c.'MOSi
pi.e/wiso
CLOCK IN ---------------- ►
P1.7,'SCK
XTAU
3-33 M H z
XTAL1
GND
Flash Programming and Verification Waveforms - Serial Mode
, Serial Programming Waveforms
SERIAL DATA INPUT
=i
/ MSB
,s I;mosi. ______
£Wi DATA OUTPUT
PI .6SMISOJ
/ Mk
L
V
V
V V
Y
V
Y -35
.j
______ T, ./v.. ......................... /v_ .............
Y
Y"" ~Y
\ ________________________________ A „ .......... _A _________________ A _____________
Y
Y
__________________ z _______ ,}.,.. ............................./v., .................. A ................ _A._ ........................
V
Y i.sa \
A .................-A ________________ A. ________________ !
III I
S5RIAL COCK INPUT
Pi.7 iSCK'i
r i j 'L
l ..................i
i .... run.
GSM Based Temperature Monitoring System
MAX232. MAX232I DUAL EIA-232
DRIVERS/RECEIVERS
SLLS:-7l-FESRbA=< r
133=1 - F.E .'!SEI> OCTC3ER-302
MAX232 . .. D. DW. N. OR NS PACKAGE MAX232I.
Meet or Exceed TIA/EIA-232-F and ITU Recommendation V.28
. D. DW, OR N PACKAGE (TOP VIEW)
Operate With Single 5-V Power Supply
Operate Up to 120 kbit's
6 ] yCC •5 ]
Two Drivers and Two Receivers
GND '4 ] T10UT
•
±30-V Input Levels
•
Low Supply Current . . . 8 mA Typical
•
Designed to be Interchangeable With Maxim MAX232
T2IN
•
ESD Protection Exceeds JESD 22 - 2000-V Human-Body Model
? ] R20UT
• I ] R1IN
]RIOUT ]T1IN ]
(A114-A)
•
Applications
TIA/EIA-232-F
Battery-Powered Systems
Terminals
Modems
Computers
description/ordering information
MAX232 is a dual driver/receiver that includes a capaotive voltage generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver
EIA-232 inputs to 5-V TTl/CMOS levels. These receivers have a typical threshold of 1.3 V and a typical hysteresis of 0.5 V, and can accept
±30-V inputs. Each driver converts TTUCMOS input levels into EIA-232 levels The driver, receiver, and voltage-generator functions are available as cells in
the Texas Instruments LinASIC" library.
The
converts
ORDERING INFORMATION
PACKAGEt
TC to 70"C
-C P (Ni
SOIC !D!
SOIC (DW)
SOP i.NS)
-4CPC tc 35X
SOIC (D)
SOIC I DW
I
ORDERABLE PART
TOP-SIDE
NUMBER
MARKING
T.r-t
Tite
Tape and re*
T.i:e
Tape and reel
Tape and reei
Tjbe
VAX232N
■VA.X232D
:VAX232DR
VAX232QvY
VAX232DW3
■VAX232NSR
VAX232IN
MAX2.32N
Tjfce
Tape and reej
Tube
Tape and rse'
MAX232iD
VAX232 DR
VAX232IDVV
;,'AX2 32 2WR
MAX232I
MAX232
MAX232
MA.X232
MAX222IN
HAX232-
*al dais synljon-ation, and PCB design
guidelines are available atwiwwJ.com/ttl3ackage.
GSM Based Temperature Monitoring System
Function Table:
EACH
D R I V E ROUTPUT
INPUT
TIN
TOUT
L
H
H
L
H = high level. L = Sow level
EACH RECEIVER
INPUT
RIN
OUTPUT
ROUT
L
H
H
L
H = high 1 evek L = sow
level
logic diagram (positive logic)
T1IN
T2IN
R10UT
11
[>
>
[>
10
12
14
T10UT
T20IJT
13
R20UT
R1IN
R2IN
<<r
absolute maximum ratings over operating free -air temperature range (unless otherwise
noted)t
I n p u t supply voltage range. V c c (see Note I) .................................................... - ■
......................... -0.3 V to 6 V
Positive output supply voltage range. Vg+............................................................................................... Vcc - 0.3 V to 1 5 V
Negative output supply voltage range V 'g_ .............................
.......................
................ -0. 3 V to- 1 5 V
Input voltage range, V|: D r i v e r ....................................................................................................... -0.3 V to V' c c + 0 . 3 V
Receiver ................................................................................................................................ +30 V
Output voltage range, V0: T iOUT, T20UT ................................................................................ Vs_- 0.3 V to Vg+ <• 0.3 V
R10UT. R20UT .......................................................................... . -0.3 V to Vcc + 0.3 V
Short-circuit duration: T10UT. T20UT .......................................................................................................................... ^Unlimited
Package thermal impedance, ftj^ (see Note 2): D package ........................................................................................... 73XAV
D W package ...................................................................... 57"CAV
N package ............................................................................ °C/W
NS package ..........................................................................64'C/W
Lead temperature 1.6 mm (1/16 inch) from case for 10 seconds .................................................................................... 2QQ'JC
Storage temperature range, Tstq ................................................................................................................... -65°C to 150:C
e7
REFERENCE
1) www.google.com
2) www.redcircuits.com
3) www.efy.com
4) ELECTRONICS FOR YOU MAGAZINE