0% found this document useful (0 votes)
88 views34 pages

TELEMETRY TEMPERATURE MONITOR (Project)

The document describes the design methodology and analysis of a microcontroller-based wireless temperature monitoring system. It includes: 1) A block diagram showing the temperature sensor, analog-to-digital converter, microcontroller, RF transmitter, RF receiver, and display unit. 2) Details of the key components used - temperature sensor (LM35), RF module (KYL-500S), analog-to-digital converter (ADC0804), microcontroller (Atmel 89c52), and display unit. 3) Descriptions of how the temperature sensor works and the features and applications of the RF data transmission module.

Uploaded by

Judpraise Akums
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views34 pages

TELEMETRY TEMPERATURE MONITOR (Project)

The document describes the design methodology and analysis of a microcontroller-based wireless temperature monitoring system. It includes: 1) A block diagram showing the temperature sensor, analog-to-digital converter, microcontroller, RF transmitter, RF receiver, and display unit. 2) Details of the key components used - temperature sensor (LM35), RF module (KYL-500S), analog-to-digital converter (ADC0804), microcontroller (Atmel 89c52), and display unit. 3) Descriptions of how the temperature sensor works and the features and applications of the RF data transmission module.

Uploaded by

Judpraise Akums
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 34

CHAPTER THREE

DESIGN METHODOLOGY AND ANALYSIS

3.1 INTRODUCTION
In this project, a design methodology targeting accuracy and temperature-aware
system is employed. In order to demonstrate its effectiveness, we used a transducer
an analog converter coupled to an embedded system to effect the desired change.
Here, we also used RF transmitter and receiver module to achieve a wireless
communication from a remote area.

First of all, the principle of operation of transducer were studied. It is found out
that its output is normally an analog signal which needs to be converted in digital
signal for onward interface to a microcontroller. Here, the ADC was handy to settle
the conversion problem. It converts the analog signal to digital signal.

This digital output is then fed into a microcontroller to process and give a required
result depending on the program burned into it. For us to see the effect of the
process of the controller, a digital read out was used to display the reading of the
temperature at each point in time. Here, again, the seven-segment display was
useful. In the following subject, apart from analog to digital conversion, the
emphasis is on the individual working of the device so employed and its relevance
to the design.
TEMPERATURE ANALOG-TO-DIGITAL RF
SENSOR CONVERTER MICROCONTROLLER TRANSMITTER

MICROCONTROLLER RF
DISPLAY UNIT
RECEIVER

Fig 3.1 BLOCK DIAGRAM OF A MICROCONTROLLER BASED TELEMETRY TEMPERATURE MONITOR

3.2 MATERIALS
Some of the materials used in this work are listed below:
 Integrated circuit sensor (LM35)
 RF module (kyl500s)
 Analog-to-digital converter (ADC0804)
 Microcontroller (Atmel 89c52)
 Resistors
 Capacitors
 Transistors
 Seven segment display

Temperature Sensor (LM35DZ)


LM35DZ acts as a temperature sensor / detector device where voltage production
is linear and temperature exchange is in degree Celsius. LM35DZ has a low
resistance or impedance, linear output and high accuracy calibration to facilitate
data reading through electronics circuit. LM35DZ can operate between
temperature ranging from -55° C to +100° C. This temperature sensor device
produces 1° C at every voltage change of 10mV (milliVolt).

Gnd
input output

Fig 3.2 LM35 with its pin configuration


Data Transceiver Module

I: About KYL-500S
KYL-500S, the micro power wireless transceiver data module is used as the
wireless
data transceiver in short-ranges, with the small size, weight and power
consumption
and good stability and reliability. Narrowband low power UHF wireless data
transmitters and receivers with channel spacing as low as 25 KHz.

