Sei sulla pagina 1di 14

FROM:

Engr Rana Muhammad Shakeel


Engnr.shakeel@gmail.com
https://www.facebook.com/EngnrShakeel
plz like my page:
https://www.facebook.com/Electrical4Electronics
For MORE PROJECTS:
http://electro-technolgy.blogspot.com



FINGER PRINT BASED ELECTRONIC
VOTING MACHINE
This project examines policy regarding the electronic approaches and
developments towards electronic data storage and transmission. Finger print
devices for Voting machines and other existing identity documents are
discussed and implemented in this project. The user has to show his voter ID
card whenever he goes to the polling booth to poll his vote. This is a time
consuming process as the person has to check the voter ID card with the list
he has, confirm it as an authorized card and then allow the person to poll his
vote.

Thus, to avoid this kind of problems, we have designed a finger print based
voting machine where the person no need to carry his ID which contains his
entire details. The person at the polling booth has to show his Finger. This
Fingerprint reader reads the details from the tag. This data is passed to the
controlling unit for the verification. The controller reads the data from the
reader and compares this data with the already existing data. If the data
matches with the already stored information, the person is allowed to poll his
vote. If not, a message is displayed on LCD and the person is not allowed to
poll his vote. The polling mechanism carries out manually using the
switches.LCD is used to display the related messages.




The project demands the user to submit his Finger print at the polling booth.
The project uses the Finger print technology and Embedded Systems to design
this application. The main objective of this project is to design a system that
asks the user to show his Finger print as an identity proof. The system reads
the data from the Finger print and verifies this data with the already stored
data in its database. If the details present in the data base it matches with the
stored data, the system allows the person to enter into and poll his vote. If the
details of the Finger do not match with the stored data,the system
immediately activates the display and the security authorities can come and
take the further action. This project is a device that collects data from the tag
and codes the data into a format that can be understood by the controlling
section. This system also collects information from the master device and
implements commands that are directed by the master. The objective of the
project is to develop a microcontroller based security and alert system. It
consists of a Finger print reader, microcontroller,the interfacing unit to allow
the communication between the microcontroller and Finger print module, and
the LCD.

BLOCK DIAGRAM




CIRCUIT DIAGRAM



WORKING

Voting machine using Finger print is basically an embedded system that
makes the things easy in the polling booths during the time of elections.


The project Finger print technology and Embedded systems to implement the
application. The user, who wants to poll his vote, has to submit the identity
proof at the counter at the polling booth. In this project, the necessary and,
upto an extent, the sufficient material, the user no need to carry with him is
the Voter card.Voter card is nothing but an Finger Print which stores the
details of the person like the name of the user, location of place, mobile
number for contact etc. When the user is asked to show his Finger print. The
Finger print module reads the data present.

The working of our EVM an be explained in three modes1. Enrolling mode2.
Identification and vote casting mode3. Results When the power of Ballot unit
is turned on, the ballot unit awaits aREADY SIGNAL from controller.
After getting READY SIGNAL, ballot unit displays its welcome to EVM
message on LCD indicating that the machine is ready and waits for user input.
The mode of operation depends on command given by the user from the
switches.

Enrolling Mode

If enrolling mode command is given, the controller waits for input and
activates the scanner to accept the finger print, displaying Enrollingon the
LCD display . The candidates finger print is scanned and generates a unique
characters code. During the character code generation, GENERATING
CHARACTER CODE is displayed on LCD. This unique code is stored in the
EEPROM memory of the controller for the future reference. After
all enrolments the system is ready for vote cast.


Identification and vote casting mode

Before casting the vote the candidate has to check for validity .so after user
pressing the identify button the controller displays identifying ..message.
During this mode the fingerprint of the candidate casting the vote is compared
with the finger prints already enrolled in the memory. If it is matched a
message PLEASE VOTE will be displayed on LCD. Once the voter presses
the button corresponding to the candidate of her/his choice, a four-bit code is
generated and sent to the control unit. Once the casting is over message is
displayed to whom they voted for.No ACCESS.. message will be displayed if
the same user tries to cast again. The machine returns to the identifying mode
and starts all over again for next voting.

RESULTS MODE

The contestant name and the secured votes will be displayed on the LCD
when the controller receives results instruction through the switches.

Advantages

Cost effective

Low power consumption

It is economical

Less manpower required

Time conscious, as less time required for voting & counting

Avoids invalid voting

Saves transportation cost due to its compact size

Convenient on the part of voter



Applications

This project can be used as an voting machine that can prevent rigging during
the elections in the polling booths.

Fast track voting which could be used in small scale elections, like resident
welfare association, panchayat level election and other society level
elections.

It could also be used to conduct opinion polls during annual shareholders
meeting.

It could also be used to conduct general assembly elections where number of
candidates are less than or equal to eight in the current situation.


FUTURE SCOPE

Number of candidates could be increased.

It could be interfaced with printer to get the hard copy of the result almost
instantly from the machine itself.

