Está en la página 1de 42

CONTENTS

INTRODUCTION _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_____
POWER SUPPLY SEGMENT
POWER SUPPLY SEGMENT _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
____
FEMALE CONNECTOR _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
____
VOLTAGE REGULATOR _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
____
CAPACITOR _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
___
RESISTOR _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
____
LED _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
___
CONTROLLER SEGMENT
CONTROLLER SEGMENT _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
____
MCU BASE _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
___
MCU _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
__
PIN CONFIGURATION _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
___
CONNECTION _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
___
INPUT SEGMENT
KEYPAD_ _ _ _ _ _ _ __ _ _ _ _ __ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
__

OPERATIONAL SEGMENT _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
______
PROJECT ON BOARD _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_____
CIRCUIT DIAGRAM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_____
CONCLUSION _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
____
REFERENCES _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ __

TOUCHSCREEN BASED LED PATTERN


The world is going to be automatic. The methods which are in use now a day is totally manually
operated which needs more man power. We are going to develop a new technology through
which we can replace the manual switches by the touch screens. This project is carried over
using the embedded technology.
This system can be divided into different segments as:

Power supply segment


Controller segment
Input segment
Display segment
Operational segment

POWER SUPPLY
Description:
Power supply is the circuit from which we get a desired dc voltage to run the other circuits. The voltage
we get from the main line is 230V AC but the other components of our circuit require 5V DC. Hence a
step-down transformer is used to get 12V AC which is later converted to 12V DC using a rectifier. The
output of rectifier still contains some ripples even though it is a DC signal due to which it is called as
Pulsating DC. To remove the ripples and obtain smoothed DC power filter circuits are used. Here a
capacitor is used. The 12V DC is rated down to 5V using a positive voltage regulator chip 7805. Thus a
fixed DC voltage of 5V is obtained.
A 5V regulated supply is taken as followed:

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.

TRANSFORMER
Transformer is the electrical device that converts one voltage to another with little loss of power.
Transformers work only with AC. There are two types of transformers as Step-up and Step-down
transformer. Step-up transformers increase voltage, step-down transformers reduce voltage. Most power
supplies use a step-down transformer to reduce the dangerously high mains voltage to a safer low voltage.
Here a step down transformer is used to get 12V AC from the supply i.e. 230V AC.

RECTIFIERS
A rectifier is a circuit that converts AC signals to DC. A rectifier circuit is made using diodes. There are
two types of

rectifier circuits as Half-wave rectifier and Full-wave rectifier depending upon the DC

signal generated.
Half-wave Rectifier: It is the rectifier circuit that rectifies only half part of the AC signal. It uses only a
single diode. It only uses only positive part of the AC signal to produce half-wave varying DC and
produce gaps when the AC is negative.

Full-wave Rectifier: It is also called as Bridge Rectifier. A bridge rectifier can be made using four
individual diodes, but it is also available in special packages containing the four diodes required. It is
called a full-wave rectifier because it uses the total AC wave (both positive and negative sections).

SMOOTHING
Smoothing is performed by a large value electrolytic capacitor connected across the DC supply to act as a
reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The
diagram shows the unsmoothed varying DC (dotted line) and the smoothed DC (solid line). The capacitor
charges quickly near the peak of the varying DC, and then discharges as it supplies current to the
output. Here a capacitor of 330uF is used as a smoothing circuit.

VOLTAGE REGULATION
Voltage regulators produce fixed DC output voltage from variable DC (a small amount of AC on it).
Normally we get fixed output by connecting the voltage regulator at the output of the filtered DC. It
can also used in circuits to get a low DC voltage from a high DC voltage (for example we use 7805
to get 5V from 12V). There are two types of voltage regulators

1. fixed voltage regulators (78xx, 79xx)