II: Features:
I. Features of KYL-500S
1. Low power transmission with 10mW.
2. With 433MHz as factory default carrier frequency, but 400-470MHz, 868MHz,
915MHz is available if needed.
3. High anti- interference and Low BER (Bit error Rate)
Based on the Gaussian Frequency Shift Keying (GFSK) modulation, the
high-efficiency forward error correction channel encoding technology is used to
enhance data’s resistance to both transient interference and random interference
and
the actual bit error rate of 10-5 ~ 10-6 can be achieved when channel bit error rate
is
10-2.
4. Long Transmission Distance
Within the visible range, when the height of antenna is higher than 2m and The Bit
Error Rate (BER) is 10-3, the reliable transmission distances respectively is 1000m
@1200bps, and is 600m@9600bps.
5. Transparent data transmission
Transparent data interface used in transceivers is for meeting many standard or
nonstandard user protocols. Any false data generated in air can be filtrated
automatically (What has been received is exactly what has been transmitted).
6. Multi-channels
KYL-500S transceivers offer 8 channels, if needed, 16 or 32 channels are available
to satisfy various configuration of communication under user’s demand at the same
time.
7. 2 ports with three connection methods
KYL-500S transceivers provide 2 ports with three connections, ports: a UART
interface of TTL level, a non-standard RS-232 port and a non-standard RS-485
port.
8. Big data buffer area
With optional interface baud rate: 1200/4800/9600/19200bps and 8N1/8E1/8O1
data format (set by user), the transceiver can transmit unlimited data frames with
flexible user program.
Note: the RF data rate is only settled down before delivery, please inform our sales
when placing your orders.

9. Intelligent data control and no any extra programs required


Even for half duplex communication, no any excessive programs required. All RF
system data transmission/reception and other On-the-Fly conversion and control
are
performed by KYL-500S transceivers automatically.
10. Lower power consumption & Sleep function
With +5V power, the receiving current is less than 20mA, the transmitting current
is less than 40mA, and the sleeping current is less than 20uA.
11. High reliability, small and light
By using monolithic radio-frequency integrated circuit and single-chip MCU, the
transceivers have less peripheral circuit s, high reliability, and low failure rate.
12. More options of configurable antennas for user different applications.
13. Watchdog monitor
Watchdog monitors the inner function, so it can change the traditional product
structure and also improve the reliability of our modules.

III: Application of KYL-500S:


KYL-500S the micro power wireless transceiver data module is suitable for:
* AMR Automatic Meter Reading
* Wireless alarm and security systems
* Building automation, security, wireless monitoring and control of room
equipment,
Access Control System;
* Wireless data transmission, automatic data collection system;
* Radio modem can be used for Sports training & competition;
* Wireless dishes ordering;
* Wireless POS, PDA wireless smart terminal;
* RF modem can be used for Electronic bus station and intelligent traffic;
* RF transmitter Wireless electronic display screen and queuing machine;
* Wireless telemetry Charging for parking, parking lot;
* Wireless modem Automobile inspection and four-wheel orientation;
* Wireless sensor Industrial wireless remote control and air conditioning remote
controller;
* Data communication used for railway, oil field, dock and army.
* LED display in thruway and public places
* Point to multi-point wireless network, wireless on-the-spot bus and automatic
data
collection system;

IV: How to use the KYL-500S


KYL-500S provide RS-232, RS-485 and UART/TTL level interface port for direct
connection with PC, RS485 devices, monolithic processors and other UART
components kinds of applications. The schematic diagram is shown below:

1. Power supply
The factory default setting is +5V(3.3-3.6V will inform when placing the order).By
using better ripple factor, KYL-500S transceivers can also share power supply with
other equipment. If possible, a voltage-stabilizing chip with 5V voltage is more
recommended as the only power supply than Switch power supply. But if only
switch power supply available, the jam by switch pulse to the transceivers should
be avoided. In addition, the reliable grounding must be used if there is other device
in the system equipment. In case of failing to connect with the ground, it can form
its own grounding but must be absolutely separated from the municipal electric
supply.
2. Connection Definition with terminal
KYL-500S transceivers supply one 9-pin connector (JP1), their definitions and
connection methods with terminals are shown in Table 1.

