+ All Categories
Home > Documents > GSM_BASED_VOTING_SYSTEM

GSM_BASED_VOTING_SYSTEM

Date post: 12-Apr-2017
Category:
Upload: chandan-mishra
View: 96 times
Download: 0 times
Share this document with a friend
74
1
Transcript
Page 1: GSM_BASED_VOTING_SYSTEM

1

Page 2: GSM_BASED_VOTING_SYSTEM

INDEX

CONTENTS

1. Abstract

2. Introduction

3. Components

4. Schematic Description

5. Hardware Components

Micro Controller

Power Supply

LCD

GSM

6. Software components

7. Future Enhancement

8.Conclusion

9.Bibliography

2

Page 3: GSM_BASED_VOTING_SYSTEM

ABSTRACT:

This paper presents the design of a GSM based electronic voting

machine with voter tracking. The design presented here follows a GSM

based approach to send the polling results to a base station via mobile

network. Infrared sensors have been used for tracking the information

regarding the voters. After the voting process has been over, the results

are sent to the base station for various analyses and declaring the verdict.

This system is more secured and chances of tampering the results are

reduced. The simulation of the system is done on Proteus Professional

Software v8.0. The design presented in this paper is more secured and

appropriate according to modern day requirements.

INTRODUCTION:

An Embedded System is a combination of computer hardware and software, and perhaps

additional mechanical or other parts, designed to perform a specific function. An embedded

system is a microcontroller-based, software driven, reliable, real-time control system,

autonomous, or human or network interactive, operating on diverse physical variables and in

diverse environments and sold into a competitive and cost conscious market.

3

Page 4: GSM_BASED_VOTING_SYSTEM

An embedded system is not a computer system that is used primarily for processing, not a

software system on PC or UNIX, not a traditional business or scientific application. High-end

embedded & lower end embedded systems. High-end embedded system - Generally 32, 64 Bit

Controllers used with OS. Examples Personal Digital Assistant and Mobile phones etc .Lower

end embedded systems - Generally 8,16 Bit Controllers used with an minimal operating systems

and hardware layout designed for the specific purpose.

SYSTEM DESIGN CALLS:

Figure 3(a): Embedded system design calls

4

Page 5: GSM_BASED_VOTING_SYSTEM

EMBEDDED SYSTEM DESIGN CYCLE

Figure 3(b):“V Diagram”

Characteristics of Embedded System• An embedded system is any computer system hidden inside a product other than a

computer.

• They will encounter a number of difficulties when writing embedded system software in

addition to those we encounter when we write applications.

– Throughput – Our system may need to handle a lot of data in a short period of

time.

– Response–Our system may need to react to events quickly.

– Testability–Setting up equipment to test embedded software can be difficult.

– Debugability–Without a screen or a keyboard, finding out what the software is

doing wrong (other than not working) is a troublesome problem.

– Reliability – embedded systems must be able to handle any situation without

human intervention.

– Memory space – Memory is limited on embedded systems, and you must make

the software and the data fit into whatever memory exists.

5

Page 6: GSM_BASED_VOTING_SYSTEM

– Program installation – you will need special tools to get your software into

embedded systems.

– Power consumption – Portable systems must run on battery power, and the

software in these systems must conserve power.

– Processor hogs – computing that requires large amounts of CPU time can

complicate the response problem.

– Cost – Reducing the cost of the hardware is a concern in many embedded system

projects; software often operates on hardware that is barely adequate for the job.

• Embedded systems have a microprocessor/ microcontroller and a memory. Some have a

serial port or a network connection. They usually do not have keyboards, screens or disk

drives.

APPLICATION

1) Military and aerospace embedded software applications

2) Communicat ion Appl icat ions

3) Indust r ia l automat ion and process control sof tware

4) Mastering the complexity of applications.

5) Reduction of product design time.

6) Real time processing of ever increasing amounts of data.

7) Intelligent, autonomous sensors.

CLASSIFICATION

Real Time Systems.

RTS is one which has to respond to events within a specified deadline.

A right answer after the dead line is a wrong answer.

RTS CLASSIFICATION

Hard Real Time Systems

Soft Real Time System

6

Page 7: GSM_BASED_VOTING_SYSTEM

HARD REAL TIME SYSTEM

"Hard" real-time systems have very narrow response time.

Example: Nuclear power system, Cardiac pacemaker.

SOFT REAL TIME SYSTEM

"Soft" real-time systems have reduced constrains on "lateness" but still must operate very

quickly and repeatable.

Example: Railway reservation system – takes a few extra seconds the data remains valid.

COMPONENTS:

ELECTRONIC COMPONENTSElectronics are the central nervous system of your robot and will be responsible for

passing information to and from peripheral functions as well as processing inputs and turning them into the output functions the robot performs. Any given hobby robot project might contain a dozen or more electronic components of varying types, including resistors, capacitors, integrated circuits, and light-emitting diodes. In this chapter, you’ll read about the components commonly found in hobby robot projects and their many specific varieties.You’ll also learn their functions and how they are used.

1. Cram Course in Electrical Theory

Understanding basic electronics is a keystone to being able to design and build your own robots. The knowledge required is not all that difficult—in fact the basic theories with diagrams can fit on two sheets of paper (following) which you are encouraged to photocopy and hang up as a quick reference.

Electricity always travels in a circle, or circuit, like the one in Fig. 5-1. If the circuit is broken, or opened, then the electricity flow stops and the circuit stops working.

Electricity consists of electrons, which are easily moved from the atoms of metal conductors. There are two components of electricity that can be measured. Voltage is the pressure applied to the electrons to force them to move through the metal wires as well as the

7

Page 8: GSM_BASED_VOTING_SYSTEM

FIGURE 1-1 Electricity flows in a circle, or circuit, from positive (+) to negative. If the circuit is broken (as when the switch is open), electricity stops flowing and the circuitstops working.

FIGURE 1-2 A digital multimeter can be used to measure the voltage across a component as well as the current through it.

8

Page 9: GSM_BASED_VOTING_SYSTEM

FIGURE 5-4 When resistors are wired in series, the total resistance of the circuit is proportional to the sum of the resistances.

9

Page 10: GSM_BASED_VOTING_SYSTEM

different components in the circuit. As the electrons pass through a component they lose some of the pressure, just as water loses pressure due to friction when it moves through a pipe. The initial voltage applied to the electrons is measured with a volt meter or a multimeter set to measure voltage and is equal to the voltage drops through components in the circuit. The label given to voltage is V.

