You are on page 1of 47

efficient to lead that particular organization or nation.

So, here there is a need for election to elect the person from a group of people. So, here there is a need of voting for which we use voting machine. In every day life we can see many of the things functioning with remote i.e. without a cable and the communication is becoming faster day by day. So, here also in the voting system we are introducing a remote operation by using RF technology. In this project we are going to use the RF module for the data transmission. One section is the Ballot Unit and the other is the Control unit where all the controlling actions are taken. Before entering to vote, the person should have to enter his voter ID. The result shown on the LCD display that the voter ID is valid or not. If it is valid, the authorized person in ballot unit has to enter his vote. If at all the voter ID is correct and valid then he is permitted to vote and his vote is added to the concerned candidate. Other wise a siren will be given indicating the sign of rigging. Here whatever the vote to the concerned candidates those are transmitted to the Control unit and at any time if they want to check the results they can see on the LCD. For this we are providing passwords to all the voters as per the divisions which are unique. If this password is valid then only he is eligible for the voting process.
1

ABSTRACT to elect a person who is In a particular nation or organization it is very import

CONTENTS
Introduction Block Diagram Block Diagram Explanation Schematic Schematic Explanation Hardware Components Microcontroller RF Transmitter RF Receiver RF Encoder RF Decoder Buzzer Power Supply LCD EEPROM Keypad

INDEX

Circuit description Software Concepts KEIL IDE Embedded C

Result Future Scope Conclusion Bibliography

Department of ECE, TKRCET

CHAPTER-1 INTRODUCTION
The Project NOVEL EVM using RF is designed using RF technology. According to this technology the communication takes place between two blocks.

The hardware involved in this project is a Power Supply, a LCD to display the concerned information, RF transmitter and RF receiver to transmit and receive the information, Encoder and Decoder to convert the parallel data from Microcontroller to serial data to be fed for RF transmitter and vice versa in the case of RF receiver. In this unit a Keypad with RF transmitter is connected where the person need to enter his pre-assigned password. If that password is also valid then and only then he is allowed to give his vote using the Keypad.
In this way 2-level authentication is provided for voting system. This project makes best use of RF wireless technology for data transmission. The hardware involved in this project is Power supply, Microcontroller, LCD, RF Transmitter, RF Receiver, Encoder, Decoder and Keypad.

Block Diagram Description: This Project mainly consists of Power Supply section, Microcontroller section, Keypad section, , LCD display section, RF transmitter, RF Receiver section, Encoder section and Decoder sections. Power Supply Section: This section is meant for supplying Power to all the sections mentioned above. It basically consists of a Transformer to step down the 230V ac to 9V ac followed by diodes. Here diodes are used to rectify the ac to dc. After rectification the obtained rippled dc is filtered using a capacitor Filter. A positive voltage regulator is used to regulate the obtained dc voltage. Microcontroller Section: This section forms the control unit of the whole project. This section basically consists of a Microcontroller with its associated circuitry like Crystal with capacitors, Reset circuitry, Pull up resistors (if needed) and so on. The Microcontroller forms the heart of the project because it controls the devices being interfaced and communicates with the devices according to the program being written. LCD Display Section: This section is basically meant to show up the status of the project. This project makes use of Liquid Crystal Display to display / prompt for necessary information.

Keypad Section: This section consists of a Linear Keypad. This keypad is used to enter the no. of liters of petrol required. The keypad is interfaced to microcontroller which continuously scans the keypad.

RF Transmitter and Receiver Sections: This section basically involves RF transmitter and RF receivers. These RF transmitter and receiver sections are placed at both User segment and at Control section. The purpose of these sections is to get the confirmation from the owner about each and every transaction wirelessly.

Encoder and Decoder Section: This section includes Encoder and Decoder sections. The data is sent from microcontroller to RF TX / RX through the Encoder and Decoder. These convert parallel data to serial data which is required by the RF TX / RX.

MICRO CONTROLLER (AT89S51)

Introduction A Micro controller consists of a powerful CPU tightly coupled with memory, various I/O interfaces such as serial port, parallel port timer or counter, interrupt controller, data acquisition interfaces-Analog to Digital converter, Digital to Analog converter, integrated on to a single silicon chip. If a system is developed with a microprocessor, the designer has to go for external memory such as RAM, ROM, EPROM and peripherals. But controller is provided all these facilities on a single chip. Development of a Micro controller reduces PCB size and cost of design. One of the major differences between a Microprocessor and a Micro controller is that a controller often deals with bits not bytes as in the real world application. Intel has introduced a family of Micro controllers called the MCS-51.

Figure: micro controller

Department of ECE, TKRCET

Features: Compatible with MCS-51 Products 4K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 1000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Description The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry- standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications.

Department of ECE, TKRCET

Features: Compatible with MCS-51 Products 4K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 1000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources
Department of ECE, TKRCET 8

Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Description The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry- standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications.
Department of ECE, TKRCET 9

Pin Description VCC - Supply voltage. GND - Ground. Port 0: Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance inputs. Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during program verification. Port 1: Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming and verification. Port 2: Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 receives some control signals for Flash programming and verification. Port 3 also serves the functions of various special features of the AT89S51, as shown in the following table.

Department of ECE, TKRCET

10

RST: Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives High for 98 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled. ALE/PROG: Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN: Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP: External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming. XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2: Output from the inverting oscillator amplifier.

Oscillator Characteristics: XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figs 6.2.3. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven as shown in Figure 6.2.4.There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.