FIXED RESISTORS
Fixed resistors supply a resistance measured in ohms to a circuit. The higher the
ohms, the more resistance. The first bar sets the initial number (in this case, 1), the
second is an assistant (add on a 5). The third bar is a multiplier (that means 15
times 100 = 1500 or 15k ohms). The final bar is the tolerance bar (meaning this
resistor can vary + or - 10%).

FIXED AND VARIABLE CAPACITORS


Fixed capacitors hold an electrical charge for a predetermined amount of time.
The value of the capacitor is printed on the component. Smaller capacitors us a bit
different system. Say it's marked with 104. That means it's a 10 with 4 zeros (104 =
100,000). Sometimes you'll see a "WV" after the voltage rating which means you
can't use the capacitor with voltages exceeding this rating. You'll also find a
polarity marking (- minus sign) that identifies the negative side of the capacitor and
must be installed accordingly to prevent failure.

DIODE
Diodes are made of either germanium or silicon. They carry two ratings: peak
inverse voltage and current. These ratings are the maximum amount of each that a
diode can handle. For instance, a 5 amp diode can only handle 5 amps before
failure. They, like capacitors, have a marking (a cathode band) denoting the
negative terminal. Light-emitting diodes (LED) emit infrared light, have a PIV
rating of 100 to 150 volts, a maximum current rating of 40 milliamps, are powered
in low-powered DC circuits of 12 volts or less, and are used with a resistor to limit
the current.

TRANSISTORS
Transistors are divided into two categories: signal, where they amplify a signal in
things such as radios, telephones, etc., and power, where they switch a signal on or
off in things such as motor drivers and power supplies. Size is usually a way to tell
the two apart. Transistor are identified by a unique code, like 2N2222 or
MPS6519, designating what kind of application they are for. To find this out, refer
to a data book to locate the different characteristics and ratings. A signal transistor
is small and can come in either a plastic or metal case. A power transistor is larger
and always has a metal case to dissipate heat.
fig 3.3 Bipolar Transistors

POWER SUPPLIES
There are many types of power supply. Most are designed to convert high voltage
AC mains electricity to a suitable low voltage supply for electronics circuits and
other devices. A power supply can by broken down into a series of blocks, each of
which performs a particular function.
For example a 5V regulated supply:

Regulated Voltag
230V AC
Transformer Rectifier Smoothing Regulator

Fig3.4 Block diagram of a regulated power supply system

Each of the blocks is described in more detail below:

 Transformer - steps down high voltage AC mains to low voltage AC.


 Rectifier - converts AC to DC, but the DC output is varying.
 Smoothing - smoothes the DC from varying greatly to a small ripple.
 Regulator - eliminates ripple by setting DC output to a fixed voltage.
Power supplies made from these blocks are described below with a circuit diagram
and a graph of their output:

 Transformer only
 Transformer + Rectifier
 Transformer + Rectifier + Smoothing
 Transformer + Rectifier + Smoothing + Regulator

Transformer only

(a) (b)
fig 3.5 (a) a transformer (b) output voltage wave form of the transformer

The low voltage AC output is suitable for lamps, heaters and special AC motors. It
is not suitable for electronic circuits unless they include a rectifier and a smoothing
capacitor.

Transformer + Rectifier

(a) (b)
Fig 3.6 (a) Transformer + Rectifier circuit (b) output wave form of (a)

The varying DC output is suitable for lamps, heaters and standard motors. It is not
suitable for electronic circuits unless they include a smoothing capacitor.

Transformer + Rectifier + Smoothing

(a) (b)

Fig 3.7 (a) Full wave bridge rectification + filtering capacitor (b) waveform of (a)

The smooth DC output has a small ripple. It is suitable for most electronic circuits.

Transformer + Rectifier + Smoothing + Regulator

(a) (b)

Fig 3.8 (a) power supply circuit (b) output voltage or waveform of (a)

The regulated DC output is very smooth with no ripple. It is suitable for all
electronic circuits.[4]
3.3 TEMPERATURE SENSING

The temperature sensor of our electronic thermometer is LM35DZ. It measures


from 0°C to 100°C with a very linear output graph. For one degree change, it
increases its output to 10mV.

The LM35 - An Integrated Circuit Temperature Sensor has amazing advantages