The second measurement that can be applied to electricity is current, which is the number of electrons passing by a point in a given time. There are literally several billion, billion,billion, billion, billion, billion electrons flowing past a point at a given time. For convenience,the unit Coulomb (C) was specified, which is 6.25 × 1018 electrons and is the basis for the ampere (A), which is the number of electrons moving past a point every second. The label given to current is the non-intuitive i.

The voltage across a component and the current through it can be measured using a digital multimeter as shown in Fig. 5-2. It is important to remember that voltage is the pressure change across a component, so to measure it you have to put a test lead on either side of the component. Current is the volume of electrons moving past a certain point every second, and to measure it, the circuit must be broken and the tester put in line, or in series,with the component being measured.

The current flowing through a component can be calculated if the voltage change, ordrop, is known along with the resistance of the component using Ohm’s law. This law states that the voltage drop across a resistance is equal to the product of the resistance value and the current flowing through it. Put mathematically, Ohm’s law is:

V = i × R

10

Page 11: GSM_BASED_VOTING_SYSTEM

Where V is voltage across the component measured in volts, i is the current through the component measured in amperes or amps, and R is the resistance measured in ohms,which has the symbol Ω. Using algebra, when any two of the three values are known, the third can be calculated. If you are not comfortable using algebra to find the missing value, you can use Ohm’s law triangle (Fig. 1-3). This tool is quite simple to use. Just place your finger over the value you want to find, and the remaining two values along with how they are located relative to one another shows you the calculation that you must do to find the missing value. For the example in Fig. 1-3, to find the formula to calculate current, put your finger over i and the resulting two values V over R is the formula for finding i (divide the voltage drop by the resistance of the component).

Resistances can be combined, which changes the electrical parameters of the entire circuit.For example, in Fig. 1-4 a resistance is shown placed in line or in series and the total resistance is the sum of the resistances. Along with this, the voltage drop across each resistor isproportional to the value of the individual resistors relative to the total resistance of the circuit. The ratio of voltages in a series circuit can be used to produce a fractional value of the total voltage applied to a circuit. Fig. 5-5 shows a voltage divider, which is built from two series resistors and outputs a lower voltage than was input into the circuit. It is important to remember that this circuit cannot source (provide) any current—any current draw will increase the voltage drop through the top resistor and lower the voltage of the output. Finally, resistances can be wired parallel to one another as in Fig. 5-6. In this case, the total resistance drops and the voltage stays constant across each resistor (increasing the totalamount of current flowing through the circuit). It is important to remember that the equivalent resistance will always be less than the value of the lowest resistance. The general case formula given in Fig. 5-6 probably seems very cumbersome but is quite elegant when applied to two resistors in parallel. The equivalent resistance is calculated using:

Requivalent = (R1 × R2) / (R1 + R2)

Whew! This is all there is to it with regards to basic electronics. The diagrams have all been placed in the following to allow you to photocopy them, study while you have a free moment, and pin up over your workbench so you always have them handy.

2.Fixed Resistors

A fixed resistor supplies a predetermined resistance to a circuit. The standard unit of valueof a resistor is the ohm (with units in volts per ampere, according to Ohm’s law), represented by the symbol Ω. The higher the ohm value, the more resistance the component provides to the circuit. The value on most fixed resistors is identified by color coding, as shown in Fig. 5-7. The color coding starts near the edge of the resistor and comprise four, five, and

11

Page 12: GSM_BASED_VOTING_SYSTEM

sometimes six bands of different colors. Most off-the-shelf resistors for hobby projects use standard four-band color coding. The values of each band are listed in Table 5-2,and the formula for determining the resistance from the bands is:

If you are not sure what the resistance is for a particular resistor, use a digital multimeterto check it. Position the test leads on either end of the resistor. If the meter is not auto ranging, start at a high range and work down. Be sure you don’t touch the test leads or the leads of the resistor; if you do, you’ll add the natural resistance of your own body to the reading.Resistors are also rated by their wattage. The wattage of a resistor indicates the amountof power it can safely dissipate. Resistors used in high-load applications, like motor control,require higher wattages than those used in low-current applications. The majority of resistors you’ll use for hobby electronics will be rated at

12

Page 13: GSM_BASED_VOTING_SYSTEM

1⁄4 or even 1⁄8 of awatt. The wattage of a resistor is not marked on the body of the component; instead, you must infer it from the size of the resistor.

3.Variable Resistors

Variable resistors let you dial in a specific resistance. The actual range of resistance is determined by the upward value of the potentiometer. Potentiometers are thus marked with this upward value, such as 10K, 50K, 100K, 1M, and so forth. For example, a 50K potentiometer will let you dial in any resistance from 0 to 50,000 ohms. Note that the range is approximate only.

Potentiometers are of either the dial or slide type, as shown in Fig. 5-8. The dial type is the most familiar and is used in such applications as television volume controls and electric blanket thermostat controls. The rotation of the dial is nearly 360°, depending on which potentiometer you use. In one extreme, the resistance through the potentiometer (or pot) is zero; in the other extreme, the resistance is the maximum value of the component.

13

Page 14: GSM_BASED_VOTING_SYSTEM

Some projects require precision potentiometers. These are referred to as multi-turn potsor trimmers. Instead of turning the dial one complete rotation to change the resistance from, say, 0 to 10,000 ohms, a multi-turn pot requires you to rotate the knob 3, 5, 10, even 15 times to span the same range. Most are designed to be mounted directly on the printed circuit board. If you have to adjust them, you will need a screwdriver or plastic tool.

4.Capacitors

After resistors, capacitors are the second most common component found in the averageelectronic project. Capacitors serve many purposes. They can be used to remove traces oftransient (changing) current ripple in a power supply, to delay the action of some portion ofthe circuit, or to perform an integration or differentiation of a repeating signal. All theseapplications depend on the ability of the capacitor to hold an electrical charge for a predetermined time.

Capacitors come in many more sizes, shapes, and varieties than resistors, though only a small handful are truly common. However, most capacitors are made of the same basic stuff: a pair of conductive elements separated by an insulating dielectric (see Fig. 5-9). This dielectric can be composed of many materials, including air (in the case of a variable capacitor, as detailed in the next section), paper, epoxy, plastic, and even oil. Most capacitorsactually have