2. Variable voltage regulators (LM317)
In fixed voltage regulators there is another classification
1. Positive voltage regulators
2. Negative voltage regulators
POSITIVE VOLTAGE REGULATORS:
This includes 78xx voltage regulators. The most commonly used ones are 7805 and 7812. 7805 gives
fixed 5V DC voltage if input voltage is in (7.5V-20). You may sometimes have questions like, what
happens if input voltage is <7.5 V or some 3V, the answer is that regulation won't be proper. Suppose if
input is 6V then output may be 5V or 4.8V, but there are some parameters for the voltage regulators like
maximum output current capability, line regulation etc. won't be proper. Remember that electronics
components should be used in the proper voltage and current ratings as specified in datasheet. You can
work without following it, but you won't be able to get some parameters of the component.
NEGATIVE VOLTAGE REGULATORS:
Mostly available negative voltage regulators are of 79xx family. The mainly available 79xx IC's are
7905,7912 1.5A output current ,short circuit protection, ripple rejection are the other features of 79xx IC's.

Many of the fixed voltage regulators have 3 leads and look like power transistors, such as the 7805 (+5V
1A) regulator shown on the above. If adequate heat sinking is provided then it can deliver up to maximum
1A current. For an output voltage of 5v-18v the maximum input voltage is 35v and for an output voltage

of 24V the maximum input voltage is 40V.For 7805 IC, for an input of 10v the minimum output voltage is
4.8V and the maximum output voltage is 5.2V. The typical dropout voltage is 2V.

CAPACITOR:A capacitor (formerly known as condenser) is a passive electronic component consisting of a


pair of conductors separated by a dielectric (insulator). An ideal capacitor is characterized by a
single constant value, capacitance, measured in farads. This is the ratio of the electric charge on
each conductor to the potential difference between them.

Electrolytic Capacitors:Electrolytic Capacitors are generally used when very large capacitance values are required.
Electrolytic types of capacitors are polarized. Electrolytic Capacitors are generally used in DC
power supply circuits due to their large capacitances and small size to reduce the ripple voltage
or for coupling and decoupling applications.

Fig 10. Cross section view & symbol

Fig 11. Outer view

Of electrolytic capacitor

CERAMIC CAPACITOR

This type is very popular non polarized capacitor that is small and inexpensive but has poor
temperature stability and poor accuracy. It contains a ceramic dielectric and a phenolic
coating. It is often used for bypass and coupling applications. Tolerances range from +/-5 to
+/-100 percent, while capacitances range from 1 pf to 2.2 uF, with maximum voltage rating
from 3 V to 6 kV.

MYLAR CAPACITOR

It is a non polarized capacitor that is reliable, inexpensive, and has low leakage current but
poor temperature stability. Capacitances range from 0.001 to 10 uF, with voltage ratings from

50 to 600 V.

MICA CAPACITOR

This type is an extremely accurate device with very low leakage


currents. It is constructed with alternate layers of metal foil and mica insulation, stacked
and encapsulated. These capacitors have small capacitances and are often used in high
frequency circuits (eg. : RF circuits). They are very stable under variable voltage and
temperature conditions. Tolerances range from +/-0.25 to +/-5 percent. Capacitances
range from 1 pf to 0.01 uF, with maximum voltage ratings from 100 V to 2.5 kV.
References:1.

www.extremeelectronics.com

2.

www.google.com

RESISTOR
A resistor is a two terminal electronic component that restricts the flow of current in the circuit &
produce a voltage across its terminals that are proportional to the electric current through it in
accordance with ohms law.
V = IR
Resistors can be categorized in two types
Fixed resistors
Variable resistors
Fixed resistors have their fix value. These are the most common type of resistor. These
resistors are cheap and reliable and stability is high.

KINDS OF FIXED RESISTORS: CARBON FILM RESISTOR: The most popular resistor type. This resistor made by depositing a carbon film onto a
small ceramic cylinder. A small spiral groove cut into the film controls the amount of
carbon between the leads, hence setting the resistance. Such resistors show excellent

reliability, excellent solderability, noise stability, moisture stability, and heat stability.
Typical power ratings range from 1/4 to 2 W. Resistances range from about 10 Ohm to 1
MOhm, with tolerances around 5 %.