over other temperature transducers. Some advantages includes:

 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.

Fig 3.9 LM35 temperature sensor

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 oC 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)

In this circuit, parameter values commonly used are:

 Vc = 4 to 30v
 5v or 12v are typical values used.
 Ra = Vc /10-6

Actually, it can range from 80 KΩ to 600 KΩ, but most just use 80 KΩ.

CHARACTERISTICS OF LM35

 The output voltage is converted to temperature by  a simple conversion


factor.
 The sensor has a sensitivity of 10mV / oC.
 Use a conversion factor that is the reciprocal that is 100 oC/V.
 The general equation used to convert output voltage to temperature is:
 Temperature ( oC) = Vout * (100 oC/V)
 So if  Vout  is  1V , then, Temperature = 100 oC
 The output voltage varies linearly with temperature.
 Table 3.1 LM35 datasheet
Temperature
P/N Accuracy (oC) Output (mv/oC)
Range (oC)

LM35A  -55 to 150  1.0  10

LM35  -55to 150 1.5 10

LM35CA -40 to 110 1.0 10

LM35C -40 to 110 1.5 10

LM35D  0 to 100 2.0 10

3.4 ANALOG TO DIGITAL CONVERSION

To be able to implement analog to digital conversion using the ADC0804LCN, 8-


bit A/D converter, one would need to design a circuit and program the chip so that
when an analog signal is given as input, the equivalent digital voltage is displayed
on an a seven segment display. Thus, in effect, the circuit would function like a
simple voltmeter.

The ability to convert analog signals to digital and vice-versa is very important in
signal processing. The objective of an A/D converter is to determine the output
digital word corresponding to an analog input signal.
The Datasheet for ADC0804LCN shows the pin out and a typical application
schematic. The A/D converter operates on the successive approximation principle.
Analog switches are closed sequentially by successive-approximation logic until
the analog differential input voltage [Vin(+) - Vin(-)] matches a voltage derived from a
tapped resistor string across the reference voltage.[5]

The normal operation proceeds as follows. On the high-to-low transition of the WR


input, the internal SAR latches and the shift-register stages are reset, and the INTR
output will be set high. As long as the CS input and WR input remain low, the A/D
will remain in a reset state. Conversion will start from 1 to 8 clock periods after at
least one of these inputs makes a low-to-high transition. After the requisite number
of clock pulses to complete the conversion, the INTR pin will make a high-to-low
transition. This can be used to interrupt a processor, or otherwise signal the
availability of a new conversion. A RD operation (with CS low) will clear the
INTR line high again. The device may be operated in the free-running mode by
connecting INTR to the WR input with CS=0.

Since this is an 8-bit A/D converter, a voltage from 0-5V. O will be represented as
0000 0000 (0 in decimal) and 5V is represented as 1111 1111 (256 in decimal). To
convert a value X volts to decimal, use the following formula:
X * 5.0 /256
Figure 3.10 diagram of analog-to-digital converter interface to a microcontroller
 
3.5 THE SYSTEM INTERFACE
Analog signals are very common inputs to embedded systems .Most transducers
and sensors such as temperature, pressure, velocity, humidity are analog. Therefore
we need to convert these analog signals in to digital so that 8051 can read it.

 3.5.1 ANALOG DIGITAL TO CONVERTER - ADC


Figure 3.11. diagram of ADC0804 Pin out configuration

PIN OUT DESCRIPTION


 • CS – Chip Select, active low
 • RD – Read Digital data from ADC, H-L edge triggered
 • WR -- Start conversion, L-H pulse edge triggered
 • INTR -- end of conversion, Goes low to indicate conversion done
 • Data bits -- D0-D7
CLK IN & CLK R

CLK IN is an input pin connected to an external clock source when an external


clock is used for timing. However, ADC804 has an internal clock  

   generator.
   To use the internal clock generator of the ADC804, the CLK IN and CLK R pins
are connected to a capacitor and a resistor. In that case, the  

   clock frequency is determined by the equation.


   f = 1/1.1RC
   R=10K and C=150pF f=606Hz
   the conversion time is 110us. 
 INPUT VOLTAGE RANGE