14

Page 15: GSM_BASED_VOTING_SYSTEM

many layers of conducting elements and dielectric. When you select a capacitor for a particular job, you must generally also indicate the type, such as ceramic, mica, or Mylar.

Capacitors are rated by their capacitance, in farads, and by the breakdown voltage oftheir dielectric. The farad is a rather large unit of measurement, so the bulk of capacitors available today are rated in microfarads, or a millionth of a farad. An even smaller rating is the Pico farad, or a millionth of a millionth of a farad. The micro in the term microfarad is most often represented by the Greek mu (µ) character, as in 10 µF. The Pico farad is simply

15

Page 16: GSM_BASED_VOTING_SYSTEM

shortened to pF. The voltage rating is the highest voltage the capacitor can withstand before the dielectric layers in the component are damaged.

For the most part, capacitors are classified by the dielectric material they use. The mostcommon dielectric materials are aluminum electrolytic, tantalum electrolytic, ceramic, mica, polypropylene, polyester (or Mylar), paper, and polystyrene. The dielectric material used in a capacitor partly determines which applications it should be used for. The larger electrolytic capacitors, which use an aluminum electrolyte, are suited for such chores as power supply filtering, where large values are needed. The values for many capacitors are printed directly on the component. This is especially true with the larger aluminum electrolytic, where the large size of the capacitor provides ample room for printing the capacitance and voltage. Smaller capacitors, such as 0.1 or 0.01 µF mica disc capacitors, use a common three-digit marking system to denote capacitance and tolerance. The numbering system is easy to use, if you remember it’s based on Pico farads, not microfarads. A number such as 104 means 10, followed by four zeros, as in 100,000or 100,000 Pico farads. Values over 1000 Pico farads are most often stated in microfarads. To make the conversion, move the decimal point to the left six spaces: 0.1 µF. Note that values under 1000 Pico farads do not use this numbering system. Instead, the actual value, in Pico farads, is listed, such as 10 (for 10 pF).

One mark you will find almost exclusively on larger tantalum and aluminum electrolyticis a polarity symbol, most often a minus (−) sign. The polarity symbol indicates the positive and/or negative lead of a capacitor. If a capacitor is polarized, it is extremely important that you follow the proper orientation when you install the capacitor in the circuit. If you reverse the leads to the capacitor—connecting the positive lead (called the anode) to the ground rail instead of the negative lead (called the cathode), for example—the capacitor may be ruined. Other components in the circuit could also be damaged. Fig. 5-10 shows some different capacitor packages along with their polarity markings.

5.Diodes

The diode is the simplest form of semiconductor. It is available in two basic flavors, germanium and silicon, which indicates the material used to manufacture the active junction within the diode. Diodes are used in a variety of applications, and there are numerous subtypes. Here is a list of the most common.

• Rectifier. The average diode, it rectifies AC current to provide DC only.

16

Page 17: GSM_BASED_VOTING_SYSTEM

• Zener. It limits voltage to a predetermined level. Zeners are used for low-cost voltage regulation.

• Light-emitting. These diodes emit infrared of visible light when current is applied.

• Silicon-controlled rectifier (SCR). This is a type of high-power switch used to controlAC or DC currents.

• Bridge rectifier. This is a collection of four diodes strung together in sequence; it is usedto rectify an incoming AC current.

Diodes carry two important ratings: peak inverse voltage (PIV) and current. The PIV rating roughly indicates the maximum working voltage for the diode. Similarly, the current rating is the maximum amount of current the diode can withstand. Assuming a diode is rated for 3 amps, it cannot safely conduct more than 3 amps without overheating and failing. All diodes have positive and negative terminals (polarity). The positive terminal is the anode, and the negative terminal is the cathode. You can readily identify the cathode end of a diode by looking for a colored stripe near one of the leads. Fig. 5-11 shows a diode that has a stripe at the cathode end. Note how the stripe corresponds with the heavy line in the schematic symbol for the diode.

All diodes emit light when current passes through them. This light is generally only in theinfrared region of the electromagnetic spectrum. The light-emitting diode (LED) is a special type of semiconductor that is expressly designed to emit light in human visible wavelengths. LEDs are available to produce any of the basic colors (red, yellow, green, blue, or white) oflight as well as infrared. The infrared LEDs are especially useful in robots for a variety of different applications.

LEDs carry the same specifications as any other diode. The LED has a PIV rating ofabout 100 to 150 V, with a maximum current rating of under 40 mA (usually only 5 to 10 mA is applied to the LED). Most LEDs are used in low-power DC circuits and are powered with 12 V or less.

17

Page 18: GSM_BASED_VOTING_SYSTEM

Even though this voltage is far below the PIV rating of the LED, the component can still be ruthlessly damaged if you expose it to currents exceeding 40 or 50 mA. A resistor is used to limit the current to the LED.

6.Transistors

Transistors were designed as an alternative to the old vacuum tube, and they are used insimilar applications, either to amplify a signal by providing a current control or to switch a signal on and off. There are several thousand different transistors available. Besides amplifying or switching a current, transistors are divided into two broad categories:

• Signal. These transistors are used with relatively low-current circuits, like radios, telephones, and most other hobby electronics projects.

• Power. These transistors are used with high-current circuits, like motor drivers and power supplies.

You can usually tell the difference between the two merely by size. The signal transistoris rarely larger than a pea and uses slender wire leads. The power transistor uses a large metal case to help dissipate heat, and heavy spoke like leads.

Transistors are identified by a unique code, such as 2N2222 or MPS6519. Refer to adata book to ascertain the characteristics and ratings of the particular transistor you are interested in. Transistors are rated by a number of criteria, which are far too extensive for the scope of this book. These ratings include collector-to-base voltage, collector-to-emitter voltage, maximum collector current, maximum device dissipation, and maximum operating frequency. None of these ratings are printed directly on the transistor.

Signal transistors are available in either plastic or metal cases. The plastic kind is suitablefor most uses, but some precision applications require the metal variety. Transistors that use metal cases (or cans) are less susceptible to stray radio frequency interference and they also dissipate heat more readily.

You will probably be using NPN (Fig. 5-12) and PNP (Fig. 5-13) bipolar transistors.These transistors are turned on and off by a control current passing through the base. The current that can pass through the collector is the product of the base current and the constant hFE, which is unique to each transistor.