It could also be interfaced with the personal computer and result could be
stored in the central server and its backup could be taken on the other back
end servers.

Again, once the result is on the server it could be relayed on the network to
various offices of the election conducting authority. Thus our project could
make the result available any corner of the world in a matter of seconds.


Code:
1. /* Voting mechain using Finger print; */
2. #include <lpc214x.h>
3. #include "serial.h"
4. #include"lcd.h"
5. #define sw1 0x00100000
6. #define sw2 0x00020000
7. #define sw3 0x00040000
8. #define sw4 0x00080000
9. unsigned char i=0,fp[20],j=0,str[4],s=0,rec,dummy;
10. unsigned char
11. enroll[12]={0xEF,0X01,0XFF,0XFF,0XFF,0XFF,0X01,0X00,0X03,0X01,0X00,0X05};
12. unsigned char
13. generate_ch[13]={0xEF,0X01,0XFF,0XFF,0XFF,0XFF,0X01,0X00,0X04,0x02,0X01,0
X00,0X08};
14. unsigned char
15. store[11]={0xEF,0X01,0XFF,0XFF,0XFF,0XFF,0X01,0X00,0X06,0X06,0X01};
16. unsigned char
17. identify[12]={0xEF,0X01,0XFF,0XFF,0XFF,0XFF,0X01,0X00,0X03,0X11,0X00,0X15
};
18. unsigned char b1=0,b2=0,i1=0,i2=0,id=0,id1=0,id2=0,cnt=0,eeprom_add=0,aa,n=0;
19. void clearfp(void);
20. void convert (unsigned char temp_value);
21. unsigned char
part_A=0,part_B=0,part_C=0,part_D=0,check=0,count=0,enroll_check=0,en_byte;
22. void long_delay (void );
23. /*-------------------------------------------------------------------------
24. main program
25. --------------------------------------------------------------------------*/
26. int main (void )
27. {
28. lcd_init();
29. again:lcd_cmd(0x01,0);
30. delay(1000);message(0," welcome ");
31. //lcd_cmd(0x01,0);
32. lcd_cmd(0xc0,0);
33. message(0,"EVM with FP");
34. delay(1000);i=0;while(1)
35. {
36. /*******
37. Enrolling your ID
38. *********************/
39. if((IOPIN0&sw1)==0) //checking for sw1
40. {
41. while((IOPIN0&sw1)==0);
42. lcd_cmd(0x01,0);
43. message(0,"Enrolling....");
44. i=0;
45. while(i<12)
46. {
47. send_ch_UART0(enroll[i]);
48. i++;
49. }
50. rec=UART1_getch();
51. rec=UART1_getch();
52. rec=UART1_getch();
53. rec=UART1_getch();
54. rec=UART1_getch();
55. rec=UART1_getch();
56. rec=UART1_getch();
57. rec=UART1_getch();
58. rec=UART1_getch();
59. rec=UART1_getch();
60. dummy=UART1_getch();
61. dummy=UART1_getch();
62. if(!rec){lcd_cmd(0x01,0);
63. message(0,"Enrolling ok");
64. }
65. else
66. {
67. lcd_cmd(0x01,0);
68. message(0,"Enrolling not ok");
69. goto again;
70. }
71. i=0;
72. while(i<13)
73. {
74. send_ch_UART0(generate_ch[i]);
75. i++;
76. }
77. rec=UART1_getch();
78. rec=UART1_getch();
79. rec=UART1_getch();
80. rec=UART1_getch();
81. rec=UART1_getch();
82. rec=UART1_getch();
83. rec=UART1_getch();
84. rec=UART1_getch();
85. rec=UART1_getch();
86. rec=UART1_getch();
87. dummy=UART1_getch();
88. dummy=UART1_getch();
89. if(!rec)
90. {
91. lcd_cmd(0x01,0);
92. message(0,"gen char ok");
93. }
94. else
95. {
96. lcd_cmd(0x01,0);
97. message(0,"genchar not ok");
98. goto again;
99. }
100. i=0;
101. while(i<11)
102. {
103. send_ch_UART0(store[i]);
104. i++;
105. }
106. rec=UART1_getch();
107. rec=UART1_getch();
108. rec=UART1_getch();
109. rec=UART1_getch();
110. rec=UART1_getch();
111. rec=UART1_getch();
112. rec=UART1_getch();
113. rec=UART1_getch();
114. rec=UART1_getch();
115. rec=UART1_getch();
116. dummy=UART1_getch();
117. dummy=UART1_getch();
118. if(!rec)
119. {
120. lcd_cmd(0x01,0);
121. message(0,"store ok");
122. }
123. else{
124. lcd_cmd(0x01,0);
125. message(0,"store not ok");
126. goto again;
127. }
128. //check=1;
129. //enroll_check =0;
130. //en_byte=12;
131. }
132. /***********
133. identifying your ID
134. *******************/
135. if((IOPIN0&sw2)==0) //checking for sw2
136. {
137. while((IOPIN0&sw2)==0);
138. lcd_cmd(0x01,0);
139. message(0,"Identfying...");
140. i=0;
141. while(i<12)
142. {
143. send_ch_UART0(identify[i]);
144. i++;
145. }
146. check=1;
147. enroll_check =1;
148. en_byte=16;
149. }
150. /***********
151. final result
152. *******************/
153. if((IOPIN0&sw3)==0) //checking for sw3
154. {
155. while((IOPIN0&sw3)==0);
156. lcd_cmd(0x01,0);
157. message(1,"A B C D");
158. lcd_cmd(0xc0,0);
159. convert(part_A);
160. lcd_cmd(0xc4,0);
161. convert(part_B);
162. lcd_cmd(0xc7,0);
163. convert(part_C);
164. lcd_cmd(0xcc,0);
165. convert(part_D);
166. long_delay();
167. long_delay();
168. part_A=part_B=part_C=part_D=0;
169. goto again;
170. }
171. /********* receiving data from FP *********/
172. if(check==1)
173. {
174. count=0;
175. check=0;
176. while(count<en_byte)
177. {
178. fp[count]=UART0_getch();
179. count++;
180. }
181. long_delay();
182. n=0;
183. while(n<20)
184. {
185. if((fp[n]==0xEF)&&(fp[n+1]==0x01)&&(fp[n+9]==0x00))
186. {
187. lcd_cmd(0x01,0);
188. lcd_cmd(0x80,0);
189. message(1," Successfully ");
190. lcd_cmd(0xc0,0);
191. message(0xc0," completed");
192. b1=0; b2=0; i1=0; i2=0; id=0;
193. b1=fp[n+11]/10;
194. b2=fp[n+11]%10;
195. long_delay();
196. long_delay();
197. long_delay();
198. // lcd_cmd(0xc0,0);
199. // message(0xc0,"Id:");
200. // lcd_cmd(0xC3,0);
201. // lcd_cmd(b1+0x30,1);
202. // lcd_cmd(b2+0x30,1);
203. i1=b1-48;
204. i1=i1*10;
205. i2=b2-48;
206. i2=i2*1;
207. id=i1+i2;
208. long_delay();
209. if(enroll_check ==1)
210. {
211. lcd_cmd(0x01,0);
212. message(1," Plz poll ur vote ");
213. // clearfp();
214. enroll_check=0;
215. goto poll;
216. }
217. goto again;
218. }
219. else
220. {
221. lcd_cmd(0x01,0);
222. message(1," Failed");
223. long_delay();
224. goto again;
225. }
226. }
227. }
228. }
229. /*-----------------------------------------------------
230. polling your vote
231. ----------------------------------------------------*/
232. poll:
233. while(1)
234. {
235. if((IOPIN0&sw1)==0) //sw1
236. {
237. part_A++;
238. lcd_cmd(0x01,0);
239. message(1,"Vote for part A");
240. long_delay();goto again;
241. }
242. if((IOPIN0&sw2)==0) //sw2
243. {
244. part_B++;
245. lcd_cmd(0x01,0);
246. message(1,"Vote for part B");
247. long_delay();
248. goto again;
249. // goto again;
250. }
251. if((IOPIN0&sw3)==0) //sw3
252. {
253. part_C++;
254. lcd_cmd(0x01,0);
255. message(1,"Vote for part C");
256. long_delay();
257. goto again;
258. // goto again;
259. }
260. if((IOPIN0&sw4)==0) //sw4
261. {
262. part_D++;
263. lcd_cmd(0x01,0);
264. message(1,"Vote for part D");
265. long_delay();
266. goto again;
267. //goto again;
268. }
269. }
270. }
271. /*------------------------------------------------Clear the string clearfp
272. ------------------------------------------------*/
273. void clearfp(void)
274. {
275. unsigned char cl=0;
276. while(cl<20)
277. {
278. fp[cl]=' ';
279. cl++;
280. }
281. j=0;
282. }
283. /*---------------------------------------------------------------------------------------
284. ;convertion program Binary to ASCii ;
285. --------------------------------------------------------------------------------------*/
286. void convert(unsigned char temp_value)
287. {
288. unsigned char value,d1,d2,d3,k=0;
289. temp_value = temp_value;
290. value=temp_value/10;
291. d3=temp_value%10;
292. d1=value/10;
293. d2=value%10;
294. d1=d1+30;
295. // lcddata(d1);
296. delay(10);
297. d2=d2+30;
298. lcd_cmd(d2,1);
299. delay(4);
300. k++;
i. // msgdisplay(".");
301. d3=d3+0x30;
302. lcd_cmd(d3,1);
303. delay(10);
304. k=0;
305. }

306. /*---------------------------------------------------------------------------------
307. ; long delay ;
308. ----------------------------------------------------------------------------------*/
309. void long_delay (void )
310. {
311. unsigned int g;
312. for(g=0;g<500;g++)
313. delay(40000);
314. }

Potrebbero piacerti anche