CORBON COMPOSITION: -

This type is also popular. Its made from a mixture of carbon powder and glue like binder.
To increase the resistance, less carbon is added. These resistors show predictable
performance, low inductance, and low capacitance. Power ratings range from about 1/4 to
2 W. Resistances range from 1 Ohm to about 100 MOhm, with tolerances around +/- 5
percent.

METAL FILM OXIDE: This type is general purpose resistor. It uses a ceramic core coated with a metal oxide film. These
resistors are mechanically and electrically stable and readable during high temperature operation.
They contain a special paint on their outer surfaces making them resistant to flames, solvents,
heat, and humidity. Typical resistances range from 1 Ohm to 200 kOhm, with typical tolerances
of +/- 5 percent.

PRECISION METAL FILM: -

This type is very accurate, ultra low noise resistor. It uses a ceramic substrate coated with a
metal film, all encased in an epoxy shell. These resistors are used in precision devices, such as
test instruments, digital and analog devices, and audio and video devices. Resistances range from
about 10 Ohm to 2 MOhm, with power rating from 1/4 to about 1/2 W, and tolerances of +/- 1
percent.

FOIL RESISTORS: Foil resistors are similar in characteristics to metal film resistors. Their main advantages
are better stability and lower temperature coefficient of resistance (TCR). They have
excellent frequency response, low TCR, good stability, and are very accurate. They are
manufactured by rolling the same wire materials as used in precision wire wound resistors
to make thin strips of foil. This foil is then bonded to a ceramic substrate and etched to
produce the value required. They can be trimmed further by abrasive processes, chemical
machining, or heat treating to achieve the desired tolerance. Their main disadvantage is
that the maximum value is less than metal film resistors.

Grid resistor: In heavy-duty industrial high-current applications, a grid resistor is a large convectioncooled lattice of stamped metal alloy strips connected in rows between two electrodes.
Such industrial grade resistors can be as large as a refrigerator; some designs can handle
over 500 amperes of current, with a range of resistances extending lower than 0.04 ohms.
They are used in applications such as dynamic braking and load banking for
locomotives and trams, neutral grounding for industrial AC distribution, control loads for
cranes and heavy equipment, load testing of generators and harmonic filtering for electric
substations.

HIGH POWER WIRE WOUND

These resistors are used for high power applications. Types include vitreous enamel coated,
cement, and aluminium housed wire wound resistors. Resistive elements are made from a
resistive wire that is coiled around a ceramic cylinder. These are the most durable of the
resistors, with high heat dissipation and high temperature stability. Resistances range from
0.1 Ohm to about 150 kOhm, with power ratings from around 2 W to as high as 500 W, or
more.

VARIABLE RESISTORS (PRESET):Variable resistors provide varying degrees of resistance that can be set with the turn of a knob.
Special kinds of variable resistors include potentiometers, rheostats, and trimmers. Potentiometers
and rheostats are essentially the same thing, but rheostats are used specially for high power AC
electricity, whereas potentiometers typically are used with lower level DC electricity. Both
potentiometers and rheostats are designed for frequent adjustment. Trimmers, on the other hand,
are miniature potentiometers that are adjusted infrequently and usually come with pins that can be
inserted into pcb. They are used for fine tuning circuits (eg. : fine tuning a circuit that goes astray
as it ages), and they are usually hidden within a circuits enclosure box. Variable resistors come
with 2 or 3 terminals. There are 2 kinds of taper, ie. : Linear tapered and nonlinear tapered
(logarithmic). The 'taper' describes the way in which the resistance changes as the control knob is
twisted. Linear taper usually has coded as 'A' while nonlinear tapes has coded as 'B'.
PHOTORESISTORS AND THERMISTORS:-