Bipolar transistors can control the operation and direction of DC motors using fairly simple circuits. Fig. 5-14 shows a simple circuit that will turn a motor on and off using a single NPN bipolar transistor and a diode. When the current passing through coils of a magnetic device changes, the voltage across the device also changes, often in the form of a large spike

18

Page 19: GSM_BASED_VOTING_SYSTEM

called kickback. These spikes can be a hundred volts or so and can very easily damage the electronic devices they are connected to. By placing a diode across the motor as shown in Fig. 5-15, the spikes produced when the motor is shut off will be shunted through the diode and will not pass along high voltages to the rest of the electronics in the circuit.

The circuit shown in Fig. 5-15 is known as an H-bridge because without the shunt diodesthe circuit looks like the letter H. This circuit allows current to pass in either direction through a motor, allowing it to turn in either direction. The motor turns when one of the two connections is made to +V. Both connections can never be connected to +V as this will turn on all the transistors, providing a very low resistance path for current from +V, potentially burning out the driver transistors.

Along with bipolar transistors, which are controlled by current, there are a number ofother transistors, some of which are controlled by voltage. For example, the MOSFET (for metal-oxide semiconductor field-effect transistor) is often used in circuits that demand highcurrent and high tolerance. MOSFET transistors don’t use the standard base-emitter collector connections. Instead, they call them gate, drain, and source. The operational differences among the different transistors will become clearer as you become more experienced in creating electronic circuits.

19

Page 20: GSM_BASED_VOTING_SYSTEM

20

Page 21: GSM_BASED_VOTING_SYSTEM

21

Page 22: GSM_BASED_VOTING_SYSTEM

7.Grounding Circuitry

When wiring electronic circuits, it is useful to have a large common negative voltage connection or ground built into the robot. This connection is normally thought of as being anearth ground and is the basic reference for all the components in the circuit. Having a common ground also simplifies the task of drawing schematics; instead of wiring all the negative connections to the negative power supply, all the negative connections are wired to the three bars symbol shown in Fig. 5-16.

Positive voltages are normally indicated with an arrow pointing upward and the label ofthe positive voltage to be used. These conventions will be used throughout this book.

8.Integrated Circuits

The integrated circuit forms the backbone of the electronics revolution. The typical integrated circuit comprises many transistors, diodes, resistors, and even capacitors. As its name implies, the integrated circuit, or IC, is a discrete and wholly functioning circuit in its own right. ICs are the building blocks of larger circuits. By merely stringing them together you can form just about any project you envision.

Integrated circuits are most often enclosed in dual in-line packages (DIPs), like the oneshown in Fig. 5-17. This type of component has a number of pins that can be inserted into holes of a printed circuit board and is also known as a pin through hole (PTH) component. There are numerous types of packages and methods of attaching chips to PCBs but beginners should be working with just PTH DIPs.

22

Page 23: GSM_BASED_VOTING_SYSTEM

As with transistors, ICs are identified by a unique code, such as 7400 or 4017. This codeindicates the type of device. You can use this code to look up the specifications and parameters of the IC in a reference book. Many ICs also contain other written information, including manufacturer catalog number and date code. Do not confuse the date code or catalog number with the code used to identify the device.

9.Schematics and Electronic Symbols

Electronics use a specialized road map to indicate what components are in a device andhow they are connected together. This pictorial road map is the schematic, a kind of blueprint of everything you need to know to build an electronic circuit. Schematics are composed of special symbols that are connected with intersecting lines. The symbols represent individual components, and the lines represent the wires that connect these components together. The language of schematics, while far from universal, is intended to enable most anyone to duplicate the construction of a circuit with little more information than a picture.

The experienced electronics experimenter knows how to read a schematic. This entailsrecognizing and understanding the symbols used to represent electronic components and how these components are connected. All in all, learning to read a schematic is not difficult. Fig. 5-18 shows many of the most common symbols.

23

Page 24: GSM_BASED_VOTING_SYSTEM

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.

24

Page 25: GSM_BASED_VOTING_SYSTEM

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.

25

Page 26: GSM_BASED_VOTING_SYSTEM

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.

26

Page 27: GSM_BASED_VOTING_SYSTEM

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.

27

Page 28: GSM_BASED_VOTING_SYSTEM

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.

TOTAL CIRCUIT DIAGRAM OF POWER SUPPLY

28

Page 29: GSM_BASED_VOTING_SYSTEM

MICROCONTROLLER

INTRODUCTION:

A Micro controller consists of a powerful CPU tightly coupled with memory RAM, ROM

or EPROM), various I/O features such as Serial ports, Parallel Ports, Timer/Counters, Interrupt

Controller, Data Acquisition interfaces-Analog to Digital Converter (ADC), Digital to Analog

Converter (DAC), everything integrated onto a single Silicon Chip.

It does not mean that any micro controller should have all the above said features on chip,

Depending on the need and area of application for which it is designed, The ON-CHIP features present in

it may or may not include all the individual section said above.

Any microcomputer system requires memory to store a sequence of instructions making up a

program, parallel port or serial port for communicating with an external system, timer / counter for

29

Page 30: GSM_BASED_VOTING_SYSTEM

control purposes like generating time delays, Baud rate for the serial port, apart from the controlling

unit called the Central Processing Unit

A Microcontroller has a CPU (a microprocessor) in addition to a fixed amount of RAM,

ROM,I/OPORTS ,and a timer all on a single chip. In other words, the processor, RAM, ROM, I/OPORTS,

and timer are all embedded together on one chip; therefore, the designer can’t add any external

memory, I/O, or timer to it. The fixed amount of on-chip ROM, RAM, and number of I/O PORTS in

microcontrollers makes them ideal for many applications in which cost and space are critical. In many

applications, for example a TV remote control, there is no need for the computing power of a 486 or

even an 8086 microprocessor. In many applications, the space it takes, the power it consumes, and the

price per unit are much more critical considerations than the computing power. These applications most

often require some I/O operation to read signal and turn on and off certain bits. For these reason some

call these processors IBP (illy-bitty processors).

(a)Microcontroller

NECESSITY OF MICROCONTROLLERS:

Microprocessors brought the concept of programmable devices and made many applications

of intelligent equipment. Most applications, which do not need large amount of data and program

memory is the microcontroller.

30

CPU RAM ROM

I/O TIMER Serial COM

PORT

Page 31: GSM_BASED_VOTING_SYSTEM

