Prototype (Final)
Prototype (Final)
Chandkheda, Ahmedabad
A
Prototype
On
HYBRID ENERGY GENERATOR MODEL
Under subject of
DESIGN ENGINEERING – IIB
B. E. III, Semester – VI
(Electronics and Communication)
Submitted by:
Academic year
(2022-2023)
REQUIREMENT SPECIFICATION
Arduino
Arduino is an open source, computer hardware and software company, project, and user
community that designs and manufactures microcontroller kits for building digital
devices and interactive objects that can sense and control objects in the physical world.
The project's products are distributed as open-source hardware and software, which are
licensed under the GNU Lesser General Public License (LGPL) or the GNU General
Public License (GPL), permitting the manufacture of Arduino boards and software
distribution by anyone. Arduino boards are available commercially in preassembled
form, or as do-it-yourself kits. Arduino board designs use a variety of microprocessors
and controllers. The boards are equipped with sets of digital and analog input/output
(I/O) pins that may be interfaced to various expansion boards (shields) and other
circuits. The boards feature serial communications interfaces, including Universal
Serial Bus (USB) on some models, which are also used for loading programs from
personal computers.
(i) Power USB- Arduino board can be powered by using the USB cable from
yourcomputer. All you need to do is connect the USB cable to the USB connection
Arduino boards can be powered directly from the AC mains power supply by
connecting it to the Barrel Jack.
The function of the voltage regulator is to control the voltage given to the Arduino
board and stabilize the DC voltages used by the processor and other elements.
You can reset your Arduino board, i.e., starts your program from the beginning. You
can reset the UNO board in two ways. First, by using the reset button (17) on the board.
Second, you can connect an external reset button to the Arduino pin labelled RESET
(5).
Most of the components used with Arduino board works fine with 3.3 volt and 5 volt.
GND (8) (Ground) − There are several GND pins on the Arduino, any of which can be
used to ground your circuit.
VIN (9) − this pin also can be used to power the Arduino board from an external power
source, like AC mains power supply.
(x) Analog pins- The Arduino UNO board has five analog input pins A0 through
A5. These pins can read the signal from an analog sensor like the humidity sensor or
temperature sensor and convert it into a digital value that can be read by the
microprocessor.
(xi) Main microcontroller- Each Arduino board has its own microcontroller (11).
You can assume it as the brain of your board. The main IC (integrated circuit) on the
Arduino is slightly different from board to board. The microcontrollers are usually of
the ATMEL Company. You must know what IC your board has before loading up a
new program from the Arduino IDE. This information is available on the top of the IC.
For more details about the IC construction and functions, you can refer to the data sheet.
(xii) ICSP pin- Mostly, ICSP (12) is an AVR, a tiny programming header for the
Arduino consisting of MOSI, MISO, SCK, RESET, VCC, and GND. It is often referred
to as an SPI (Serial Peripheral Interface), which could be considered as an "expansion"
of the output. Actually, you are slaving the output device to the master of the SPI bus.
(xiii) Power LED indicator- This LED should light up when you plug your Arduino
intoa power source to indicate that your board is powered up correctly. If this light does
notturn on, then there is something wrong with the connection.
(xiv) TX and RX LEDs- On your board, you will find two labels: TX (transmit) and
RX(receive). They appear in two places on the Arduino UNO board. First, at the digital
pins 0 and 1, to indicate the pins responsible for serial communication. Second, the TX
and RX led (13). The TX led flashes with different speed while sending the serial data.
The speed of flashing depends on the baud rate used by the board. RX flashes during
the receiving process.
(xv) Digital I/O- The Arduino UNO board has 14 digital I/O pins (15) (of which 6
provide PWM (Pulse Width Modulation) output. These pins can be configured to work
as input digital pins to read logic values (0 or 1) or as digital output pins to drive
different modules like LEDs, relays, etc. The pins labelled can be used to generate
PWM.
(xvi) AREF- AREF stands for Analog Reference. It is sometimes, used to set an
external reference voltage (between 0 and 5 Volts) as the upper limit for the analog
input pins.
Microcontroller- ATmega2560
Analog Input 16 .
LCD (Liquid Crystal Display)
The term LCD stands for liquid crystal display. It is one kind of electronic display module
used in an extensive range of applications like various circuits & devices like mobile phones,
calculators, computers, TV sets, etc. These displays are mainly preferred for multi-
segment light-emitting diodes and seven segments. The main benefits of using this module
are inexpensive; simply programmable, animations, and there are no limitations for
displaying custom characters, special and even animations, etc.
i) Pin1 (Ground/Source Pin): This is a GND pin of display, used to connect the GND
terminal of the microcontroller unit or power source.
ii) Pin2 (VCC/Source Pin): This is the voltage supply pin of the display, used to connect
the supply pin of the power source.
iii) Pin3 (V0/VEE/Control Pin): This pin regulates the difference of the display, used to
connect a changeable POT that can supply 0 to 5V.
iv) Pin4 (Register Select/Control Pin): This pin toggles among command or data register,
used to connect a microcontroller unit pin and obtains either 0 or 1(0 = data mode,
and 1 = command mode).
v) Pin5 (Read/Write/Control Pin): This pin toggles the display among the read or writes
operation, and it is connected to a microcontroller unit pin to get either 0 or 1 (0 =
Write Operation, and 1 = Read Operation).
vi) Pin 6 (Enable/Control Pin): This pin should be held high to execute Read/Write
process, and it is connected to the microcontroller unit & constantly held high.
vii) Pins 7-14 (Data Pins): These pins are used to send data to the display. These pins are
connected in two-wire modes like 4-wire mode and 8-wire mode. In 4-wire mode,
only four pins are connected to the microcontroller unit like 0 to 3, whereas in 8-
wire mode, 8-pins are connected to microcontroller unit like 0 to 7
viii) Pin15 (+ve pin of the LED): This pin is connected to +5V
ix) Pin 16 (-ve pin of the LED): This pin is connected to GND.
Features of LCD16x2: -
The features of this LCD mainly include the following.
Figure(iii) Potentiometer
Use of Potentiometer: -
The potentiometer is an instrument used for measuring the unknown voltage by comparing it
with the known voltage. It can be used to determine the emf and internal resistance of the
given cell and also used to compare the emf of different cells. The comparative method is
used by the potentiometer.
Jumper wires
The term "jumper wire" simply refers to a conducting wire that establishes an electrical
connection between two points in a circuit. A jump wire is an electrical wire, or group of
them in a cable, with a connector or pin at each end, which is normally used to interconnect
the components of a breadboard or other prototype or test circuit, internally or with other
equipment or components, without soldering.
Push Button
A push button switch is a mechanical device used to control an electrical circuit in which the
operator manually presses a button to actuate an internal switching mechanism. They come in
a variety of shapes, sizes, and configurations, depending on the design requirements.
Working: -
In this project we have used four push buttons for four different candidates. We can increase
the number of candidate but for better understanding we have limited it to four. When any
voter press any of four buttons then respecting voting value will increment by one each time.
After whole voting we will press result button to see the results. As the "result" button is
pressed, Arduino calculates the total votes of each candidate and show it on LCD display.
Circuit of this project is quite easy which contains Arduino, push buttons and LCD. Arduino
controls the complete processes like reading button, incrementing vote value, generating
result and sending vote and result to LCD. Here we have added five buttons in which first
button is for BJP, second for INC, third is for AAP, forth is for OTH means others and last
button is used for calculating or displaying results.
The five push buttons are directly connected with pin 15-19(A1-A5) of Arduino with respect
to ground. A 16x2 LCD is connected with Arduino in 4-bit mode. Control pin RS, RW and
En are directly connected to Arduino pin 12, GND and 11. And data pin D4-D7 is connected
to pins 5, 4, 3 and 2 of Arduino.
SIMULATION: -
*Note: -
For Better understanding about Microcontroller based voting machine, we have
use Tinker card online simulator. We can also use simulator like multisim,
Proteus and etc.
Link of Simulator: -
https://www.tinkercad.com/things/2gxj9Ik3rnY-copy-of-e-voting-machine-
using-arduino/editel?tenant=circuits
Circuit Diagram: -
#include<LiquidCrystal.h>
LiquidCrystal lcd(13, 12, 11, 10, 9, 8);
#define S1 7
#define S2 6
#define S3 5
#define S4 4
#define S5 3
int vote1=0;
int vote2=0;
int vote3=0;
int vote4=0;
void setup()
{
pinMode(S1, INPUT);
pinMode(S2,INPUT);
pinMode(S3,INPUT);
pinMode(S4,INPUT);
pinMode(S5,INPUT);
lcd.begin(16, 2);
lcd.print(" Electronic ");
lcd.setCursor(0,1);
lcd.print(" Voting Machine ");
delay(4000);
digitalWrite(S1, HIGH);
digitalWrite(S2, HIGH);
digitalWrite(S3, HIGH);
digitalWrite(S4, HIGH);
digitalWrite(S5, HIGH);
lcd.clear();
lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(5,0);
lcd.print("b");
lcd.setCursor(9,0);
lcd.print("C");
lcd.setCursor(13,0);
lcd.print("D");
}
void loop()
{
lcd.setCursor(1,0);
lcd.print("A");
lcd.setCursor(1,1);
lcd.print(vote1);
lcd.setCursor(5,0);
lcd.print("B");
lcd.setCursor(5,1);
lcd.print(vote2);
lcd.setCursor(9,0);
lcd.print("C");
lcd.setCursor(9,1);
lcd.print(vote3);
lcd.setCursor(13,0);
lcd.print("D");
lcd.setCursor(13,1);
lcd.print(vote4);
if(digitalRead(S1)==0)
vote1++;
while(digitalRead(S1)==0);
if(digitalRead(S2)==0)
vote2++;
while(digitalRead(S2)==0);
if(digitalRead(S3)==0)
vote3++;
while(digitalRead(S3)==0);
if(digitalRead(S4)==0)
vote4++;
while(digitalRead(S4)==0);
if(digitalRead(S5)==0)
{
int vote=vote1+vote2+vote3+vote4;
if(vote)
{
if((vote1 > vote2 && vote1 > vote3 && vote1 > vote4))
{
lcd.clear();
lcd.print("A is Winner");
delay(3000);
lcd.clear();
}
else if((vote2 > vote1 && vote2 > vote3 && vote2 > vote4))
{
lcd.clear();
lcd.print("B is Winner");
delay(3000);
lcd.clear();
}
else if((vote3 > vote1 && vote3 > vote2 && vote3 > vote4))
{
lcd.clear();
lcd.print("C is Winner");
delay(3000);
lcd.clear();
}
else if(vote4 > vote1 && vote4 > vote2 && vote4 > vote3)
{
lcd.setCursor(0,0);
lcd.clear();
lcd.print("D is Winner");
delay(3000);
lcd.clear();
}
else
{
lcd.clear();
lcd.print(" Tie Up Or ");
lcd.setCursor(0,1);
lcd.print(" No Result ");
delay(3000);
lcd.clear();
}
}
else
{
lcd.clear();
lcd.print("No Voting ... ");
delay(3000);
lcd.clear();
}
vote1=0;vote2=0;vote3=0;vote4=0,vote=0;
lcd.clear();
}
}
REFRENCES
Web-Link: -
[1] :- https://www.thingbits.in/products/standard-lcd-16x2-
display#:~:text=A%2016x2%20LCD%20means%20it,%2C%20namely%2C%2
0Command%20and%20Data.
[2] :- https://how2electronics.com/smart-electronic-voting-machine-using-
arduino/
[3] :- https://ieeexplore.ieee.org/document/8300781
[4]:-
http://www.ieeeprojectmadurai.in/IEEE%202019%20IOT%20BASEPAPERS/4
_VOTING%20MACHINE.pdf