Department of ECE, TKRCET

11

RF transmitter section: RF transmitters are electronic devices that create continuously varying electric current, encode sine waves, and broadcast radio waves. RF transmitters use oscillators to create sine waves, the simplest and smoothest form of continuously varying waves, which contain information such as audio and video. Modulators encode these sign wives and antennas broadcast them as radio signals. There are several ways to encode or modulate this information, including amplitude modulation (AM) and frequency modulation (FM). Radio techniques limit localized interference and noise. With direct sequence spread spectrum, signals are spread over a large band by multiplexing the signal with a code or signature that modulates each bit. With frequency hopping spread spectrum, signals move through a narrow set of channels in a sequential, cyclical, and predetermined pattern. Selecting RF transmitters requires an understanding of modulation methods such as AM and FM. On-off key (OOK), the simplest form of modulation, consists of turning the signal on or off. Amplitude modulation (AM) causes the base band signal to vary the amplitude or height of the carrier wave to create the desired information content. Frequency modulation (FM) causes the instantaneous frequency of a sine wave carrier to depart from the center frequency by an amount proportional to the instantaneous value of the modulating signal. Amplitude shift key (ASK) transmits data by varying the amplitude of the transmitted signal. Frequency shift key (FSK) is a digital modulation

Department of ECE, TKRCET

12

scheme using two or more output frequencies. Phase shift key (PSK) is a digital modulation scheme in which the phase of the transmitted signal is varied in accordance with the base band data signal. Additional considerations when selecting RF transmitters include supply voltage, supply current, RF connectors, special features, and packaging. Some RF transmitters include visual or audible alarms or LED indicators that signal operating modes such as power on or reception. Other devices attach to coaxial cables or include a connector or port to which an antenna can be attached. Typically, RF transmitters that are rated for outdoor use feature a heavy-duty waterproof design. Devices with internal calibration and a frequency range switch are also available. RF transmitters are used in a variety of applications and industries. Often, devices that are used with integrated circuits (ICs) incorporate surface mount technology (SMT), through hole technology (THT), and flat pack. In the telecommunications industry, RF transmitters are designed to fit in a metal rack that can be installed in a cabinet. RF transmitters are also used in radios and in electronic article surveillance systems (EAS) found in retail stores. Inventory management systems use RF transmitters as an alternative to barcodes. RF transmitter ST-TX01-ASK: General Description:

designing.

The ST-TX01-ASK is an ASK Hybrid transmitter module. The ST-TX01-ASK is designed by the Saw Resonator, with an effective low cost, small size, and simple-to-use for 315 / 433.92 MHZ. 3~12V. 4~16dBm Saw

Frequency Range: Supply Voltage: Output Power: Circuit Shape:

Applications Wireless security systems Car Alarm systems Remote controls. Sensor reporting Automation systems

Department of ECE, TKRCET

13

RF ENCODER (HT12E): Features _ Operating voltage _ 2.4V~5V for the HT12A _ 2.4V~12V for the HT12E _ Low power and high noise immunity CMOS technology _ Low standby current: 0.1_A (typ.) at VDD=5V _ HT12A with a 38kHz carrier for infrared transmission medium _ Minimum transmission word _ Four words for the HT12E _ One word for the HT12A _ Built-in oscillator needs only 5% resistor _ Data code has positive polarity _ Minimal external components _ HT12A/E: 18-pin DIP/20-pin SOP package Applications _ Burglar alarm system _ Smoke and fire alarm system _ Garage door controllers _ Car door controllers _ Car alarm system _ Security system _ Cordless telephones _ Other remote control systems General Description The 212 encoders are a series of CMOS LSIs for remote control system applications. They are capable of encoding information which consists of N address bits and 12_N data bits. Each address/data input can be set to one of the two logic states. The programmed addresses/data are transmitted together with the header bits via an RF or an infrared transmission medium upon receipt of a trigger signal. The capability to select a TE trigger on the HT12E or a DATA trigger on the HT12A further enhances the application flexibility of the 212 series of encoders. The HT12A additionally provides a 38kHz carrier for infrared systems.

Department of ECE, TKRCET

14

Absolute Maximum Ratings Supply Voltage (HT12A) .............._0.3V to 5.5V Storage Temperature................._50_C to 125_C Operating Temperature..............._20_C to 75_C Supply Voltage (HT12E) ..............._0.3V to 13V Input Voltage....................VSS_0.3 to VDD+0.3V

Department of ECE, TKRCET

15