Costly:

The microprocessor system had to satisfy the data and program requirements so; sufficient

RAM and ROM are used to satisfy most applications .The peripheral control equipment also had to be

satisfied. Therefore, almost all-peripheral chips were used in the design. Because of these additional

peripherals cost will be comparatively high.

An example:

8085 chip needs:

An Address latch for separating address from multiplexed address and data.32-KB RAM and 32-

KB ROM to be able to satisfy most applications. As also Timer / Counter, Parallel programmable port,

Serial port, and Interrupt controller are needed for its efficient applications.

In comparison a typical Micro controller 8051 chip has all that the 8051 board has except

a reduced memory as follows.

4K bytes of ROM as compared to 32-KB, 128 Bytes of RAM as compared to 32-KB.

Bulky:

On comparing a board full of chips (Microprocessors) with one chip with all components in it

(Micro controller).

Debugging:

Lots of Microprocessor circuitry and program to debug. In Micro controller there is no

Microprocessor circuitry to debug. Slower Development time: As we have observed Microprocessors

need a lot of debugging at board level and at program level, where as, Micro controller do not have the

excessive circuitry and the built-in peripheral chips are easier to program for operation.

So peripheral devices like Timer/Counter, Parallel programmable port, Serial Communication Port,

Interrupt controller and so on, which were most often used were integrated with the Microprocessor to

present the Micro controller .RAM and ROM also were integrated in the same chip. The ROM size was

31

Page 32: GSM_BASED_VOTING_SYSTEM

anything from 256 bytes to 32Kb or more. RAM was optimized to minimum of 64 bytes to 256 bytes or

more.

Typical Micro controller have all the following features:

8/16/32 CPU

Instruction set rich in I/O & bit operations.

One or more I/O ports.

One or more timer/counters.

One or more interrupt inputs and an interrupt controller

One or more serial communication ports.

Analog to Digital /Digital to Analog converter

One or more PWM output

Network controlled interface

ADVANTAGES:

If a system is developed with a microprocessor, the designer has to go for external memory

such as RAM, ROM or EPROM and peripherals and hence the size of the PCB will be large enough to hold

all the required peripherals. But, the micro controller has got all these peripheral facilities on a single

chip so development of a similar system with a micro controller reduces PCB size and cost of the design.

One of the major differences between a micro controller and a microprocessor is that a

controller often deals with bits , not bytes as in the real world application, for example switch contacts

can only be open or close, indicators should be lit or dark and motors can be either turned on or off and

so forth.

MICROCONTROLLER

Microcontroller can be termed as a system on chip computer which includes number of peripherals like RAM, EEPROM, Timers etc., required to perform some predefined task.

32

Page 33: GSM_BASED_VOTING_SYSTEM

Does this mean that the microcontroller is another name for a computer…? The answer is NO!

The computer on one hand is designed to perform all the general purpose tasks on a single machine like you can use a computer to run a software to perform calculations or you can use a computer to store some multimedia file or to access internet through the browser, whereas the microcontrollers are meant to perform only the specific tasks, for e.g., switching the AC off automatically when room temperature drops to a certain defined limit and again turning it ON when temperature rises above the defined limit.

There are number of popular families of microcontrollers which are used in different applications as per their capability and feasibility to perform the desired task, most common of these are 8051, AVR and PIC microcontrollers. In this article we will introduce you with AVR family of microcontrollers.

History of AVR

AVR was developed in the year 1996 by Atmel Corporation. The architecture of AVR was developed by Alf-EgilBogen and VegardWollan. AVR derives its name from its developers and stands for Alf-EgilBogen VegardWollan RISC microcontroller, also known as Advanced Virtual RISC. The AT90S8515 was the first microcontroller which was based on AVR architecture however the first microcontroller to hit the commercial market was AT90S1200 in the year 1997.

AVR microcontrollers are available in three categories:

1. Tiny AVR – Less memory, small size, suitable only for simpler applications

33

Page 34: GSM_BASED_VOTING_SYSTEM

2. Mega AVR – These are the most popular ones having good amount of memory (up to 256 KB), higher number of inbuilt peripherals and suitable for moderate to complex applications.

3. Xmega AVR – Used commercially for complex applications, which require large program memory and high speed.

The following table compares the above mentioned AVR series of microcontrollers:

Series Name Pins Flash Memory Special FeatureTinyAVR 6-32 0.5-8 KB Small in sizeMegaAVR 28-100 4-256KB Extended peripheralsXmegaAVR 44-100 16-384KB DMA , Event System

included

What’s special about AVR?

They are fast: AVR microcontroller executes most of the instructions in single execution cycle. AVRs are about 4 times faster than PICs; they consume less power and can be operated in different power saving modes. Let’s do the comparison between the three most commonly used families of microcontrollers.

8051 PIC AVR

SPEED Slow Moderate FastMEMORY Small Large LargeARCHITECTURE CISC RISC RISCADC Not Present Inbuilt InbuiltTimers Inbuilt Inbuilt InbuiltPWM Channels Not Present Inbuilt Inbuilt

AVR is an 8-bit microcontroller belonging to the family of Reduced Instruction Set Computer (RISC). In RISC architecture the instruction set of the computer are not only fewer in number but also simpler and faster in operation. The other type of categorization is CISC (Complex Instruction Set Computers). We will explore more on this when we will learn about the architecture of AVR microcontrollers in following section.

Let’s see what this entire means. What is 8-bit? This means that the microcontroller is capable of transmitting and receiving 8-bit data. The input/output registers available are of 8-bits. The AVR families controllers have register based architecture which means that both the operands for an operation are stored in a register and the result of the operation is also stored in a register.

34

Page 35: GSM_BASED_VOTING_SYSTEM

Following figure shows a simple example performing OR operation between two input registers and storing the value in Output Register.

The CPU takes values from two input registers INPUT-1 and INPUT-2, performs the logical operation and stores the value into the OUTPUT register. All this happens in 1 execution cycle.

In our journey with the AVR we will be working on Atmega16 microcontroller, which is a 40-pin IC and belongs to the mega AVR category of AVR family. Some of the features of Atmega16 are:

35

Page 36: GSM_BASED_VOTING_SYSTEM

· 16KB of Flash memory

· 1KB of SRAM

· 512 Bytes of EEPROM

· Available in 40-Pin DIP

· 8-Channel 10-bit ADC