• Default 0-5V. Can be changed by setting different value for Vref/2 pin.
   Vin=Vin(+) – Vin (-)

• Range = 0 to 2x Vref/2.
    for Vin = 2x Vref/2. we get 256 as a digital output on D0-D7. (Refer Table)

•Step Size a Smallest change


– (2 x Vref/2)/ 256 for ADC804

for e.g. for  step size 10mv ,digital output on D0-D7 changes by one count for
every 10mv change of  the input analog voltage

Table 3.2 voltage ranges for different Vin

Vref/2 Vin Step size


(Volts) (Volts) (mV)

5/256 =
Open (2.5) 0 to 5
19.53

5.12/256
2.56 0 to 5.12
=20

2.56/256 =
1.28 0 to 2.56
10

0.5 0 to 1 1/256=3.90

 DATA OUTPUT
 Dout = Vin / Step Size

for input voltage of 2.56 volts (Vref=1.28 volts)  and step size of 10mv Dout
=2560/10 =256  or FF that is full scale output.
This family of A/D converters was designed for easy microprocessor interfacing.
These converters can be memory mapped with appropriate memory address
decoding for CS (read) input. The active-Low write pulse from the processor is
then connected to the WR input of the A/D converter, while the processor active-
Low read pulse is fed to the converter RD input to read the converted data. If the
clock signal is derived from the microprocessor system clock, the
designer/programmer should be sure that there is no attempt to read the converter
until 74 converter clock pulses after the start pulse goes high. Alternatively, the
INTR pin may be used to interrupt the processor to cause reading of the converted
data. Of course, the converter can be connected and addressed as a peripheral (in
I/O space) [7]

The ADC can be interfaced to a microcontroller following the procedure below:


Signals to be interfaced (on the ADC804)

 D0-D7, RD, WR, INTR, CS


 Can do both Memory mapping and IO mapping
Memory Mapping (timing is critical)
 Connect D0-D7 of ADC804 to the data bus of the 8051 system
 Connect RD, WR of the ADC804 to the 8051 system (ensure polarity)
 Connect CS of ADC804 to an appropriate address decoder output
 Connect INTR of ADC804 to an external interrupt Pin on the 8051 (INT0 or
INT1) 

Algorithm
 Make CS=0 and send a low-to-high to pin WR to start the conversion.
 Keep monitoring INTR
 If INTR =0, the conversion is finished and we can go to the next step.
 If INTR=1, keep polling until it goes low.
 After INTR=0, we make CS=0 and send a high-to-low pulse to RD to get the
data out of the ADC804 chip.

3.5.2 MICROCONTROLLER (ATMEL 89C52)

Fig 3.12 89c52 microcontroller pin diagram

The 89c52 microcontroller has the following pin out function as shown in the
figure 3.7 below. This is useful when connecting or interfacing with ADC.
ALE/PROG: Address Latch Enable output pulse for latching the low byte of the
address during accesses to external memory. ALE is emitted at a constant rate of
1/6 of the oscillator frequency, for external timing or clocking purposes, even
when there are no accesses to external memory. (However, one ALE pulse is
skipped during each access to external Data Memory.) This pin is also the program
pulse input (PROG) during EPROM programming.

PSEN: Program Store Enable is the read strobe to external Program Memory.
When the device is executing out of external Program Memory, PSEN is activated
twice each machine cycle (except that two PSEN activations are skipped during
accesses to external Data Memory). PSEN is not activated when the device is
executing out of internal Program Memory.

EA/VPP: When EA is held high the CPU executes out of internal Program
Memory (unless the Program Counter exceeds 0FFFH in the 80C51). Holding EA
low forces the CPU to execute out of external memory regardless of the Program
Counter value. In the 80C31, EA must be externally wired low. In the EPROM
devices, this pin also receives the programming supply voltage (VPP) during
EPROM programming[6][9].

XTAL1: Input to the inverting oscillator amplifier.


XTAL2: Output from the inverting oscillator amplifier.