RF receiver section: RF receivers are electronic devices that separate radio signals from one another and convert specific signals into audio, video, or data formats. RF receivers use an antenna to receive transmitted radio signals and a tuner to separate a specific signal from all of the other signals that the antenna receives. Detectors or demodulators then extract information that was encoded before transmission. There are several ways to decode or modulate this information, including amplitude modulation (AM) and frequency modulation (FM). Radio techniques limit localized interference and noise. With direct sequence spread spectrum, signals are spread over a large band by multiplexing the signal with a code or signature that modulates each bit. With frequency hopping spread spectrum, signals move through a narrow set of channels in a sequential, cyclical, and predetermined pattern. Selecting RF receivers requires an understanding of modulation methods such as AM and FM. On-off key (OOK), the simplest form of modulation, consists of turning the signal on or off. Amplitude modulation (AM) causes the base band signal to vary the amplitude or height of the carrier wave to create the desired information content. Frequency modulation (FM) causes the instantaneous frequency of a sine wave carrier to depart from the center frequency by an amount proportional to the instantaneous value of the modulating signal. Amplitude shift key (ASK) transmits data by varying the amplitude of the transmitted signal. Frequency shift key (FSK) is a digital modulation scheme using two or more output frequencies. Phase shift key (PSK) is a digital modulation scheme in which the phase of the transmitted signal is varied in accordance with the base band data signal. RF receivers vary in terms of performance specifications such as sensitivity, digital sampling rate, measurement resolution, operating frequency, and communication interface. Sensitivity is the minimum input signal required to produce a specified output signal having a specified signal-to-noise (S/N) ratio. Digital sampling rate is the rate at which samples can be drawn from a digital signal in kilo samples per second. Measurement resolution is the minimum digital resolution, while operating frequency is the range of received signals. Communication interface is the method used to output data to computers. Parallel interfaces include general-purpose interface bus (GPIB), which is also known as IEEE 488 and HPIB Protocol. Serial interfaces include universal serial bus (USB), RS232, and RS485. Additional considerations when selecting RF receivers include supply voltage, supply current, receiver inputs, RF connectors, special features, and packaging. Some RF receivers include visual or audible alarms or LED indicators that signal operating modes such as power on or reception. Other devices attach to coaxial cables or include a connector or port to which an antenna can be attached. Typically, RF receivers that are rated for outdoor use feature a heavy-duty waterproof design. Devices with internal calibration and a frequency range switch are also available.

Department of ECE, TKRCET

16

RF receiver ST-RX04-ASK: Description: The RX04 is a low power ASK receiver IC which is fully compatible with the MitelKESRX01 IC and is suitable for use in a variety of low power radio applications including remote keyless entry. The RX04 is based on a singleConversion, super-heterodyne receiver architecture and incorporates an entire phase-locked loop (PLL) for precise local oscillator generation. Applications: Car security system Wireless security systems Sensor reporting automation system Remote Keyless entry Features Low power consumption. Easy for application. On-Chip VCO with integrated PLL using crystal oscillator reference. Integrated IF and data filters. Operation temperature range : 1060 Operation voltage: 5 Volts. Available frequency at : 315/434 MHz

Department of ECE, TKRCET

17

RF DECODER (HT 12D): Features _ Operating voltage: 2.4V~12V _ Low power and high noise immunity CMOS technology _ Low standby current _ Capable of decoding 12 bits of information _ Binary address setting _ Received codes are checked 3 times _ Address/Data number combination _ HT12D: 8 address bits and 4 data bits _ HT12F: 12 address bits only _ Built-in oscillator needs only 5% resistor _ Valid transmission indicator _ Easy interface with an RF or an infrared transmission medium _ Minimal external components _ Pair with Holteks 212 series of encoders _ 18-pin DIP, 20-pin SOP package Applications _ Burglar alarm system _ Smoke and fire alarm system _ Garage door controllers _ Car door controllers _ Car alarm system _ Security system _ Cordless telephones _ Other remote control systems

General Description
The 212 decoders are a series of CMOS LSIs for remote control system applications. They are paired with Holteks 212 series of encoders (refer to the encoder/decoder cross reference table). For proper operation, a pair of encoder/decoder with the same number of addresses and data format should be chosen. The decoders receive serial addresses and data from a programmed 212 series of encoders that are transmitted by a carrier using an RF or an IR transmission medium. They compare the serial input data three times continuously with their local addresses. If no error or unmatched codes are found, the input data codes are decoded and then transferred to the output pins. The VT pin also goes high to indicate a valid transmission. The 212 series of decoders are capable of decoding informations that consist of N bits of address and 12_N bits of data. Of this series, the HT12D is arranged to provide 8 address bits and 4 data bits, and HT12F is used to decode 12 bits of address information.

Department of ECE, TKRCET

18

Functional Description Operation The 212 series of decoders provides various combinations of addresses and data pins in different packages so as to pair with the 212 series of encoders. The decoders receive data that are transmitted by an encoder and interpret the first N bits of code period as addresses and the last 12_N bits as data, where N is the address code number. A signal on the DIN pin activates the oscillator, which in turn decodes the incoming address and data. The decoders will then check the received address three times continuously. If the received address codes all match the contents of the decoders local address, the 12_N bits of data are decoded to activate the output pins and the VT pin is set high to indicate a valid transmission. This will last unless the address code is incorrect or no signal is received. The output of the VT pin is high only when the transmission is valid. Otherwise it is always low. Output type Of the 212 series of decoders, the HT12F has no data output pin but its VT pin can be used as a momentary data output. The HT12D, on the other hand, provides 4 latch type data pins whose data remain unchanged until new data are received.

Department of ECE, TKRCET

19

USES: The LCD s used exclusively in watches, calculators and measuring instruments is the simple sevensegment displays, having a limited amount of numeric data. The recent advances in technology have resulted in better legibility, more information displaying capability and a wider temperature range. These have resulted in the LCD s being extensively used in telecommunications and entertainment electronics. The LCD s has even started replacing the cathode ray tubes (CRTs) used for the display of text and graphics, and also in small TV applications.
Department of ECE, TKRCET 20

Liquid Crystal Display Introduction to LCD: In recent years the LCD is finding widespread use replacing LED s (seven-segment LED or other multi segment LED s). This is due to the following reasons: The declining prices of LCD s. The ability to display numbers, characters and graphics. This is in contract to LED s, which are limited to numbers and a few characters. Incorporation of a refreshing controller into the LCD, there by relieving the CPU of the task of refreshing the LCD. In the contrast, the LED must be refreshed by the CPU to keep displaying the data. Ease of programming for characters and graphics.
Department of ECE, TKRCET 21

