Académique Documents
Professionnel Documents
Culture Documents
:
:
Programming language
Embedded C
Microcontroller
AT89C51
Power Supply
Crystal
LCD
Sensor
Applications
Developed By
11.0592MHz
16*2
:
LM358
TLCindia Pvt.Ltd
Phone
9705351122
Website
www.tlcindia.org
ABSTRACT:
the temperature circuit is used to find the intensity of light. Depending on the intensity
of light the value of resistance across the temperature will change, so the output voltage will
change by changing the value of resistance (10k pot). We have to fix the output voltage as
maximum as possible. Whenever light intensity is changes from that temperature voltage level is
changing. With the help of temperature it is easy to find out the documents or files who can be
Thefted with the help of the buzzer. If we are implementing this concept for the industries, it is
very useful for indicating thieves.
In this project we provide the temperature prevention system in two ways one is air
prevention and another one is water prevention. In air prevention system whenever the
temperature rises fans at the machines are automatically on until the temperature became low.
Another one is water prevention system whenever the temperature rises water pumps on at that
machines.
This project works with 12v regulated power supply. Power on led is connected for visual
identification of power status. This project uses regulated 12v, 750ma power supply. 7812 three
terminal voltage regulator is used for voltage regulation. Bridge type full wave rectifier is used to
rectify the ac output of secondary of 230/18v step down transformer.
BLOCK DIAGRAM
Temperat
ure
sensor
Controller
Power
supply
unit
LED -1
11.0592MH
z
RELAY
Crystal
Oscillator
RESET
FAN
Step
dow
n T/F
Bridge
Rectifier
Filter
Circuit
Regulato
r
Conventional power
supply
purpose definition of embedded systems is that they are devices used to control, monitor or assist
the operation of equipment, machinery or plant. "Embedded" reflects the fact that they are an
integral part of the system. At the other extreme a general-purpose computer may be used to
control the operation of a large complex processing plant, and its presence will be obvious.
All embedded systems are including computers or microprocessors. Some of these computers are
however very simple systems as compared with a personal computer.
The very simplest embedded systems are capable of performing only a single function or set of
functions to meet a single predetermined purpose. In more complex systems an application
program that enables the embedded system to be used for a particular purpose in a specific
application determines the functioning of the embedded system. The ability to have programs
means that the same embedded system can be used for a variety of different purposes. In some
cases a microprocessor may be designed in such a way that application software for a particular
purpose can be added to the basic software in a second process, after which it is not possible to
make further changes. The applications software on such processors is sometimes referred to as
firmware.
The simplest devices consist of a single microprocessor (often called a "chip), which may itself
be packaged with other chips in a hybrid system or Application Specific Integrated Circuit
(ASIC). Its input comes from a detector or sensor and its output goes to a switch or activator
which (for example) may start or stop the operation of a machine or, by operating a valve, may
control the flow of fuel to an engine.
As the embedded system is the combination of both software and hardware
Embedded
System
Software
Hardware
ALP
Processor
Peripherals
VB
memory
Etc.,
Construction industry
Transport
Domestic service
Communications
AT89C51 MICROCONTROLLER
FEATURES
80C51 based architecture
4-Kbytes of on-chip Reprogrammable Flash Memory
128 x 8 RAM
Two 16-bit Timer/Counters
Full duplex serial channel
Boolean processor
Four 8-bit I/O ports, 32 I/O lines
Memory addressing capability
GENERAL DESCRIPTION:
THE MICROCONTROLLER:
A microcontroller is a general purpose device, but that is meant to read data, perform
limited calculations on that data and control its environment based on those calculations. The
prime use of a microcontroller is to control the operation of a machine using a fixed program that
is stored in ROM and that does not change over the lifetime of the system. The microcontroller
design uses a much more limited set of single and double byte instructions that are used to move
data and code from internal memory to the ALU. The microcontroller is concerned with getting
data from and to its own pins; the architecture and instruction set are optimized to handle data in
bit and byte size.
The AT89C51 is a low-power, high-performance CMOS 8-bit microcontroller with 4k
bytes of Flash Programmable and erasable read only memory (EROM). The device is
manufactured using Atmels high-density nonvolatile memory technology and is functionally
compatible with the industry-standard 80C51 microcontroller instruction set and pin out. By
combining versatile 8-bit CPU with Flash on a monolithic chip, the Atmels AT89c51 is a
powerful microcomputer, which provides a high flexible and cost- effective solution to many
embedded control applications.
PIN DESCRIPTION:
VCC
Supply voltage
GND
Ground
Port 0
Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight
TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs.
Port 0 can also be configured to be the multiplexed low order address/data bus during
access to external program and data memory. In this mode, P 0 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 1 is an 8-bit bi-directional I/O port with internal pull-ups. The port 1output buffers
can sink/source four TTL inputs. When 1s are written to port 1 pins, they are pulled high by the
internal pull-ups can be used as inputs. As inputs, Port 1 pins that are externally being pulled low
will source current (1) because of the internal pull-ups.
Port 2
Port 2 is an 8-bit bi-directional 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 pull-ups can be used as inputs. As inputs, Port 2 pins that are externally being pulled low
will source current because of the internal pull-ups.
Port 2 emits the high-order address byte during fetches from external program memory
and during access to DPTR. In this application Port 2 uses strong internal pull-ups when emitting
1s. During accesses to external data memory that use 8-bit data address (MOVX@R1), 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 bi-directional I/O port with internal pull-ups. The port 3 output buffers
can sink/source four TTL inputs. When 1s are written to port 3 pins, they are pulled high by the
internal pull-ups can be used as inputs. As inputs, Port 3 pins that are externally being pulled low
will source current because of the internal pull-ups.
POWER SUPPLY:
The input to the circuit is applied from the regulated power supply. The a.c. input i.e.,
230V from the mains supply is step down by the transformer to 12V and is fed to a rectifier. The
output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c voltage,
the output voltage from the rectifier is fed to a filter to remove any a.c components present even
after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc
voltage.
230V
AC
D.C
Output
50Hz
Step down
transformer
Bridge
Rectifier
Fig:wer supply
Regulator
TEMPERATURE SENSOR
A sensor is a device that measures a physical quantity and converts it into a signal which can be
read by an observer or by an instrument. For example, a mercury-in-glass thermometer converts
the measured temperature into expansion and contraction of a liquid which can be read on a
calibrated glass tube. A thermocouple converts temperature to an output voltage which can be
read by a voltmeter. For accuracy, most sensors are calibrated against known standards.
FIG: LM35
The LM35 series are precision integrated-circuit temperature sensors, whose output
voltage is linearly proportional to the Celsius (Centigrade) temperature.
The LM35 thus has an advantage over linear temperature sensors calibrated in
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 14Cat room temperature and 34C over a full 55 to
+150Ctemperature range.
Low cost is assured by trimming and calibration at the wafer level. The LM35s low
output impedance, linear output, and precise inherent calibration make interfacing
to readout or control circuitry especially easy.
It can be used with single power supplies, or with plus and minus supplies. As it
draws only 60A from its supply, it has very low self-heating, less than 0.1C in still
air. The LM35 is rated to operate over a 55 to +150C temperature range, while
the LM35C is rated for a 40 to +110C range (10with improved accuracy).
The LM35 series is available packaged in hermetic TO-46 transistor packages, while
theLM35C, LM35CA, and LM35D are also available in the plastic TO-92 transistor
package. The LM35D is also available in an 8-lead surface mount small outline
package and a plastic TO-220 package.M35 temperature sensor is used to co
Although the voltage sensor can reach 30 volts but given to sensor is at
5 volts, so
it
can be
supply with
of 60 A this means
USE:-
the ability
the
0.5 C at
temperature
Sensors are used in everyday objects such as touch-sensitive elevator buttons (tactile sensor) and
lamps which dim or brighten by touching the base. There are also innumerable applications for sensors of
which most people are never aware. Applications include cars, machines, aerospace, medicine,
manufacturing and robotics.
A sensor is a device which receives and responds to a signal. A sensor's sensitivity indicates how
much the sensor's output changes when the measured quantity changes. For instance, if the mercury in a
thermometer moves 1 cm when the temperature changes by 1 C, the sensitivity is 1 cm/C (it is basically
the slope Dy/Dx assuming a linear characteristic). Sensors that measure very small changes must have
very high sensitivities. Sensors also have an impact on what they measure; for instance, a room
temperature thermometer inserted into a hot cup of liquid cools the liquid while the liquid heats the
thermometer. Sensors need to be designed to have a small effect on what is measured, making the
sensor smaller often improves this and may introduce other advantages. Technological progress allows
more
and
more
sensors
to
be
manufactured
on
a microscopic
scale as
micro
sensors
using MEMS technology. In most cases, a micro sensor reaches a significantly higher speed and
sensitivity compared with macroscopic approaches.
Thermistors are the most common temperature sensors you'll run across they're just temperaturesensitive resistors (resistance goes down as temperature goes up). The internal chemistry of thermistors
is quite tailor able -- this allows manufacturers to make thermistors with a wide selection of temperature
sensing ranges.
Note that thermistors tend to exhibit a fair amount of variability from unit to unit. So if you're using a pair
of thermistors to give your 'bot the ability to find warm or cool areas, you'll want to incorporate a
potentiometer to allow you to "tune" their response a bit (or else, buy a number of thermistors and attempt
to find a "matching" pair).
AD-590s are temperature sensing integrated circuits which output a current proportional to
temperature. While more expensive than thermistors (about $5 US each, vs. a few cents for a thermistor),
they are also much more accurate. This allows you to dispense with matching and tuning should you be
using temperature sensors as a "homing" device.
current, which is then measured and processed and a numerical temperature value
is computed.
Thermocouples
Thermocouples are a physically simple sensor, though how they function is more
complex. Figure 1 shows the basic wiring of a thermocouple. A thermocouple is
comprised of two dissimilar alloys (wires A and B) joined at one end, called the hot
junction (T1). The other leads are connected to a voltmeter or other input device
that measures the
voltage
(V1)
across
the
'cold
junction (T2).
The hot junction is the sensing element, and the cold junction is kept at a constant
reference temperature. A voltage is produced as the hot junction is heated, which is
proportional to the temperature difference between the two junctions. This
principle, called the thermocouple effect was discovered by Thomas See beck in
1821 (Awtrey, 2001). And so, the electromotive force (EMF) produced when the
junctions of dissimilar alloys are maintained at different temperatures is known as
the See beck EMF. The theory behind the thermocouple and thermoelectric effect is
based upon the atomic structure of the alloys and is beyond the scope of this
report. The voltage is also dependent upon the type of conductors used. Different
reliability
and
repeatability.
There
exist
eight
standardized
alloy
Thermistors:
Thermistors, like RTDs, vary their resistance as the ambient temperature is
changed. Unlike RTDs, which use pure metals, the material used in a thermistor is
generally a ceramic or polymer. Positive temperature coefficient (PTC) thermistors
will
show
an
increase
of
resistance
(NTC)
with
increasing temperature,
thermistors
will
show
while
decrease
of
use
of
IC temperature sensors
is
limited
to
applications
where
Temperature sensing ICs are available either in analog form, which output a
voltage or current which is proportional to the temperature, or digital, which
communicate temperature over a digital communication line, such as one-wire
PWM, two-wire I2C, or a multiple wire SPI connection.
The Sonic City project developed a wearable system that creates music based
on data from sensors measuring bodily and environmental factors. This includes
environmental temperature measurements. A video summarizing the project is
linked to in the media section below, and Viktoria site for the project has a more
detailed description.
Sound Kitchen includes temperature sensors and uses voltage changes in liquids to
create music. The liquids include wine, soda and other items you might find in a
kitchen, and the over all aesthetic connects strongly with cooking.
The following table offers a comparison of the different characteristics of the various
temperature sensor types.
Characteri
stic
Active
Material
Changing
Parameter
Temperatu
re Range
Platinum RTD
Thermocouple
Metal Oxide
Two Dissimilar
Silicon
Ceramic
Metals
Transistors
Resistance
Resistance
Voltage
-200C to 500C
-40C to 260C
-270C to 1750C
40 mV/C
0.05 mV/C
-45 to 100C:
-45 to 100C:
0 to 275C: 1.5 C
0.5C; 100 to
0.5C;
to 4C; 275 to
Platinum Wire
Sensitivity 2 mv/C
Accuracy
Temperatur
Thermistor
e IC
Voltage or
Current
-55C to
150C
~1 mv/C or
~1 uA/C
2 C
to 1200C: 3C
over 100C
Excellent
Logarithmic, PoorModerate
2-5 s
1-2 s
2-5 s
Excellent
Moderate
Poor
Excellent
1 k to 1 M
< 10 mV
Various
Noise
Low
High
High
Linearity
Response
Time
Stability
Susceptibil
Low
0.75%
Excellent
ity
Drift
years
per year
1 to 2F per year
0.1C per
month
Special
Requireme Lead Compensation Linearization
nts
Device
Cost
$60 - $215
$10 - $350
$20 - $235
Moderate
$5 - $50
Relative
System
Cost
Relays
Low
Inductor
Operation:
When a current flow through the coil, a magnetic field is created around the coil i.e., the
coil is energized. This causes the armature to be attracted to the coil. The armatures
contact acts like a switch and closes or opens the circuit. When the coil is not energized, a
spring pulls the armature to its normal state of open or closed. There are all types of
relays for all kinds of applications.
Transistors and ICs must be protected from the brief high voltage 'spike' produced when the
relay coil is switched off. The above diagram shows how a signal diode (eg 1N4148) is
connected across the relay coil to provide this protection. The diode is connected 'backwards' so
that it will normally not conduct. Conduction occurs only when the relay coil is switched off, at
this moment the current tries to flow continuously through the coil and it is safely diverted
through the diode. Without the diode no current could flow and the coil would produce a
damaging high voltage 'spike' in its attempt to keep the current flowing.
In choosing a relay, the following characteristics need to be considered:
1. The contacts can be normally open (NO) or normally closed (NC). In the NC type, the
contacts are closed when the coil is not energized. In the NO type, the contacts are closed when
the coil is energized.
2. There can be one or more contacts. i.e., different types like SPST (single pole single throw),
SPDT (single pole double throw) and DPDT (double pole double throw) relay.
3. The voltage and current required to energize the coil. The voltage can vary from a few volts to
50 volts, while the current can be from a few milliamps to 20milliamps. The relay has a
minimum voltage, below which the coil will not be energized. This minimum voltage is called
the pull-in voltage.
4. The minimum DC/AC voltage and current that can be handled by the contacts. This is in the
range of a few volts to hundreds of volts, while the current can be from a few amps to 40A or
more, depending on the relay.
A relay is used to isolate one electrical circuit from another. It allows a low current control circuit to make
or break an electrically isolated high current circuit path. The basic relay consists of a coil and a set of
contacts. The most common relay coil is a length of magnet wire wrapped around a metal core. When
voltage is applied to the coil, current passes through the wire and creates a magnetic field. This magnetic
field pulls the contacts together and holds them there until the current flow in the coil has stopped. The
diagram below shows the parts of a simple relay.
Figure: Relay
Operation:
When a current flows through the coil, the resulting magnetic field attracts an armature that is
mechanically linked to a moving contact. The movement either makes or breaks a connection with a fixed
contact. When the current is switched off, the armature is usually returned by a spring to its resting
position shown in figure 6.6(b). Latching relays exist that require operation of a second coil to reset the
contact position.
By analogy with the functions of the original electromagnetic device, a solid-state relay operates a
thyristor or other solid-state switching device with a transformer or light-emitting diode to trigger it.
Pole and throw
SPST
SPST relay stands for Single Pole Single Throw relay. Current will only flow through the contacts when
the relay coil is energized.
HELLO is a simple program that prints the string "Hello World" using the
Serial Interface.
MEASURE is a data acquisition system for analog and digital systems.
TRAFFIC is a traffic light controller with the RTX Tiny operating system.
SIEVE is the SIEVE Benchmark.
DHRY is the Dhrystone Benchmark.
WHETS is the Single-Precision Whetstone Benchmark.
Additional example programs not listed here are provided for each device
architecture.
Building an Application in Vision4
To build (compile, assemble, and link) an application in Vision4, you must:
1. Select Project -(forexample,166\EXAMPLES\HELLO\HELLO.UV4).
2. Select Project - Rebuild all target files or Build target.
Vision4 compiles, assembles, and links the files in your project.
ADVANTAGES:
APPLICATIONS:
Home appliances.
Offices, banks.
Educational institutions.
Industrial appliances.