Port 0: Port 0 is an 8-bit open drain bidirectional port. As an open drain output
port, it can sink eight LS TTL loads. Port 0 pins that have 1s written to them float,
and in that state will function as high impedance inputs. Port 0 is also the
multiplexed low-order address and data bus during accesses to external memory. In
this application it uses strong internal pull-ups when emitting 1s. Port 0 emits code
bytes during program verification. In this application, external pull-ups are
required.
Port 1: Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. Port 1 pins
that have 1s written to them are pulled high by the internal pull-ups, and in that
state can be used as inputs. As inputs, port 1 pins that are externally being pulled
low will source current because of the internal pull-ups.

Port 2: Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. Port 2 emits
the high-order address byte during accesses to external memory that use 16-bit
addresses. In this application, it uses the strong internal pull-ups when emitting 1s.

Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. It also serves
the functions of various special features of the 80C51 Family as follows:
Port Pin Alternate Function
P3.0 RxD (serial input port)
P3.1 TxD (serial output port)
P3.2 INT0 (external interrupt 0)
P3.3 INT1 (external interrupt 1)
P3.4 T0 (timer 0 external input)
P3.5 T1 (timer 1 external input)
P3.6 WR (external data memory write strobe)
P3.7 RD (external data memory read strobe)
VCC: Supply voltage
VSS: Circuit ground potential

3.5.3 TEMPERATURE CALIBRATION AND CONVERSION TABLE


The ADC804 has 8-bit resolution with a maximum of 256 steps and the LM35 
produces 10mV for every degree of temperature change.
The calibration is done such that, for temperature range of  0 to 100°C , voltage in
at the input of ADC will be 0 to 2.56 v. The reference is set to Vref/2 = 1.28V
so step size will be 2560mv/256 = 10mv also for every degree change in temp.
LM35 output changes by 10mv ,so  every degree change in temp. will produce 1
unit change in digital out of ADC . Thus resolution of our system will be 1deg C ,
which is Smallest temp. that we can measure with this system. Output of an ADC
is from 00 TO FFH for  an input voltage variation of 0 to 5.12V. Lookup table
method was used to display the proper temperature. An small example of a
lookup table has been shown below. Values corresponding to output of ADC are
selected  from lookup table and displayed.

Table 3.3 CONCEPT FOR LOOK- UP  TABLE:


ADC OUTPUT TEMPERATURE IN DEG.CEL
0000 00
0001 01
0002 02
0003 03
0004 04
0005 05
Cntd  cntd
00FE 254
00FF 255

 3.5.4 ACCURACY OF THE MEASUREMENT


The accuracy of the temperature measurement highly depends upon the stability of
the reference voltage. If the reference voltage drifts from the value that we
considered in our calculation, the measured temperature value could be
significantly off from the actual value. Using a simple diode-resistor network for
deriving a reference voltage may not be a very good idea, but the purpose of this
project was to demonstrate the technique, not to come up with a commercial digital
thermometer product. You can also try a Zener diode or a potentiometer to derive
the reference voltage. Besides, the quantization error introduced by the 10-bit
ADC, rounding numbers while doing the math, and the accuracy of the sensor
itself within the desired range of temperature also affect the measurement output.

3.6 INTERFACING 89C52 TO SEVEN-SEGMENT DISPLAY USING


MULTIPLEXING METHOD

Fig 3.13 seven segment Anode and Cathode configuration

Basically there are two types of 7-Seg display's: Common Cathode where all the
segments share the same Cathode.  Common Anode where all Segments share the
same Anode. Here we will be only discussing the Common Anode type. In
common Anode in order to turn ON a segment the corresponding pin must be set to
0. And to turn it OFF it is set to 1. [8]
(a)

(b)
Fig 3.14 (a) 7-segment display pin out (b)interfacing 7-segment to a
microcontroller
Table 3.4 seven segment truth table

 A lookup table containing the seven segment pattern is used to display the


