IJCER (www.ijceronline.com) International Journal of computational Engineerin...
GSM Report_2013
1. GSM BASED VOTING MACHINE 2013
1
CHAPTER 1
1.1 INTRODUCTION
In democratic societies, voting is an important tool to collect and reflect people’s opinions.
Traditionally, voting is conducted in centralised or distributed places called voting booths.
Voters go to voting booths and cast their votes under the supervision of authorised parties.
The votes are then counted manually once the election has finished. With the rapid
development of computer technology and cryptographic methods, electronic voting systems
can be employed that replace the inefficient and most importantly error-prone human
component. To increase the efficiency and accuracy of voting procedures, computerised
voting systems were developed to help collecting and counting the votes. These include
Lever Voting Machines, Punched Cards for Voting, Optical Mark-Sense Scanners and Direct
Recording Electronic (DRE) voting systems.
For a variety of reasons, voters may be unable to attend voting booths
Physically, but need to vote remotely, for example, from home or while travelling abroad.
Hence, there is great demand for remote voting procedures that are easy, transparent, and,
most importantly, secure. Today, the most common way for remote voting is postal voting,
where voters cast their votes by post. However, it lacks proper authentication and involves a
time-consuming procedure. Internet voting was introduced to provide more flexibility.
Because of the inherited security vulnerabilities of the Internet and computerised systems in
general, Internet voting incurred a wide range of criticism. However, to date many pilot
projects in different countries and research groups have been carried out. We endeavour to
improve mobility and address security problems of remote voting procedures and systems.
We present an electronic voting scheme using GSM. With more than one billion users1, the
GSM authentication infrastructure is the most widely deployed authentication mechanism by
far.
2. GSM BASED VOTING MACHINE 2013
2
1.2 BLOCK DIAGRAM:
Figure 1
ATMEGA 32
MICROCONTROLLER
MAX232 IC
GSM
MODULE
12V AC
16X2 LCD
5V DC
SUPPLY
3. GSM BASED VOTING MACHINE 2013
3
CHAPTER 2 :COMPONENTS
2.1 ATMEGA32 MICROCONTROLLER
The Atmel®AVR®ATmega32 is a low-power CMOS 8-bit microcontroller based on the
AVR enhanced RISC architecture. By executing powerful instructions in a single clock cycle,
the ATmega32 achieves throughputs approaching 1 MIPS per MHz allowing the system
designer to optimize power consumption versus processing speed.
Figure 2
Features:
32Kbytes of In-System Self-programmable Flash program memory
1024Bytes EEPROM
2Kbytes Internal SRAM
Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
32 × 8 General Purpose Working Registers.
4. GSM BASED VOTING MACHINE 2013
4
Two 8-bit Timer/Counters with Separate Prescalers and Compare Modes
One 16-bit Timer/Counter with Separate Prescaler , Compare Mode, and Capture
Mode
Real Time Counter with Separate Oscillator
Four PWM Channels
8-channel, 10-bit ADC
32 Programmable I/O Lines
40-pin PDIP, 44-lead TQFP, and 44-pad QFN/MLF
Operating Voltages
– 2.7V - 5.5V for ATmega32L
– 4.5V - 5.5V for ATmega32
Speed Grades
– 0 - 8MHz for ATmega32L
– 0 - 16MHz for ATmega32
Power Consumption at 1MHz, 3V, 25°C
– Active: 1.1mA
– Idle Mode: 0.35mA
– Power-down Mode: < 1µA
2.2 16X2 ALPHANUMERIC LCD
It can display 16 characters per line and there are 2 such lines. In this LCD each character
is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and
Data. The command register stores the command instructions given to the LCD. A
command is an instruction given to LCD to do a predefined task like initializing it,
5. GSM BASED VOTING MACHINE 2013
5
clearing its screen, setting the cursor position, controlling display etc. The data register
stores the data to be displayed on the LCD. The data is the ASCII value of the character
to be displayed on the LCD.
Pin Diagram:
Figure 3
2.3 SIM300 GSM MODULE
Features:
Provides the industry standard serial RS232 interface for easy connection to
computers and other devices.
Provides serial TTL interface for easy and direct interface to microcontrollers.
Power, RING and Network LEDs for easy debugging.
On board 3V Lithium Battery holder with appropriate circuitry for providing backup
for the modules’ internal RTC.
Can be used for GSM based Voice communications, Data/Fax, SMS, GPRS and
TCP/IP stack.
Can be controlled through standard AT commands.
Comes with an on board wire antenna for better reception.
Board provides an option for adding an external antenna through an SMA connector.
The SIM300 allows an adjustable serial baud rate from 1200 to 115200 bps (9600
default).
Modem a low power consumption of 0.25 A during normal operations and around 1
A during transmission.
Operating Voltage: 7 – 15V AC or DC (board has on board rectifier
6. GSM BASED VOTING MACHINE 2013
6
Figure 4
2.4 MAX 232
Figure 5
The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels
during serial communication of microcontrollers with PC. The controller operates at TTL
logic level (0-5V) whereas the serial communication in PC works on RS232 standards (-
25 V to + 25V). This makes it difficult to establish a direct link between them to
7. GSM BASED VOTING MACHINE 2013
7
communicate with each other.The intermediate link is provided through MAX232. It is a
dual driver/receiver that includes a capacitive voltage generator to supply RS232 voltage
levels from a single 5V supply. Each receiver converts RS232 inputs to 5V TTL/CMOS
levels. These receivers (R1 & R2) can accept ±30V inputs. The drivers (T1 & T2), also
called transmitters, convert the TTL/CMOS input level into RS232 level. MAX232 needs
four external capacitors whose value ranges from 1µF to 22µF.
2.5 INTELLIGENT UNIVERSAL PROGRAMMER
Figure 6
Universal programmers are used for programming a wide variety of devices without requiring
family-specific modules and are suited to development projects and low volume production
programming. They are PC based and include a universal ZIF socket up to 48-pin accepting
both 300/600 mil DIP devices. Programmers support includes 1-wire E(E)PROM, BI-PROM,
configuration (EE)PROM, CPAL, EEPROM, EPROM, EPLD, flash, flash EPROM, FPGA,
GAL, MACH, microcontrollers, MROM, NV RAM, PAL, PEEL, PLD, PROM and serial
E(E)PROM.
8. GSM BASED VOTING MACHINE 2013
8
2.6 OTHER COMPONENTS
16 Mhz Crystal oscillator
Capacitors: C1,C2=22pF ; C3,C4=100nf
Inductor : L1= micro Henry
Resistor : R1=47K
Potentiometer: RV1=10K
12V, 2A AC Adaptor
5V DC input voltage
9. GSM BASED VOTING MACHINE 2013
9
CHAPTER 3:
PROJECT SETUP AND IMPLEMENTATION
3.1 HARDWARE SETUP:
Circuit Diagram:
Figure 7
12. GSM BASED VOTING MACHINE 2013
12
3.2 SOFTWARE SETUP:
3.2.1 ATMEL STUDIO 6:
Atmel® Studio 6 is the integrated development platform (IDP) for developing and debugging
Atmel ARM® Cortex™-M and Atmel AVR® microcontroller- (MCU-) based applications.
The Atmel Studio 6 IDP gives you a seamless and easy-to-use environment to write, build
and debug your applications written in C/C++ or assembly cod.
Atmel Studio 6 is free of charge and is integrated with the Atmel Software Framework
(ASF)—a large library of free source code with 1,600 ARM and AVR project examples. ASF
strengthens the IDP by providing, in the same environment, access to ready-to-use code that
minimizes much of the low-level design required for projects. Use the IDP for our wide
variety of AVR and ARM Cortex-M processor-based MCUs, including our broadened
portfolio of Atmel SAM3 ARM Cortex-M3 and M4 Flash devices.
Figure 12
13. GSM BASED VOTING MACHINE 2013
13
3.2.2 ALGORITHM FOR PROGRAM CODE:
Power ON
ON Power on
LCD is initialized Intro message Displayed
SIM module is initialized
Check Status of initialization
ichecked
IMEI number is displayed
SIM card presence is checked
Searching for network
Shows provider name
Waits for a message from the
voter
Message validation Valid messageNot valid message
Message is sent to
the voter regarding
invalid message
Acknowledgement
message is sent to
the voter
14. GSM BASED VOTING MACHINE 2013
14
CHAPTER 5:
5.1 ADVANTAGES
Democracy: All and only the authorised voters can vote, and each eligible voter can
vote no more than once. Voters can also choose not to vote.
Privacy: All votes remain secret while voting takes place and each individual vote
cannot be linked by any individual or authority to the voter who casts it.
Accuracy: The voting result accurately reflects voters’ choices. In this case, no vote
can be altered, duplicated or eliminated without being detected.
Fairness: No partial result is available before the final result comes out.
Verifiability: where any voter can check that her own vote has been considered in the
tally.
5.2 DISADVANTAGES
Cost of instrument is relatively high.
The SMS transition involves SMS server. This may introduce delay in delivering the
message. If it delivers after polling duration is completed then that vote is not
considered.
15. GSM BASED VOTING MACHINE 2013
15
CHAPTER 6:
CONCLUSION & FUTURE SCOPE
We proposed a GSM mobile voting scheme, where the GSM authentication infrastructure is
used to provide voter authentication and improve voter mobility.
Authentication is always a difficult requirement to fulfil for remote voting schemes, most of
which apply a public-key based signature scheme for voter authentication. In our scheme, by
using the existing GSM authentication infrastructure, the public-key overhead is largely
reduced. Our scheme also enhances the security and provides more mobility and convenience
to voters.Where the voters’ privacy is protected by applying a blind signature scheme. In this
paper, we presented the basic structure and protocol of our GSM based mobile voting system.
However, further work is needed to address the importance we place in the trust on the
AC(Authentication Centre), and we are therefore investigating options for enhancing and
extending the GSM mobile voting scheme. In future work, we will discuss end-user device
(ME) and application security. We will also address how the voters obtain the voting
application and solutions to provide the integrity of the voting application running on the ME.
The Trusted Platform Module and smart card solutions will be considered.
16. GSM BASED VOTING MACHINE 2013
16
REFERENCE
[1] M. Burmester and E. Magkos. Towards secure and practical e-elections in the new era. In
D. Gritzalis, editor, Secure Electronic Voting, pages 63–72. Kluwer Academic Publishers,
2003.
[2] D. Chaum. Untraceable electronic mail, return addresses, and digital
pseudonyms. Communications of the ACM, 24(2):84–88, February 1981.
[3] D. Chaum. Blind signatures for untraceable payments. In D. Chaum,
R. Rivest, and A. Sherman, editors, Advances in Cryptology—Crypto
’82, pages 199–203, New York, 1983. Plenum Press
[4]www.extremeelectronics.com
18. GSM BASED VOTING MACHINE 2013
18
int8_t r= SIM300Init();
_delay_ms(1000);
//Check the status of initialization
switch(r)
{
case SIM300_OK:
LCDWriteStringXY(0,1,"OK !");
break;
case SIM300_TIMEOUT:
LCDWriteStringXY(0,1,"No response");
Halt();
case SIM300_INVALID_RESPONSE:
LCDWriteStringXY(0,1,"Inv response");
Halt();
case SIM300_FAIL:
LCDWriteStringXY(0,1,"Fail");
Halt();
default:
LCDWriteStringXY(0,1,"Unknown Error");
Halt();
}
_delay_ms(1000);
19. GSM BASED VOTING MACHINE 2013
19
//Set message format to text
r= SIM300SetTextMode();
LCDClear();
LCDWriteString("Set Text Mode ..");
_delay_ms(1000);
//Check the result of above operation
switch(r)
{
case SIM300_OK:
LCDWriteStringXY(0,1,"OK !");
break;
case SIM300_TIMEOUT:
LCDWriteStringXY(0,1,"No response");
Halt();
case SIM300_FAIL:
LCDWriteStringXY(0,1,"Fail");
Halt();
default:
LCDWriteStringXY(0,1,"Unknown Error");
Halt();
}
_delay_ms(1000);
//IMEI No display
25. GSM BASED VOTING MACHINE 2013
25
//No valid data on eeprom, so set all votes to 0
votes[0]=votes[1]=votes[2]=votes[3]=0;
//Clear EEPROM too
eeprom_write_word((uint16_t *)0,0);
eeprom_write_word((uint16_t *)2,0);
eeprom_write_word((uint16_t *)4,0);
eeprom_write_word((uint16_t *)6,0);
}
//Wait for MSG
uint8_t id;
char oa[20];//Origin Address ()the number from where the msg came
UFlushBuffer();
while(1)
{
LCDClear();
uint8_t x=0;
LCDWriteStringXY(0,0,"A= B=");
LCDWriteStringXY(0,1,"C= D=");
LCDWriteIntXY(2,0,votes[0],4);
LCDWriteIntXY(9,0,votes[1],4);
LCDWriteIntXY(2,1,votes[2],4);
LCDWriteIntXY(9,1,votes[3],4);
while(SIM300WaitForMsg(&id)!=SIM300_OK)
31. GSM BASED VOTING MACHINE 2013
31
APPENDIX B:
CREATING A PROJECT IN ATMEL STUDIO 6 IDE
Step 1:
Start AVR Studio 6 by using its icon from the Windows® Desktop or the Start Menu.
First screen shown up after the AS6 has started is the Start Page shown below.
.
32. GSM BASED VOTING MACHINE 2013
32
Step 2:
Create a new project by selecting “New Project” option from the Start Page.AS6 will show
you the New Project Wizard as shown below.
From the project template area (Installed Templates) select C as the project template. From
the project type area select “C Executable Project”. After that fill out the project details at the
bottom like project name,its location on your PC etc. Finally Hit Ok.
Step 3:
Next to the project detail window is the Device Selection Window. That let you choose the
target MCU for your project. Here in our project we are using ATmega32 MCU so select that
from the device list.
33. GSM BASED VOTING MACHINE 2013
33
Hence after the “New Project” wizard is completed , we are presented with the AVR Studio 6
main window.
Step 4:
Write the program code in the editor window of Atmel studio 6.
34. GSM BASED VOTING MACHINE 2013
34
Step 5:
Build the project, by selecting Build Solution from the Build menu. You can also use
keyboard shortcut F7 to build the project.
If everything is setup correctly and your source files do not have any syntax error then you
will get the following message.It states the number of projects succeeded and the number of
projects failed. Since we have only one project in our solution we should get something like
shown above.