Specifications Number of Characters: 16 characters x 2 Lines Character Table: English-European (RS in Datasheet) Module dimension: 80.0mm x 36.0mm x 13.2mm(MAX) View area: 66.0 x 16.0 mm Active area: 56.2 x 11.5 mm Dot size: 0.56 x 0.66 mm Dot pitch: 0.60 x 0.70 mm Character size: 2.96 x 5.46 mm Character pitch: 3.55 x 5.94 mm LCD type: STN, Positive, Transflective, Yellow/Green Duty: 1/16 View direction: Wide viewing angle Backlight Type: yellow/green LED RoHS Compliant: lead free Operating Temperature: -20C to + 70C
Department of ECE, TKRCET 22

POwer supply The power supply is designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronics circuits and other devices. A power supply can by broken down into a series of blocks, each of which performs a particular function. A d.c power supply which maintains the output voltage constant irrespective of a.c mains fluctuations or load variations is known as Regulated D.C Power Supply

Department of ECE, TKRCET

23

Transformer: A transformer is an electrical device which is used to convert electrical power from one electrical circuit to another without change in frequency. Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is AC. Step-up transformers increase in output voltage, step-down transformers decrease in output voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains voltage to a safer low voltage. The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils; instead they are linked by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core. Transformers waste very little power so the power out is (almost) equal to the power in. Note that as voltage is stepped down current is stepped up. The ratio of the number of turns on each coil, called the turns ratio, determines the ratio of the voltages. A step-down transformer has a large number of turns on its primary (input) coil which is connected to the high voltage mains supply, and a small number of turns on its secondary (output) coil to give a low output voltage.

Department of ECE, TKRCET

24

RECTIFIER: A circuit, which is used to convert a.c to dc, is known as RECTIFIER. The process of conversion a.c to d.c is called rectification TYPES OF RECTIFIERS: Half wave Rectifier Full wave rectifier 1. Center tap full wave rectifier. 2. Bridge type full bridge rectifier.

Department of ECE, TKRCET

25

Full-wave Rectifier: From the above comparisons we came to know that full wave bridge rectifier as more advantages than the other two rectifiers. So, in our project we are using full wave bridge rectifier circuit. Bridge Rectifier: A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-wave rectification. This is a widely used configuration, both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally. A bridge rectifier makes use of four diodes in a bridge arrangement as shown in fig(a) to achieve full-wave rectification. This is a widely used configuration, both with individual diodes wired as shown and with single component bridges where the diode bridge is wired internally.
Department of ECE, TKRCET 26

Operation: During positive half cycle of secondary, the diodes D2 and D3 are in forward biased while D1 and D4 are in reverse biased as shown in the fig(b). The current flow direction is shown in the fig (b) with dotted arrows.

Department of ECE, TKRCET

27

Filter: A Filter is a device, which removes the a.c component of rectifier output but allows the d.c component to reach the load.

Capacitor Filter: We have seen that the ripple content in the rectified output of half wave rectifier is 121% or that of full-wave or bridge rectifier or bridge rectifier is 48% such high percentages of ripples is not acceptable for most of the applications. Ripples can be removed by one of the following methods of filtering:
(a) A capacitor, in parallel to the load, provides an easier by pass for the ripples voltage though it due to low impedance. At ripple frequency and leave the d.c.to appears the load. (b) An inductor, in series with the load, prevents the passage of the ripple current (due to high impedance at ripple frequency) while allowing the d.c (due to low resistance to d.c) (c) various combinations of capacitor and inductor, such as L-section filter section filter, multiple section filter etc. which make use of both the properties mentioned in (a) and (b) above. Two cases of capacitor filter, one applied on half wave rectifier and another with full wave rectifier.

Filtering 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 capacitor charges quickly near the peak of the varying DC, and then discharges as it supplies current to the output. Filtering significantly increases the average DC voltage to almost the peak value (1.4 RMS value). To calculate the value of capacitor(C), C = *3*f*r*Rl Where, f = supply frequency, r = ripple factor, Rl = load resistance Note: In our circuit we are using 1000microfarads.
Regulator: Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable output voltages. The maximum current they can pass also rates them. Negative voltage regulators are available, mainly for use in dual supplies. Most regulators include some automatic protection from excessive current ('overload protection') and overheating ('thermal protection'). Many of the fixed voltage regulator ICs have 3 leads and look like power transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805 is simple to use. You simply connect the positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and then when you turn on the power, you get a 5 volt supply from the output pin.

Department of ECE, TKRCET

28

78XX: The Bay Linear LM78XX is integrated linear positive regulator with three terminals. The LM78XX offer several fixed output voltages making them useful in wide range of applications. When used as a zener diode/resistor combination replacement, the LM78XX usually results in an effective output impedance improvement of two orders of magnitude, lower quiescent current. The LM78XX is available in the TO-252, TO-220 & TO-263packages,