These are special types of resistors that change resistance when heat or light is applied. Photoresistors are made from semi-conductive materials, such as cadmium sulfide. Increasing the light
level will decrease the resistance. This type also called LDR (Light Dependent Resistor).
Thermistors are temperature sensitive resistors. Increasing the temperature will decrease the
resistance (in most cases). This type also called Thermistor NTC (Negative Temperature
Coefficient). The reciprocal type is Thermistor PTC (Positive Temperature Coefficient). Increasing
the temperature will increase its resistance.

Value of the resistors can be calculated by the standard color coding. Resistors have minimum 3
colors and maximum 6 colors on its body. In resistors having 6 colors last color represents the
maximum power.

LED
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in
many devices. Longer leg of LED represents the anode and the shorter is cathode. LED ratings are
specified by current, not voltage.

Fig 7. LED

SPECIFICATIONS OF LEDS:-

TYPE
STANDARD
STANDARD
STANDARD
STANDARD
HIGH INTENSITY
SUPER BRIGHT

COLOUR
RED
BRIGHT RED
YELLOW
GREEN
BLUE
RED

If(max)
30mA
30mA
30mA
25mA
30mA
30mA

Vf (Typ.)
1.7V
2.0V
2.1V
2.2V
4.5V
1.85V

CONTROLLER
SEGMENT

CONTROLLER SEGMENT
This controller segment is used to control all the operations. It is the most important part of
any automatic or embedded system.

A. COMPONENTS USED

SN.

COMPONENTS

RATING

QUANTITY

1. Microcontroller base

40 pins

2. Microcontroller

AVR ATmega32

2. Microcontroller

AVR ATmega16

3. Capacitor

10uf

Microcontroller base:Microcontroller base is a 40pin IC Socket. It is used for holding the microcontroller. Since
microcontroller is mounted on this base so there is no need of soldering the microcontrollers.
This is the most significant advantage of using the base. In short it prevents the
microcontroller from the overheating at the time of soldering. Microcontroller base is used for
safe handling the most sensitive part(Pins) of Microcontrollers.

Fig 8 40 pin IC base

Microcontrollers:Microcontroller is a cheap, universal integrated circuit that could be programmed and used in
any field of electronics, device or wherever needed. Micro suggests that the device is small,

and controller tells us that the device might be used to control objects, processes, or events.
Another term to describe a microcontroller is embedded controller, because the
microcontroller and its support circuits are often built into, or embedded in, the devices they
control. This is also true for this project. All the input output devices have to interface with it.
Generally three types of microcontrollers are used in embedded Systems,
1. 8051
2. PIC
3. AVR

What is what in the microcontroller?

All the operations within the microcontroller are performed at high speed and quite simply, but the
microcontroller itself would not be so useful if there are not special circuits which make it complete. In
continuation, we are going to put our attention to them.

READ ONLY MEMORY (ROM)

Read Only Memory (ROM) is a type of memory used to permanently save the program being
executed. The size of the program that can be written depends on the size of this memory. ROM
can be built in the microcontroller or added as an external chip, which depends on the type of the
microcontroller. Both options have some disadvantages. If ROM is added as an external chip, the
microcontroller is cheaper and the program can be considerably longer. At the same time, a
number of available pins is reduced as the microcontroller uses its own input/output ports for
connection to the chip.
RANDOM ACCESS MEMORY (RAM)

Random Access Memory (RAM) is a type of memory used for temporary storing data and
intermediate results created and used during the operation of the microcontrollers. The content of
this memory is cleared once the power supply is off. For example, if the program performes an
addition, it is necessary to have a register standing for what in everyday life is called the sum .
For that purpose, one of the registers in RAM is called the "sum" and used for storing results of
addition. The size of RAM goes up to a few KBs.

ELECTRICALLY ERASABLE PROGRAMMABLE ROM (EEPROM)

The EEPROM is a special type of memory not contained in all microcontrollers. Its contents may
be changed during program execution (similar to RAM), but remains permanently saved even
after the loss of power (similar to ROM). It is often used to store values, created and used during
operation (such as calibration values, codes, values to count up to etc.), which must be saved after
turning the power supply off. A disadvantage of this memory is that the process of programming is
relatively slow. It is measured in milliseconds.