· Two 8-bit Timers/Counters

· One 16-bit Timer/Counter

· 4 PWM Channels

· In System Programmer (ISP)

· Serial USART

· SPI Interface

· Digital to Analog Comparator.

Architecture of AVR

The AVR microcontrollers are based on the advanced RISC architecture and consist of 32 x 8-bit general purpose working registers. Within one single clock cycle, AVR can take inputs from two general purpose registers and put them to ALU for carrying out the requested operation, and transfer back the result to an arbitrary register. The ALU can perform arithmetic as well as logical operations over the inputs from the register or between the register and a constant. Single register operations like taking a complement can also be executed in ALU. We can see that AVR does not have any register like accumulator as in 8051 family of microcontrollers; the operations can be performed between any of the registers and can be stored in either of them.

AVR follows Harvard Architecture format in which the processor is equipped with separate memories and buses for Program and the Data information. Here while an instruction is being executed, the next instruction is pre-fetched from the program memory.

36

Page 37: GSM_BASED_VOTING_SYSTEM

Since AVR can perform single cycle execution, it means that AVR can execute 1 million instructions per second if cycle frequency is 1MHz. The higher is the operating frequency of the controller, the higher will be its processing speed. We need to optimize the power consumption with processing speed and hence need to select the operating frequency accordingly.

There are two flavors for Atmega16 microcontroller:1. Atmega16:- Operating frequency range is 0 – 16 MHz2. Atmega16L:- Operating frequency range is 0 – 8 MHzIf we are using a crystal of 8 MHz = 8 x 106 Hertz = 8 Million cycles, then AVR can execute 8 million instructions.

Naming Convention.!The AT refers to Atmel the manufacturer, Mega means that the microcontroller belong to Mega AVR category, 16 signifies the memory of the controller, which is 16KB.

Architecture Diagram: Atmega16

37

Page 38: GSM_BASED_VOTING_SYSTEM

Following points explain the building blocks of Atmega16 architecture:· I/O Ports: Atmega16 has four (PORTA, PORTB, PORTC and PORTD) 8-bit input-output ports. · Internal Calibrated Oscillator: Atmega16 is equipped with an internal oscillator for driving its clock. By default Atmega16 is set to operate at internal calibrated oscillator of 1 MHz The maximum frequency of internal oscillator is 8Mhz. Alternatively, ATmega16 can be operated using an external crystal oscillator with a maximum frequency of 16MHz. In this case you need to modify the fuse bits. (Fuse Bits will be explained in a separate tutorial).

. ADC Interface: Atmega16 is equipped with an 8 channel ADC (Analog to Digital Converter) with a resolution of 10-bits. ADC reads the analog input for e.g., a sensor input and converts it into digital information which is understandable by the microcontroller.

·Timers/Counters: Atmega16 consists of two 8-bit and one 16-bit timer/counter. Timers are useful for generating precision actions for e.g., creating time delays between two operations.

·Watchdog Timer: Watchdog timer is present with internal oscillator. Watchdog timer continuously monitors and resets the controller if the code gets stuck at any execution action for more than a defined time interval.

· Interrupts: Atmega16 consists of 21 interrupt sources out of which four are external. The remaining are internal interrupts which support the peripherals like USART, ADC, and Timers etc.

.USART: Universal Synchronous and Asynchronous Receiver and Transmitter interface is available for interfacing with external device capable of communicating serially (data transmission bit by bit).

·General Purpose Registers: Atmega16 is equipped with 32 general purpose registers which are coupled directly with the Arithmetic Logical Unit (ALU) of CPU.

· ISP: AVR family of controllers have In System Programmable Flash Memory which can be programmed without removing the IC from the circuit, ISP allows to reprogram the controller while it is in the application circuit.

.DAC: Atmega16 is also equipped with a Digital to Analog Converter (DAC) interface which can be used for reverse action performed by ADC. DAC can be used when there is a need of converting a digital signal to analog signal.

38

Page 39: GSM_BASED_VOTING_SYSTEM

. Memory: Atmega16 consist of three different memory sections:

1. Flash EEPROM: Flash EEPROM or simple flash memory is used to store the program dumped or burnt by the user on to the microcontroller. It can be easily erased electrically as a single unit. Flash memory is non-volatile i.e., it retains the program even if the power is cut-off. Atmega16 is available with 16KB of in system programmable Flash EEPROM. 2. Byte Addressable EEPROM: This is also a nonvolatile memory used to store data like values of certain variables. Atmega16 has 512 bytes of EEPROM; this memory can be useful for storing the lock code if we are designing an application like electronic door lock. 3. SRAM: Static Random Access Memory, this is the volatile memory of microcontroller i.e., data is lost as soon as power is turned off. Atmega16 is equipped with 1KB of internal SRAM. A small portion of SRAM is set aside for general purpose registers used by CPU and some for the peripheral subsystems of the microcontroller.

· SPI: Serial Peripheral Interface, SPI port is used for serial communication between two devices on a common clock source. The data transmission rate of SPI is more than that of USART. · TWI: Two Wire Interface (TWI) can be used to set up a network of devices, many devices can be connected over TWI interface forming a network, the devices can simultaneously transmit and receive and have their own unique address.

39

Page 40: GSM_BASED_VOTING_SYSTEM

PIN DIAGRAM :

40

Page 41: GSM_BASED_VOTING_SYSTEM

Pin Descriptions

VCC Digital supply voltage.

GND Ground.

Port A (PA7...PA0) Port A serves as the analog inputs to the A/D Converter.Port A also serves as an 8-bit bi-directional I/O port,

if the A/D Converter is not used. Port pins can provide internal pull-up resistors (selected for each bit). The Port A output buffers have symmetrical drive characteristics with both high sink and source capability. When pins PA0 to PA7 are used as inputs and are externally pulled low, they will source current if the internal pull-up resistors are activated. The Port A pins are tri-stated when a reset condition becomes active, even if the clock is not running.

Port B (PB7...PB0) Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port B

output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running.

Port C (PC7...PC0) Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port C

output buffers have symmetrical drive characteristics with both high sink and source capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running. If the JTAG interface is enabled, the pull-up resistors on pins PC5 (TDI), PC3 (TMS) and PC2(TCK) will be activated even if a reset occurs.

Port D (PD7...PD0) Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port D

output buffers have symmetrical drive characteristics with

41

Page 42: GSM_BASED_VOTING_SYSTEM