Features: Output Current of 1.5A Output Voltage Tolerance of 5% Internal thermal overload protection Internal Short-Circuit Limited No External Component Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V Offer in plastic TO-252, TO-220 & TO-263 Direct Replacement for LM78XX LINEAR KEYPAD This section basically consists of a Linear Keypad. Basically a Keypad can be classified into 2 categories. One is Linear Keypad and the other is Matrix keypad. Matrix Keypad. Linear Keypad. Matrix Keypad: This Keypad got keys arranged in the form of Rows and Columns. That is why the name Matrix Keypad. According to this keypad, In order to find the key being pressed the keypad need to be scanned by making rows as i/p and columns as output or vice versa. This Keypad is used in places where one needs to connect more no. of keys with less no. of data lines. Linear Keypad: This Keypad got n no. of keys connected to n data lines of microcontroller. This Keypad is used in places where one needs to connect less no. of keys. Generally, in Linear Keypads one end of the switch is connected to Microcontroller (Configured as i/p) and other end of the switch is connected to the common ground. So whenever a key of Linear Keypad is pressed the logic on the microcontroller pin will go LOW. Here in this project, a linear keypad is used with switches connected in a serial manner. Linear keypad is used in this project because it takes less no. of port pins. The Linear Keypad with 4 Keys is shown below.

Department of ECE, TKRCET

29

The "Piezoelectric sound components" introduced herein operate on an innovative principle utilizing natural oscillation of piezoelectric ceramics. These buzzers are offered in lightweight compact sizes from the smallest diameter of 12mm to large Piezo electric sounders. Today, piezoelectric sound components are used in many ways such as home appliances, OA equipment, audio equipment telephones, etc. And they are applied widely, for example, in alarms, speakers, telephone ringers, receivers, transmitters, beep sounds, etc.
Department of ECE, TKRCET 30

Oscillating System: Basically, the sound source of a piezoelectric sound component is a piezoelectric diaphragm. A piezoelectric diaphragm consists of a piezoelectric ceramic plate which has electrodes on both sides and a metal plate (brass or stainless steel, etc.). A piezoelectric ceramic plate is attached to a metal plate with adhesives. Fig. 2 shows the oscillating system of a piezoelectric diaphragm. Applying D.C. voltage between electrodes of a piezoelectric diaphragm causes mechanical distortion due to the piezoelectric effect. For a misshaped piezoelectric element, the distortion of the piezoelectric element expands in a radial direction. And the piezoelectric diaphragm bends toward the direction shown in Fig.2 (a).
Department of ECE, TKRCET 31

The metal plate bonded to the piezoelectric element does not expand. Conversely, when the piezoelectric element shrinks, the piezoelectric diaphragm bends in the direction shown in Fig.2 (b). Thus, when AC voltage is applied across electrodes, the bending shown in Fig.2 (a) and Fig.2 (b) is repeated as shown in Fig.2 (c), producing sound waves in the air. DESIGN PROCEDURES: In general, man's audible frequency range is about 20 Hz to 20kHz. Frequency ranges of 2kHz to 4kHz are most easily heard. For this reason, most piezoelectric sound components are used in this frequency range, and the resonant frequency (f0) is generally selected in the same range too. As shown in Fig. 3, the resonant frequency depends on methods used to support the piezoelectric diaphragm. If piezoelectric diaphragms are of the same shape, their values will become smaller in the order of (a), (b) and (c).

Department of ECE, TKRCET

32