SPECIAL FUNCTION REGISTERS (SFR)

Special function registers are part of RAM memory. Their purpose is predefined by the
manufacturer and cannot be changed therefore. Since their bits are physically connected to
particular circuits within the microcontroller, such as A/D converter, serial communication module
etc., any change of their state directly affects the operation of the microcontroller or some of the
circuits. For example, writing zero or one to the SFR controlling an input/output port causes the

appropriate port pin to be configured as input or output. In other words, each bit of this register
controls the function of one single pin.

PROGRAM COUNTER

Program Counter is an engine running the program and points to the memory address containing
the next instruction to execute. After each instruction execution, the value of the counter is
incremented by 1. For this reason, the program executes only one instruction at a time just as it is
written. Howeverthe value of the program counter can be changed at any moment, which causes
a jump to a new memory location. This is how subroutines and branch instructions are executed.
After jumping, the counter resumes even and monotonous automatic counting +1, +1, +1
CENTRAL PROCESSOR UNIT (CPU)

As its name suggests, this is a unit which monitors and controls all processes within the
microcontroller and the user cannot affect its work. It consists of several smaller subunits, of
which the most important are:

Instruction decoder is a part of the electronics which recognizes


program instructions and runs other circuits on the basis of that. The
abilities of this circuit are expressed in the "instruction set" which is
different for each microcontroller family.

Arithmetical Logical Unit (ALU) performs all mathematical and


logical operations upon data.

Accumulator is an SFR closely related to the operation of ALU. It is a


kind of working desk used for storing all data upon which some
operations should be executed (addition, shift etc.). It also stores the

results ready for use in further processing. One of the SFRs, called the
Status Register, is closely related to the accumulator, showing at any
given time the "status" of a number stored in the accumulator (the
number is greater or less than zero etc.).
INPUT/OUTPUT PORTS (I/O PORTS)

In order to make the microcontroller useful, it is necessary to connect it to peripheral devices.


Each microcontroller has one or more registers (called a port) connected to the microcontroller
pins.

OSCILLATOR

Even pulses generated by the oscillator enable harmonic and synchronous operation of all circuits
within the microcontroller. It is usually configured as to use quartz-crystal or ceramics resonator

for frequency stabilization. It can also operate without elements for frequency stabilization (like
RC oscillator). It is important to say that program instructions are not executed at the rate imposed
by the oscillator itself, but several times slower. It happens because each instruction is executed in
several steps. For some microcontrollers, the same number of cycles is needed to execute any
instruction, while it's different for other microcontrollers. Accordingly, if the system uses quartz
crystal with a frequency of 20MHz, the execution time of an instruction is not expected 50nS, but
200, 400 or even 800 nS, depending on the type of the microcontroller!

PROGRAM

Unlike other integrated circuits which only need to be connected to other components and turn
the power supply on, the microcontrollers need to be programmed first. This is a so called "bitter
pill" and the main reason why hardware-oriented electronics engineers stay away from
microcontrollers. It is a trap causing huge losses because the process of programming the
microcontroller is basically very simple.
In order to write a program for the microcontroller, several "low-level" programming languages
can be used such as Assembly, C and Basic (and their versions as well). Writing program
procedure consists of simple writing instructions in the order in which they should be executed.
There are also many programs running in Windows environment used to facilitate the work
providing additional visual tools.
INTERRUPTS

Electronics is usually more faster than physical processes it should keep under control. This is
why the microcontroller spends most of its time waiting for something to happen or execute. In
other words, when some event takes place, the microcontroller does something. In order to
prevent the microcontroller from spending most of its time endlessly checking for logic state on
input pins and registers, an interrupt is generated. It is the signal which informs the central
processor that something attention worthy has happened. As its name suggests, it interrupts
regular program execution. It can be generated by different sources so when it occurs, the
microcontroller immediately stops operation and checks for the cause. If it is needed to perform

