SMS Based Voting System – AVR GSM Project using ATmega32 microcontroller

Summary of SMS Based Voting System – AVR GSM Project using ATmega32 microcontroller


This article describes a GSM-based voting system using an AVR ATmega32 microcontroller. Users vote by sending text messages (e.g., "VOTE A") to a specific number, with results displayed on an LCD and stored in EEPROM to survive power cycles. The project utilizes an xBoard 2.0 development board for the core circuitry and connects a SIM300 module via three wires.

Parts used in the GSM Based Voting System:

  • AVR ATmega32 microcontroller
  • 16x2 LCD Module
  • SIM300 GSM Module
  • xBoard 2.0 development board
  • USB AVR Programmer
  • 12v 500 ma DC adaptor
  • 12v 2A DC Adaptor
  • SIM card

Hi friends !
Here I am showing a microcontroller based project called the “GSM Based Voting System“. Using this system you can ask your users to vote for any of the four options. Four available options are identified by a letters ‘A’, ‘B’, ‘C’ and ‘D’. User can vote for any option by sending a text message to the mobile number.
For example if you want to create a poll like this.
Which is your favorite phone brand?
A: Nokia
B: Apple
C: Samsung
D: L.G.
So your user can vote for any of the four brands by sending a message like this
VOTE x
where x is the choice he/she wish to vote for. For example if they want to vote for Nokia, then they should send a message like this :
VOTE A
The number of vote received for each option is shown in real time on the LCD Module. The votes are stored in the internal EEPROM of the AVR so they are not lost on power failures. That means even if you switch off the device and switch it on after few days (or few years!) it will remember the votes !

gsm based voting system project

Schematic for the Project

The project is based around AVR ATmega32 microcontroller which is connected to a 16×2 LCD Module and a SIM300 GSM Module. We have used xBoard 2.0 development board to accelerate our development process. It is a ready made ATmega32 board with built in 16×2 LCD Module and many other common peripherals. So if you are working with xBoard 2.0 then you only need to connect the GSM Module. It involves connecting only three wires!
We have made the prototype using xBoard development board because it has ATmega32 core circuit, 5v power supply circuit and the LCD module.
atmega32 gsm module thumb
After completing the connection, power up xBoard 2.0 using a 12v 500 ma DC adaptor. And program the board with the HEX file for the project(download available at the end of article). Then insert a SIM card in SIM300 module and power it up using a 12v 2A DC Adaptor. Restart the xBoard 2.0 using its reset button.
Here are some links for your help.

Source Code for the Project

#include <avr/io.h>
#include <util/delay.h>
#include <avr/eeprom.h>
#include "lib/lcd/lcd.h"
#include "lib/sim300/sim300.h"

void Halt();  void Reply(const char *num,uint8_t stat);
 For more detail: SMS Based Voting System – AVR GSM Project using ATmega32 microcontroller 

Quick Solutions to Questions related to GSM Based Voting System:

  • How do users cast their votes?
    Users send a text message containing VOTE followed by the option letter (A, B, C, or D) to the mobile number.
  • What happens to the votes if the device loses power?
    The votes are stored in the internal EEPROM of the AVR so they are not lost on power failures.
  • Which microcontroller is used in this project?
    The project is based around the AVR ATmega32 microcontroller.
  • How many wires are needed to connect the GSM Module to the xBoard 2.0?
    Connecting the GSM Module involves only three wires when using the xBoard 2.0.
  • Where are the vote counts displayed?
    The number of votes received for each option is shown in real time on the LCD Module.
  • What power supply is required to run the xBoard 2.0?
    You must power up the xBoard 2.0 using a 12v 500 ma DC adaptor.
  • What tool is needed to program the xBoard 2.0?
    An USB AVR Programmer is required for programming the xBoard 2.0.
  • Can the device remember votes after being switched off for years?
    Yes, the device will remember the votes even if switched off after few days or few years due to EEPROM storage.

About The Author

Author avatar

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Stay in the loop

New AVR projects, tutorials and schematics, every week.

Subscribe Browse projects

Scroll to Top