In general, the piezoelectric diaphragm is installed in a cavity to produce high sound pressure. The resonant frequency (fcav) of the cavity in is obtained from Formula (1) (Helmholtz's Formula). Since the piezoelectric diaphragm and cavity have proper resonant frequencies, (f0) and (fcav) respectively, sound pressure in specific frequencies can be increased and a specific bandwidth can be provided by controlling both positions.

LIGHT EMITING DIODES It is a semiconductor diode having radioactive recombination. It requires a definite amount of energy to generate an electron-hole pair. The same energy is released when an electron recombines with a hole. This released energy may result in the emission of photon and such a recombination. Hear the amount of energy released when the electro reverts from the conduction band to the valence band appears in the form of radiation. Alternatively the released energy may result in a series of phonons causing lattice vibration. Finally the released energy may be transferred to another electron. The recombination radiation may be lie in the infra-red and visible light spectrum. In forward is peaked around the band gap energy and the phenomenon is called injection luminescence. I n a junction biased in the avalanche break down region , there results a spectrum of photons carrying much higher energies . Almost White light then gets emitted from micro-plasma breakdown region in silicon junction. Diodes having radioactive recombination are termed as Light Emitting Diode, abbreviated as LEDs. In gallium arsenide diode, recombination is predominantly a radiation recombination and the probability of this radio active recombination far exceeds that in either germanium or silicon . Hence Ga As LED has much higher efficiency in terms of Photons emitted per carrier. The internal efficiency of Ga As LED may be very close to 100% but because of high index of refraction, only a small fraction of the internal radiation can usually come out of the device surface. In spite of this low efficiency of actually radiated light , these LEDs are efficiency used as light emitters in visual display units and in optically coupled circuits, The efficiency of light generation increases with the increase of injected current and with decreases in temperature. The light so generated is concentrated near the junction since most of the charge carriers are obtained within one diffusion length of the diode junction.

The following are the merits of LEDs over conventional incandescent and other types of lamps Low working voltages and currents Less power consumption Very fast action Emission of monochromatic light small size and weight No effect of mechanical vibrations Extremely long life Typical LED uses a forward voltage of about 2V and current of 5 to 10mA. GaAs LED produces infra-red light while red, green and orange lights are produced by gallium arsenide phosphide (GaAs) and gallium phosphide(Gap) .

Department of ECE, TKRCET

33

Function

LEDs emit light when an electric current passes through them. Connecting and soldering LEDs must be connected the correct way round, the diagram may be labelled a or + for anode and k or - for cathode (yes, it really is k, not c, for cathode!). The cathode is the short lead and there may be a slight flat on the body of round LEDs. If you can see inside the LED the cathode is the larger electrode (but this is not an official identification method). LEDs can be damaged by heat when soldering, but the risk is small unless you are very slow. No special precautions are needed for soldering most LEDs. Testing an LED Never connect an LED directly to a battery or power supply! It will be destroyed almost instantly because too much current will pass through and burn it out. LEDs must have a resistor in series to limit the current to a safe value, for quick testing purposes a 1k resistor is suitable for most LEDs if your supply voltage is 12V or less. Remember to connect the LED the correct way round! Colors of LEDs

LEDs are available in red, orange, amber, yellow, green, blue and white. Blue and white LEDs are much more expensive than the other colours. The colour of an LED is determined by the semiconductor material, not by the colouring of the 'package' (the plastic body). LEDs of all colours are available in uncoloured packages which may be diffused (milky) or clear (often described as 'water clear'). The coloured packages are also available as diffused (the standard(type)ortransparent.
Tri-colour LEDs The most popular type of tri-colour LED has a red and a green LED combined in one package with three leads. They are called tri-colour because mixed red and green light appears to be yellow and this is produced when both the red and green LEDs are on. The diagram shows the construction of a tri-colour LED. Note the different lengths of the three leads. The centre lead (k) is the common cathode for both LEDs, the outer leads (a1 and a2) are the anodes to the LEDs allowing each one to be lit separately, or both together to give the third colour. Bi-color LEDs A bi- colour LED has two LEDs wired in 'inverse parallel' (one forwards, one backwards) combined in one package with two leads. Only one of the LEDs can be lit at one time and they are less useful than the tri-colour LEDs described above. Sizes, Shapes and Viewing angles of LEDs

Department of ECE, TKRCET

34

LEDs are available in a wide variety of sizes and shapes. The 'standard' LED has a round cross-section of 5mm diameter and this is probably the best type for general use, but 3mm round LEDs are also popular. Round cross-section LEDs are frequently used and they are very easy to install on boxes by drilling a hole of the LED diameter, adding a spot of glue will help to hold the LED if necessary. LED clips are also available to secure LEDs in holes. Other cross-section shapes include square, rectangular and triangular. As well as a variety of colors, sizes and shapes, LEDs also vary in their viewing angle. This tells you how much the beam of light spreads out. Standard LEDs have a viewing angle of 60 but others have a narrow beam of 30 or less. Rapid Electronics stock a wide selection of LEDs and their catalogue is a good guide to the range available. Calculating an LED resistor value An LED must have a resistor connected in series to limit the current through the LED, otherwise it will burn out almost instantly.

Department of ECE, TKRCET

35

VS = supply voltage VL = LED voltage (usually 2V, but 4V for blue and white LEDs) I = LED current (e.g. 20mA), this must be less than the maximum permitted If the calculated value is not available choose the nearest standard resistor value which is greater, so that the current will be a little less than you chose. In fact you may wish to choose a greater resistor value to reduce the current (to increase battery life for example) but this will make the LED less bright. Working out the LED resistor formula using Ohm's law Ohm's law says that the resistance of the resistor, R = V/I, where: V = voltage across the resistor (= VS - VL in this case) I = the current through the resistor So R = (VS - VL) / I Connecting LEDs in series If you wish to have several LEDs on at the same time it may be possible to connect them in series. This prolongs battery life by lighting several LEDs with the same current as just one LED. All the LEDs connected in series pass the same current so it is best if they are all the same type. The power supply must have sufficient voltage to provide about 2V for each LED (4V for blue and white) plus at least another 2V for the resistor. To work out a value for the resistor you must add up all the LED voltages and use this for V L. Avoid connecting LEDs in parallel Connecting several LEDs in parallel with just one resistor shared between them is generally not a good idea.

Department of ECE, TKRCET

36

If the LEDs require slightly different voltages only the lowest voltage LED will light and it may be destroyed by the larger current flowing through it. Although identical LEDs can be successfully connected in parallel with one resistor this rarely offers any useful benefit because resistors are very cheap and the current used is the same as connecting the LEDs individually.
Department of ECE, TKRCET 37

Circuit Description: This section gives an overview of the whole circuitry and hardware involved in the project. The aim of the project is to use the RF communication for voting purpose. According to this project the person who is intended to vote is given by an voter ID.

So whenever the person is intended to vote, he needs to insert his/her ID from the special keypad which is provided in the first block, than it is checked for validity by the microcontroller through ROM, which present in the micro controller in is built. After checking for the validation, the person is allowed to vote by giving a Keypad to him if and only if the password is proved to be valid at the ballot section. Then the person needs to select the party by pressing the key against the symbol.
The data regarding the same is sent to the control receiver section using RF Transmitter and Encoder. The instantaneous data is shown and displayed in the LCD. If any unauthorized person wants to vote or any person wants done the malpractice in voting then the buzzer will blows for the few seconds.

Software components: Embedded C About Keil Introduction to Embedded C: Data Types: You people have already come across the word Data types in C- Language. Here also the functionality and the meaning of the word is same except a small change in the prefix of their labels. Now we will discuss some of the widely used data types for embedded C- programming.

Department of ECE, TKRCET

38

Unsigned char: The unsigned char is an 8-bit data type that takes a value in the range of 0-255(00-FFH). It is used in many situations, such as setting a counter value, where there is no need for signed data we should use the unsigned char instead of the signed char. Remember that C compilers use the signed char as the default if we do not put the key word. Signed char: The signed char is an 8-bit data type that uses the most significant bit (D7 of D7-D0) to represent the or + values. As a result, we have only 7 bits for the magnitude of the signed number, giving us values from -128 to +127. In situations where + and are needed to represent a given quantity such as temperature, the use of the signed char data type is a must. Unsigned int: The unsigned int is a 16-bit data type that takes a value in the range of 0 to 65535 (0000-FFFFH).It is also used to set counter values of more than 256. We must use the int data type unless we have to. Since registers and memory are in 8-bit chunks, the misuse of int variables will result in a larger hex file. To overcome this we can use the unsigned char in place of unsigned int. Signed int:

Signed int is a 16-bit data type that uses the most significant bit (D15 of D15-D0) to represent the or + value. As a result we have only 15 bits for the magnitude of the number or values from -32,768 to +32,767.
Sbit (single bit): The sbit data type is widely used and designed specifically to access single bit addressable registers. It allows access to the single bits of the SFR registers. I/O PROGRAMMING IN EMBEDDED C: In this topic we look at C- programming of the I/O ports and also both byte and bit I/O programming.

Byte size I/O As we know that ports P0-P3 are byte accessible, we use the P0-P3 labels as defined in the header file. Bit addressable I/O programming The I/O ports of P0-P3 are bit- addressable, so we can access a single bit without disturbing the rest of the port. We use the sbit data type to access a single bit of P0-P3.the format is Px^y where x is the port and y is the bit. Accessing SFR addresses 80-FFH Another way to access the SFR RAM space 80-FFH is to use the sfr data type. This is shown in the below example .Both the bit and byte addresses for the P0-P3 ports are given in the table. Notice in the given example that there is no #include<reg51.h> statement which allows us to access any byte of the SFR RAM space 80-FFH.

Department of ECE, TKRCET

39

III) DATA CONVERTION PROGRAMS IN EMBEDDED C Many micro-controllers have a real time clock (RTC) where the time and date are kept even when the power is off. These time and date are often in packed BCD by RTC. To display them they must be converted to ASCII. So, in this topic we are showing application of logic and instructions in the conversion of BCD and ASCII. ASCII numbers On ASCII key boards, when the key 0 is activated, 0110000 (30h) is provided to the system. Similarly 31h (0110001) is provided for the key 1, and so on as shown in the table. Packed BCD to ASCII conversion The RTC provides the time of day (hour, minutes, seconds) and the date (year, month, day) continuously, regardless of whether the power is ON or OFF. In the conversion procedure the packed BCD is first converted to unpacked BCD. Then it is tagged with 0110000 (30h).

Department of ECE, TKRCET

40

ASCII to packed BCD conversion To convert ASCII to packed BCD it is first converted to unpacked and then combined to make packed BCD. For example 4 and 7 on the keyboard give 34h and 37h respectively the goal is to produce 47h or 0100 0111 which is packed BCD. Key 4 7 ASCII 34 37 unpacked BCD 00000100 00000111 packed BCD

01000111 or 47h

Checksum byte in ROM To ensure the integrity of ROM contents, every system must perform the checksum calculation. The process of checksum will detect any corruption of the contents of ROM. One of the cause of the ROM corruption is current surge either when the system is turned on or during operation. To ensure data integrity in ROM the checksum process uses, what is a checksum byte. There is an extra byte that is tagged to the end of the series of data. To calculate the checksum byte of a series of bytes of data, the following steps can be used Add the bytes together and drop the carries. Take the 2s complement of the total sum. This is the checksum byte , which becomes the last byte of the series Binary (hex) to decimal and ASCII conversion in embedded C In C-language we use a function call printf which is standard IO library function doing the conversions of data from binary to decimal, or vice versa. But here we are using our own functions for conversions because it occupies much of memory. One of the most commonly used is binary to decimal conversion. In devices such as ADC chips the data is provided to the controller in binary. In order to display binary data we need to convert it to decimal and then to ASCII. Since the hexadecimal format is a convenient way of representing binary data we refer to binary data as hex. The binary data 00-FFH converted to decimal will give us 000 to 255. One way to do this is to divide it by 10 and keep the remainder, for example 11111101 or FDH is 253 in decimal. The following is one version of the algorithm for conversion of hex (binary) to decimal. Quotient 19 2 Remainder 3(low digit) LSD 5(middle digit) 2(high digit)

FD/0A 19/0A (MSD) Software USED

ABOUT SOFTWARE Softwares used are: *Keil software for c programming *Express PCB for lay out design *Express SCH for schematic design What's New in Vision3? Vision3 adds many new features to the Editor like Text Templates, Quick Function Navigation, and Syntax Coloring with brace high lighting Configuration Wizard for dialog based startup and debugger setup. Vision3 is fully compatible to Vision2 and can be used in parallel with Vision2. What is Vision3? Vision3 is an IDE (Integrated Development Environment) that helps Department of ECE, TKRCET programs. It encapsulates the following components: you write, compile, and debug embedded 41 A project manager. A make facility.

Vision2 is a standard Windows application and started by clicking on the program icon. To create a new project file select from the Vision2 menu. Project New Project. This opens a standard Windows dialog that asks you for the new project file name. To help you get started, several example programs (located in the \C51\Examples, \C251\Examples, \C166\Examples, and \ARM\...\Examples) are provided. HELLO is a simple program that prints the string "Hello World" using the Serial Interface. MEASURE is a data acquisition system for analog and digital systems. TRAFFIC is a traffic light controller with the RTX Tiny operating system. SIEVE is the SIEVE Benchmark. DHRY is the Dhrystone Benchmark. WHETS is the Single-Precision Whetstone Benchmark. Additional example programs not listed here are provided for each device architecture. Building an Application in Vision2 To build (compile, assemble, and link) an application in Vision2, you must: Select Project -(forexample,166\EXAMPLES\HELLO\HELLO.UV2). Select Project - Rebuild all target files or Build target. Vision2 compiles, assembles, and links the files in your project. Creating Your Own Application in Vision2 To create a new project in Vision2, you must: Select Project - New Project. Select a directory and enter the name of the project file. Select Project - Select Device and select an 8051, 251, or C16x/ST10 device from the Device Database. Create source files to add to the project. Select Project - Targets, Groups, Files. Add/Files, select Source Group1, and add the source files to the project.

Department of ECE, TKRCET

42

Select Project - Options and set the tool options. Note when you select the target device from the Device Database all special options are set automatically. You typically only need to configure the memory map of your target hardware. Default memory model settings are optimal for most applications. Select Project - Rebuild all target files or Build target. Debugging an Application in Vision2 To debug an application created using Vision2, you must: Select Debug - Start/Stop Debug Session. Use the Step toolbar buttons to single-step through your program. You may enter G, main in the Output Window to execute to the main C function. Open the Serial Window using the Serial #1 button on the toolbar. Debug your program using standard options like Step, Go, Break, and so on. We suggest that you use a separate folder for each project. You can simply use the icon Create New Folder in this dialog to get a new empty folder. Then select this folder and enter the file name for the new project, i.e. Project1. Vision2 creates a new project file with the name PROJECT1.UV2 which contains a default target and file group name. You can see these names in the Project. Window Files. Now use from the menu Project Select Device for Target and select a CPU for your project. The Select Device dialog box shows the Vision2 device database. Just select the micro controller you use. We are using for our examples the Philips 80C51RD+ CPU. This selection sets necessary tool options for the 80C51RD+ device and simplifies in this way the tool Configuration. Building Projects and Creating a HEX Files Typical, the tool settings under Options Target are all you need to start a new application. You may translate all source files and line the application with a click on the Build Target toolbar icon. When you build an application with syntax errors, Vision2 will display errors and warning messages in the Output Window Build page. A double click on a message line opens the source file on the correct location in a Vision2 editor window. Once you have successfully generated your application you can start debugging. After you have tested your application, it is required to create an Intel HEX file to download the software into an EPROM programmer or simulator. Vision2 creates HEX files with each build process when Create HEX files under Options for Target Output is enabled. You may start your PROM programming utility after the make process when you specify the program under the option Run User Program #1. CPU Simulation Vision2 simulates up to 16 Mbytes of memory from which areas can be mapped for read, write, or code execution access. The Vision2 simulator traps and reports illegal memory accesses. In addition to memory mapping, the simulator also provides support for the integrated peripherals of the various 8051 derivatives. The on-chip peripherals of the CPU you have selected are configured from the Device. Database selection You have made when you create your project target. Refer to page 58 for more Information about selecting a device. You may select and display the on-chip peripheral components using the Debug menu. You can also change the aspects of each peripheral using the controls in the dialog boxes. Start Debugging You start the debug mode of Vision2 with the Debug Start/Stop Debug Session command. Depending on the Options for Target Debug Configuration, Vision2 will load the application program and run the startup code Vision2 saves the editor screen layout and restores the screen layout of the last debug session. If the program execution stops, Vision2 opens an editor window with the source text or shows CPU instructions in the disassembly window. The next executable statement is marked with a yellow arrow. During debugging, most editor features are still available.

Department of ECE, TKRCET

43

For example, you can use the find command or correct program errors. Program source text of your application is shown in _ The Debug Menu and Debug Commands described on page 28 are Available. The additional debug windows are discus _ The project structure or tool parameters cannot be modified. All build Commands are disabled. Disassembly Window The Disassembly window shows your target program as mixed source and assembly program or just assembly code. A trac If you select the Disassembly Window as the active window all program step commands work on CPU instruction level rather than You may use the dialog Debug Inline Assembly to modify the CPU instructions. That allows you to correct mistakes or t

Steps for executing the Keil programs:


Click on the Keil uVision Icon on Desktop The following fig will appear

Department of ECE, TKRCET

44

Source Code:

Conclusion
The project NOVEL EVM RF has been successfully designed and tested. It has been developed by integrating features of all the hardware components used. Presence of every module has been reasoned out and placed carefully thus contributing to the best working of the unit. Secondly, using highly advanced ICs and with the help of growing technology the project has been successfully implemented.

Department of ECE, TKRCET

45

Future Aspects
We can even increase the range of distance between ballot section using high power RF transmitter and receiver. Instead of RF we can replace this GSM for more advancement in the communication wise as well as to turn up into a modern technique by voting inform of messages through our own mobile sitting at the home place. we can also place a smart card to provide a better security.

Department of ECE, TKRCET

46

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 Wireless Communications - Theodore S. Rappaport Mobile Tele Communications - William C.Y. Lee References on the Web: www.national.com www.atmel.com www.microsoftsearch.com www.geocities.com

Department of ECE, TKRCET

47

You might also like