some operations, a current state of the program counter is pushed onto the Stack and the
appropriate program is executed. It's the so called interrupt routine.

In this project AVR ATmega16 microcontroller is used.

IMPORTANT FEATURES OF AT MEGA 16:-

8-bit Microcontroller
Advanced RISC Architecture:- 131 Powerful Instructions
- 32 x 8 General Purpose Working Registers
- Fully Static Operation
- Up to 16 MIPS Throughput at 16 MHz

16K Bytes of In-System Self-Programmable Flash


Endurance: 10, 0 00 Write/Erase Cycles
- 512 Bytes EEPROM
Endurance: 100,000 Write/Erase Cycles
-

1K Byte Internal SRAM


Four PWM Channels

- 8-channel, 10-bit ADC


-

Programmable Serial USART


On-chip Analogue Comparator
External and Internal Interrupt Sources
I/O and Packages:-

32 Programmable I/O Lines


40-pin PDIP, 44-lead TQFP
- Operating Voltages:2.7 - 5.5V for AT mega 16L
4.5 - 5.5V for AT mega 16
-

Speed Grades:0 - 8 MHz for ATmega16L

Power Consumption @ 1 MHz, 3V, and 25C :For ATmega16L


Active: 1.1 mA
Idle Mode: 0.35 mA
Power-down Mode: < 1 A

PIN CONFIGURATION:-

Fig. 9 Pin configuration of ATmega 16

ATmega 16 can be divided into four ports:1.


2.
3.
4.

PORT A:- from pin 33 to 40


PORT B:- from pin 1 to 8
PORT C:- from pin 22 to 29
PORT D:- from pin 14 to 21
Each port is an 8 bit bidirectional I/O port. Some pins of ATmega 16 also have some special
function.

PORT A can used as bi-directional port as well as ADC. In this project,We are utilizing the various
functions given in the Atmega 16 MCU. The various functions which are utilized in this project are:

ADC
I/o Operation
Interrupts
USART
Reset

Based on these functions and assembling the proper codes in the Microcontrollers, We made an
executable model for a full proff Security System.

References:1. Datasheet of ATmega16 microcontroller


2. Atmel AVR Microcontroller primer : programing and
Barrett, Daniel J Pack
3. www.google.com

CONNECTIONS

intrefacing

- Steven F

Fig. 11 General Connections of microcontroller

In this section VCC (pin 10) and AVCC (pin 30) of microcontroller is shorted and connected to the output
pin of the 7805. There are two ground terminals (pin 11 and pin 31) present in microcontroller which is

connected with the ground of the 7805. A 10uf capacitor is connected with the ground and AREF of
microcontroller.

ADC

Features:
10-bit Resolution
0.5 LSB Integral Non-linearity
2 LSB Absolute Accuracy
13 - 260 s Conversion Time
Up to 15 KSPS at Maximum Resolution
8 Multiplexed Single Ended Input Channels
Optional Left adjustment for ADC Result Readout
0 - VCC ADC Input Voltage Range
Selectable 2.56V ADC Reference Voltage
Free Running or Single Conversion Mode
ADC Start Conversion by Auto Triggering on Interrupt Sources
Interrupt on ADC Conversion Complete
The ATmega16 features a 10-bit successive approximation ADC. The ADC is connected to
an 8-channel Analog Multiplexer which allows 8 single-ended voltage inputs constructed from
the pins of Port A. The single-ended voltage inputs refer to 0V (GND).
The ADC contains a Sample and Hold circuit which ensures that the input voltage to the ADC
is held at a constant level during conversion. The ADC has a separate analog supply voltage
pin, AVCC. AVCC must not differ more than 0.3 V from VCC.
Internal reference voltages of nominally 2.56V or AVCC are provided On-chip. The volt- age
reference may be externally decoupled at the AREF pin by a capacitor for better noise
performance.

CODING:
#include<avr/adc.h>
void main()
{
unsigned char x;
adc_init();

//for initialization of ADC port

x=read_adc_channel(channel number);
storing in a
}