corresponding hex digits. e.g. consider we have to display '1' from the above
figure  we come to know that turning ON segment B & C will show '1' on the 7-seg
display so P2.1 & P2.2 should be LOGIC 0 whereas rest of the pins should be
LOGIC 1. Table 3.3 shows the lookup table for CA (common Anode) display. [9]
Figure 3.15 seven segment interface to microcontroller

We can now interface a single 7-Seg to the microcontroller but for interfacing
multiple 7-seg's we use Scanning Principle where One 7-seg is displayed after
another but this process is very fast hence the flickering cannot be seen by human
eye. Figure 3.10 shows the circuit for interfacing two 7 segment displays. 

When interfacing more than one 7-seg display the segment's (A-G) of all displays
are connected together  whereas their ANODE (Cathode in case of CC displays)
are switched ON one after another. Consider we have to display '31' on the above
7-seg display so we TURN ON the first transistor by setting its corresponding pin
to 1 & then give the 7-seg equivalent code for '3' which is 4fh.[10]
Then we TURN OFF the first transistor & TURN ON the second & output its
corresponding 7-seg equivalent code of '1' i.e. 06h.Then we again go back to
display '3' this is a never ending loop.  

Fig 3.16 A complete circuit diagram of microcontroller based telemetry


temperature monitor

CHAPTER FOUR
CONSTRUCTION AND OPERATION

4.1 CONSTRUCTION

The subsystems of this project were interconnected or integrated to work as a


system. The integration of this system is necessary so as to tailor each unit of the
system to perform a targeted result. The transducer was interconnected to analog-
to- digital converter to be able convert the analog quantity of the ambient
temperature to a digital output. The ADC in turn was connected to a
microcontroller for processing and displaying of the result through the seven-
segment display unit. With all these interconnectivity, the different subsystems can
now be said to be working as a system, in that they can interact with each other to
produce a definite result. It is worth noticing that each time there is a fault in any
of the subsystems, the whole system will malfunction. By that, each subsystem is
indispensable.

4.1 PRINCIPLE OF OPERATION


The temperature sensor used in this project is LM35 which is very suitable for
measuring ambient atmospheric temperatures, but you could replace it with any
other type of temperature sensor, that would function in a range that is more
adequate to your application. As the ambient temperature is sensed, the output of
the LM35 is 10mV/oC. In other words, for each increase in temperature, the
output voltage is multiplied by 10mV. And since the output is analog in nature, it
needed some sort of conversion for the microcontroller to process and give a
digital output that is expected. Hence, the use of analog- to- digital converter was
employed.

As we noticed in the last paragraph, the Temperature was translated to a directly


proportional voltage, and the relation was considered to be linear over the
concerned operating range. There is need to convert those signals to digital
signals, so that the microcontroller can read it, store it and display it. Many of the
recent microcontrollers incorporate integrated digital to analog converters.

The output of the last stage (the analog voltage) is fed to the ADC via the output of
LM35. After the conversion to digital signal, the out put is now fed to
microcontroller to process the converted data and then send the result to the display
unit ( 7-segement display system) which reflect exactly the temperature of the
surrounding.

The RF module was used to achieve a wireless communication. So, the


microcontroller then transmits the already processed temperature data to the
receiver station. There, the RF receiver is at stand by to receive the data for onward
display on the display unit.

Here, the 89c52 microcontroller is used to implement the temperature meter. This
chip needs to be programmed in order to adequately process the ambient
temperature sensed by the transducer (LM35). A program code was developed to
carry out this function using Assembly Language Programming. The program
entails reading the digital output from the ADC and converting it to 7-segement
display read out. It should ensure that the digital output of the ADC (analog-to-
digital converter) is properly represented using a &-segment display.

Seven-Segments cells are used to display the temperature. The main idea for this
display system, is to connect all the 7-segment cells together in parallel (all the cells
show the same digit), but only power the first cell, then switch the first cell off, and
power the second one, then do the same thing with the last one and repeat this cycle
at a very fast rate. If you provide the appropriate DATA to the cells at the
appropriate time, the number will be displayed without any noticeable flickering.
The decimal point is fixed (from the software) at the middle cell, so there is always
one number after the point.
All the cells are common anode type, the cathodes of each cell are connected with
the cathodes of the other cells, then directly connected to the Port of the
microcontroller.