both high sink and source capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active, even if the clock is not running.

RESET Reset Input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if

the clock is not running. Shorter pulses are not guaranteed to generate a reset.

XTAL1: Input to the inverting Oscillator amplifier and input to the internal clock operating circuit.

XTAL2: Output from the inverting Oscillator amplifier.

AVCC: AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally connected to

VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter.

AREF: AREF is the analog reference pin for the A/D Converter.

I/O PORTS

At mega 16 have 32 general purpose digital I/O pins. Corresponding to every pin, there are 3 bits in 3 different registers which control its function. Let’s say we are talking about the pin PA0. The three registers involved with this pin are DDRA, PORTA and PINA and the corresponding bits are DDRA0, PORTA0 and PINA0.

42

Page 43: GSM_BASED_VOTING_SYSTEM

DDR - is the Data Direction Register - writing 1 to DDRA0 makes the pin PA0 act like an output pin and writing 0 makes it an input pin.

Code example: DDRC=130; or,DDRC= 0b 10000010; or,DDRC= 0x 82;

Either of the above statements will make the PC1 and PC7 as output and rest as input.

It is to be noted that writing some value onto a register simply means that the bits of the register will attain values such that the binary number represented by all the 8 bits of the register together equals the number assigned to them. e.g. writing 0b10110101 means that the bits in the register will become like this:

PORT register - If DDRA0 is set as 1,

writing 1 to PORTA0 gives a high output on pin PA0 writing 0 to PORTA0 gives a low output on pin PA0

43

Page 44: GSM_BASED_VOTING_SYSTEM

If DDRA0 is set to 0 (input),

writing 1 to PORTA0 simply pulls up the pin to Vcc via 100k resistance Writing 0 to PORTA0 makes the pin tri-stated (very high input resistance, practically floating.) This means that in absence of any input from outside the pin will just read some arbitrary value.PIN register - This register is used for reading the digital value of the pin. It can be thought of as actually connected to MCU physical pins. If voltage of the pin (either in case of input or output) at any instant is low it will read as 0 otherwise 1.Code example:int read;read = PINB; // stores the value of 8 bit PINB register in the variable reador,read =PINB & 4; // this statement stores the value of PB2 bit in read, guess how?

16x2 Alphanumeric LCD

LCD display:

The display used here is 16x2 LCD (Liquid Crystal Display); this means 16 characters per line by 2 lines. A very popular standard exists which allows us to communicate with the vast majority of LCDs regardless of their manufacturer. The standard is referred to as HD44780U, which refers to the controller chip which receives data from an external source (in this case, the Atmega16) and communicates directly with the LCD. The 44780 standard requires 3 control lines as well as either 4 or 8 I/O lines for the data bus. Here we are using 8-bit mode of LCD, i.e., using 8-bit data bus.

Control & Data pins

The three control lines are referred to as EN, RS, and RW.

44

Page 45: GSM_BASED_VOTING_SYSTEM

The EN line is called "Enable." This control line is used to tell the LCD that we are sending it data. To send data to the LCD, our program should make sure this line is low (0) and then set the other two control lines and/or put data on the data bus. When the other lines are completely ready, bring EN high (1) and wait for the minimum amount of time required by the LCD datasheet (this varies from LCD to LCD), and end by bringing it low (0) again.

The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as a command or special instruction (such as clear screen, position cursor, etc.). When RS is high (1), the data being sent is text data which should be displayed on the screen. For example, to display the letter "T" on the screen you would set RS high.

The RW line is the "Read/Write" control line. When RW is low (0), the information on the data bus is being written to the LCD. When RW is high (1), the program is effectively querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are write commands--so RW will almost always be low.

In our case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3, DB4, DB5, DB6, and DB7. These pins should be connected to any port of the microcontroller.

The figure below is to show the pin diagram of before mentioned LCD.

45

Page 46: GSM_BASED_VOTING_SYSTEM

46

Page 47: GSM_BASED_VOTING_SYSTEM

GSM MODEM

A GSM modem is a wireless modem that works with a GSM wireless network. A wireless modem behaves like a dial-up modem. The main difference between them is that a dial-up modem sends and receives data through a fixed telephone line while a wireless modem sends and receives data through radio waves. Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate.

SIM 300 is a Fixed Cellular Terminal (FCT) for data applications. It is a compact and portable terminal that can satisfy various data communication needs over GSM. It can be connected to a computer with the help of a standard RS232C serial port. SIM 300 offers features like Short Message Services (SMS), Data Services (sending and receiving data files), Fax Services and data file transfer are also supported. It is the perfect equipment for factory plants, resorts, dams and construction sites where wired connectivity is not available or not practicable. The SIM 300 is easy to set up. It finds its applications in IT companies, Banks and Financial Institutions, Logistic Companies, Service Providers, Remote Project Sites, Professionals, and such other business establishments.

Product concept

Designed for global market, SIM300 is a Tri-band GSM/GPRS engine that works on frequencies EGSM 900MHz, DCS 1800MHz and PCS 1900MHz. SIM300 features GPRS multi slot class10/ class8 (optional) and supports the GPRS coding schemes CS-1, CS-2, CS-3 and CS-4.

SIM card interface

You can use AT Command to get information in SIM card. The SIM interface supports the functionality of the GSM Phase 1 specification and also supports the functionality of the new GSM Phase 2 + specification for FAST 64kbps SIM (intended for use with a SIM application Tool-kit). Both 1.8V and 3.0V SIM Cards are supported. The SIM interface is powered from an internal regulator in the module having nominal voltage 2.8V. All pins reset as outputs driving low.

Operation

Computers use AT commands to control modems. Both GSM modems and dial-up modems support a common set of standard AT commands. GSM modem can be used just like a dial-up modem. In addition to the standard AT commands, GSM modems support an extended set of AT commands. These extended AT commands are defined in the GSM standards. With the extended AT commands, various things can be done:

47

Page 48: GSM_BASED_VOTING_SYSTEM

• Reading, writing and deleting SMS messages.

• Sending SMS messages.

• Monitoring the signal strength.

• Monitoring the charging status and charge level of the battery.

• Reading, writing and searching phone book entries.

The number of SMS messages that can be processed by a GSM modem per minute is very low -- only about six to ten SMS messages per minute.

Network status indication LED lamp

State SIM300 function

Off- SIM300 is not running

64ms On/ 0.8 sec Off- SIM300 does not find the network

64ms On/ 3Sec off- SIM300 find the network

64 ms on / 0.3sec Off- GPRS communication

AT commands

AT commands are instructions used to control a modem. AT is the abbreviation of Attention. Every command line starts with "AT" or "at". That's why modem commands are called AT commands. Many of the commands that are used to control wired dial-up modems. These are also supported by GSM/GPRS modems and mobile phones. Besides this common AT command set, GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM technology, which includes SMS-related commands.

Basic Commands and Extended Commands

There are two types of AT commands: basic commands and extended commands.

Basic commands are AT commands that do not start with "+". For example, D (Dial), A (Answer), H (Hook control) and O (Return to online data state) are basic commands.

48

Page 49: GSM_BASED_VOTING_SYSTEM

Extended commands are AT commands that start with "+". All GSM AT commands are extended commands. For example, +CMGS (Send SMS message), +CMSS (Send SMS message from storage), +CMGL (List SMS messages) and +CMGR (Read SMS messages) are extended commands.

BLOCK DIAGRAM

CIRCUIT DIAGRAM

49

Page 50: GSM_BASED_VOTING_SYSTEM

PROGRAMMING: THE SOUL OF OUR PROJECT

The Software which we are using for the coding of embedded projects are:

AVR Studio WIN AVR SINAPROG Hex downloader USBasp

50

Page 51: GSM_BASED_VOTING_SYSTEM

How to create a new project using AVR studio?

Click on AVR studio shortcut or icon.

51

Page 52: GSM_BASED_VOTING_SYSTEM

Click on new project.

Select AVR GCC.

Write project name and click next.

Select AVR simulator then select AT mega 16.

52

Page 53: GSM_BASED_VOTING_SYSTEM

Click finish. The following window appears.

53

Page 54: GSM_BASED_VOTING_SYSTEM

How to download the hex file to microcontroller?

Open Sinaprog by clicking on the shortcut or icon.

Specify the path of your hex file from the folder icon in the first line.

Specify the device as AT mega 16

Click on program in the flash memory line.

54

Page 55: GSM_BASED_VOTING_SYSTEM

CONTINUITY TEST:

In electronics, a continuity test is the checking of an electric circuit to see if current flows

(that it is in fact a complete circuit). A continuity test is performed by placing a small voltage

(wired in series with an LED or noise-producing component such as a piezoelectric speaker)

across the chosen path. If electron flow is inhibited by broken conductors, damaged components,

or excessive resistance, the circuit is "open".

Devices that can be used to perform continuity tests include multi meters which measure

current and specialized continuity testers which are cheaper, more basic devices, generally with a

simple light bulb that lights up when current flows.

An important application is the continuity test of a bundle of wires so as to find the two ends

belonging to a particular one of these wires; there will be a negligible resistance between the

"right" ends, and only between the "right" ends.

This test is the performed just after the hardware soldering and configuration has been

completed. This test aims at finding any electrical open paths in the circuit after the soldering.

Many a times, the electrical continuity in the circuit is lost due to improper soldering, wrong and

rough handling of the PCB, improper usage of the soldering iron, component failures and

presence of bugs in the circuit diagram. We use a multi meter to perform this test. We keep the

multi meter in buzzer mode and connect the ground terminal of the multi meter to the ground.

We connect both the terminals across the path that needs to be checked. If there is continuation

then you will hear the beep sound.

55

Page 56: GSM_BASED_VOTING_SYSTEM

POWER ON TEST:

This test is performed to check whether the voltage at different terminals is according to

the requirement or not. We take a multi meter and put it in voltage mode. Remember that this test

is performed without microcontroller. Firstly, we check the output of the transformer, whether

we get the required 12 v AC voltage.

Then we apply this voltage to the power supply circuit. Note that we do this test without

microcontroller because if there is any excessive voltage, this may lead to damaging the

controller. We check for the input to the voltage regulator i.e., are we getting an input of 12v and

an output of 5v. This 5v output is given to the microcontrollers’ 10 th pin. Hence we check for the

voltage level at 10th pin. Similarly, we check for the other terminals for the required voltage. In

this way we can assure that the voltage at all the terminals is as per the requirement.

56

Page 57: GSM_BASED_VOTING_SYSTEM

FUTURE ENHANCEMENT :

A GSM based voting machine design with voter tracking has been proposed in this

system which is found to be appropriate. The software of the system has been

written in Embedded C language and Proteus Professional Software has been used

for simulating the behavior of the machine. The simulation of the machine is

working properly under normal conditions. Polling switches are used to give votes

to the candidates and infrared sensors have been used to track the voter entries. The

count of the voter entries previously stored in the register is matched with the total

votes casted and votes rejected to avoid any mistakes thus making the system more

protected. After the voting process has been over, the results are displayed on the

machine LCD by entering the correct password and sent to the monitoring station

The design of the GSM based electronic voting machine with voter tracking

proposed in this paper is accurate and it can be further improved in terms of power

consumption using advanced VLSI applicationsvia GSM for analysis and the

declaration of the final verdict.

The design of the GSM based electronic voting machine with voter tracking proposed in this paper is accurate and it can be further improved in terms of power consumption using advanced VLSI applications

57

Page 58: GSM_BASED_VOTING_SYSTEM

Bibliography

The 8051 Micro controller and Embedded Systems

-Muhammad Ali Mazidi

Janice Gillispie Mazidi

The 8051 Micro controller Architecture, Programming & Applications

-Kenneth J.Ayala

Fundamentals Of Micro processors and Micro computers

-B.Ram

Micro processor Architecture, Programming & Applications

-Ramesh S. Gaonkar

Electronic Components

-D.V. Prasad

WEB Resources:

www.atmel.com

www.8051projects.com

www.microsoftsearch.com

www.geocities.com

www.alldatasheet.com

www.bioenable.com

http://en.wikipedia.org/wiki/Transistor

http://en.wikipedia.org/wiki/Bipolar_junction_transistor

http://en.wikipedia.org/wiki/zener_diode

http://en.wikipedia.org/wiki/resistor

http://en.wikipedia.org/wiki/diode

http://en.wikipedia.org/wiki/Transformer

http://en.wikipedia.org/wiki/potentiometer

http://en.wikipedia.org/wiki/capacitor

58

Page 59: GSM_BASED_VOTING_SYSTEM

59