INPUT SEGMENT

//to read a particular ADC channel and


//variable

In this project touch screen is used as input device.

TOUCH SCREEN
A touch screen is a 2-D sensing device that is constructed of 2 sheets of material
separated slightly by spacers. It provides analogue output. Resistive touch screen:Resistive touch screens have four pins. It works on voltage divider concept.A
common construction is a sheet of glass providing a stable bottom layer and a sheet
of polyethylene (PET) as a flexible top layer. The two sheets are coated with a
resistive Substance usually a metal compound called Indium Tin Oxide (ITO). The
ITO is thinly and uniformly sputtered onto both the glass and the PET layer. Tiny
bumps called spacer dots are then added to the glass side on the top of the resistive
ITO coating to keep the PET film from sagging, causing an accidental or false
touch.

When PET film is pressed down, the two resistive surface meet and the position of
this meeting (a touch) can be read by a touch controller circuit

Fig. 12

resistive touch screen

Calculation of X-Y co-ordinates:


Operations on the touch screen are based on the calculations of coordinates along its
surface. Its coordinates ranges from (0, 0) to (255,255). The X co-ordinate
increases from bottom to top & Y co-ordinate from left to right.
To get the X touch position, the controller sets pin 4 to +5v and pin 2 to ground.
Pin 1 left unconnected and Pin 3 reads the data.
To get the Y touch position, the controller set pin 1 to +5v and pin 3 to ground. Pin
2 left unconnected and Pin 4 reads the data.
Since resistive touch screen works on the principle of voltage divider so the output
voltage varies according to the co-ordinates. It can be seen from the below figure
that the voltage at point A of X and point B of Y is higher than the other points as
shown below.

Fig. 13 Resistor representation of touch screen for X & Y data

Fig. 14 trend of coordinates

Fig. 15 touch screen as input device

Like other sensors touch screen gives analogue output which is converted
into digital by using ADC. Its analogue output is used as input for the
microcontroller
.

OPERATIONAL SEGMENT:

This segment shows us what are the applications performed by this circuit. In this part, we are using
8 LEDs which can take its input from the microcontroller and starts to glow in patterns. Here what
we are doing is just connecting all the LEDs to one of the I/O port of the microcontroller. Whenever
the microcontroller gets its input from the Keypad, It starts to give different patterns accordingly.

CIRCUIT DIAGRAM:

CODE:

DESCRIPTION:
Here in this project we are using a microcontroller Atmega 16 which works as the brain of our
project. First we have made a power supply unit which takes the AC input from the mains and
convert it into the 5v dc. There is a 12-0-12 step-down transformer used in this circuit which
converts the 230v,50 hz AC mains into 12 v AC. Now we have used a bridge rectifier circuit
which converts the 12 v ac into 12 v dc. This 12 v dc is fed to the input of 7805 ic which
regulates this voltage to 5 volt which is needed to drive our microcontroller as well as the other
circuitry used. Our microcontroller takes the input from the touch screen sensor which is
connected to the predefined ADC port of microcontroller i.e. PORTA. There is a series of 8
LEDs connected to the PORTC. After taking the input from the touch screen, the different
patterns is generated which is shown by the series of LEDs.

CONCLUSION:This project will create a revolution in the field of manually operated devices by replacing the same
with the automatic devices.The advantage of using this project is that this project can make the input
part easier which can be used in the toys for the kids. By using this technology further, we can
automate our home also.

REFERENCES:1. Datasheet of 7805


2. Data sheet of touch screen sensor
3. Datasheet of ATmega16 microcontroller
4. Atmel AVR Microcontroller primer : programing and

intrefacing

Steven F Barrett, Daniel J Pack


5. Electronics device and circuit theory- R. L. Boylestad
Websites:6. http://www.electronics-tutorials.ws/index.html
7. http://dsaprojects.110mb.com/electronics/data_book/capacitors.html

8. www.google.com

También podría gustarte