4.2 TESTING
Like every electronic circuit, this project comprises the power supply unit, input
unit, processing unit and output unit. The following is the result of the individual
testing of the module:
1. POWER SUPPLY UNIT: this unit comprises the transformer, bridge
rectifier, filtering capacitor and a voltage regulator. All electronic gadgets
use a DC voltage source. In this work, TTL (Transistor-Transistor Logic)
was used, hence the need to use 5Volt source. The regulator 7805 stabilizes
the DC voltage to +5V. At the end of the construction, the test was ok. This
unit is very vital in any electronic circuit in that it supplies the required
energy to each module.
2. INPUT UNIT: The key component in this unit is the transducer, LM35
which is a temperature sensor. When subjected under certain temperature it
gives an output that is in consonance with the operational and working
principle.
3. PROCESSING UNIT : ADC0804 converts the analog output of the LM35
to digital signal. The output corresponded to the analog voltage supplied
from the transducer at a certain temperature. The reference voltage was fixed
such that ADC output reflects the ambient temperature on the transducer,
LM35. The ‘super processing ‘ module, the microcontroller gives the work
its automation feature.. it is the brain box of the project. It processes the
digital information from the ADC and display the result on a seven-segment
display. This actually requires some programming to drive the hardware. So,
without the software there won’t be any operation.
4. OUTPUT UNIT: It consists of the display and the output from the
controller, to the RF module. The display was multiplexed to accommodate
the four digit of the seven-segment needed for this project. This is as a result
of limited output pins required to be connected to each segment. During the
test, the module worked well.

This project was working well after all the necessary adjustment and consideration.
All the theories enumerated the previous chapter were implemented practical wise
to validate their various principles and operation. Generally, electronic circuit
comprises individual module interconnected to each other to achieve a certain task.
Therefore, it would be better if the project is tested and verified module by module.
Error in any module will definitely affect the required operation of the overall
circuit. This causes the circuit to malfunction.

4.3 PROBLEMS ENCOUNTERED


Construction of the circuit like this needs patient and diligence. The act of
soldering must be mastered and judiciously applied. It requires absolute
concentration. Little mistake could jeopardize the operation of the circuit. And it is
usually difficult when one does not have troubleshooting skills. It is refreshing as
well as tedious. The connection of wires interwoven to each other sometimes can
cause discouragement, to say the least.
CHAPTER FIVE

CONCLUSION AND RECOMMENDATION

REFERENCES
[1]. Nunnally, C.E., "Teaching Microcontrollers," Proc. of the 26 th Frontiers in Education Annual
Conference, Vol. 1, Nov. 1996, pp. 434-436.
[2]. http://www.8052.com/tutser.phtml

[3]. The 8051 microcontroller and Embedded systems using assembly and C Muhammad Ali
Mazidi, Janice Gillespie Mazidi http://www.avocetsystems.com/.
[4]. Keil Software, dScope Debugger, http://www.keil.com/.
[5]. Virtual Micro Design, Universal microprocessor Program Simulator (UMPS),
http://www.vmdesign.com/.
[6]. Alfredo del Río and Juan José Rodríguez Andina, UVI51: a simulation tool for
teaching/learning the 8051 Microcontroller, 30th ASEE/IEEE Frontiers in Education
Conference, Kansas City, 2000.
[7]. J. Axelson, “Serial Port Complete: Programming and Circuits for RS-232 and RS-485 Links
and Networks”, Lakeview Research, Madison, WI, 1998.
[8]. Circuit Cellar INK, the Computer Applications Journal, Issue 107, June 1999.
[9].www.pjrc.com/tech/8051/autobaud.html.
[10]. multiprocessor communication
www.8051projects.net/forum-t6680.html
[11]. Scott Mckenzie, “The 8051 Microcontroller”, Third edition, pp 218.
[12]. www.google.com/ ADC interfacing reference page.
[13].www.8052.com/Tutorial: Introduction to LM35 Interfacing
[14] www.rf-data.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy