Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

1.1 Overview of The System: GSM Based Digital Notice Board 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 56

GSM Based Digital Notice Board

1. INTRODUCTION
1.1 OVERVIEW OF THE SYSTEM The novel idea of this project is to receive message through mobile phones and send it to Notice Board for display. This project is basically a micro controller- based design used to control remote notice board. AT89S52 is heart of this project. Here wirelessly, we use mobile phones to send the message to the gsm modem as a message sender or serially, we use the VB interface to transfer the message to the microcontroller. The mobile used here is of GSM technology. Using Attention commands (AT Commands) GSM modem operations can controlLCD. 1.2 PROJECT PLAN The main goal of the project is to create a digital notice board, which displays messages received through an SMS or through the PC. This will be achieved by using a GSM modem, which will act like a GSM cell phone with a dedicated SIM card, which will receive an SMS and transmit it to the microcontroller. The GSM modem will be configured using AT commands. The microcontroller will be programmed using Keil u-vision 3.0 and embedded C language. Only SMSs with the correct pass code will be displayed on the notice board. When a new message arrives, the old one will be deleted and the new message will be displayed. The user interface on the PC will be designed to send a message to the microcontroller which will be displayed on the digital notice board. This can be done using MS comm. Controls 6.0 and RS232 interface. A message typed in the text box will be sent to the microcontroller using the RS232 interface and MAX232 chip, which will interpret the message and display it on the digital notice board.

2. SYSTEM ANALYSIS
Department of Computer Science, Christ University

GSM Based Digital Notice Board

In todays world it is said that, world is shrinking day by day. It is due to the fact that people from different parts of the world are able to communicate with each other within fractions of seconds. All these advantages are possible due to the advantages in digital communication techniques. With the advent of cellular technology the use of mobile telephones are increased drastically over the years. In todays world of technological advancements communications and control is necessary in any part of the world. 2.1 EXISTING SYSTEM Currently colleges rely on putting up notices on the notice boards using paper. This is time consuming since time is needed for preparing notices and manually putting them up and there is wastage of paper. If we need to update the notice then we have to take a new printout. The existing system used in buses, trains, stock market, advertisements etc. doesnt support wireless functionality. The message to be displayed is manually entered by the person in charge and then it appears on the display. The Microprocessor reads the data that is stored in the memory and converts the message into a form understood by the LCD display LIMITATION OF EXISTING SYSTEM Not Wireless No GSM based technology Less secured Unable to Display multiple messages at the same time Only supports up to 16 characters(64 kb)

2.2 PROPOSED SYSTEM The proposed system is an LCD display notice board which displays text more than 16 characters in one frame, which can be sent to the system either by a keyboard input Department of Computer Science, Christ University

GSM Based Digital Notice Board

or through an SMS using a GSM modem. The text sent through the keyboard input will be sent via the main system, which will have input for the text, type of display and duration. The text received from the GSM modem will be displayed on the notice board only if it identifies the unique pass key. The GSM modem will not be used to accept phone calls or be able to read the text messages; it will only receive the message and transfer it to the microprocessor. The display options on screen will be control LCD by the main system. The screen will show the time when it is idle. BENEFITS OF PROPOSED SYSTEM Completely Wireless GSM Technology No Distance Barriers Provides Serial and Wireless Connectivity Efficiently Secured Environmental Friendly Repository of the displayed messages

2.3 LITERATURE REVIEW This project is an implementation to the idea of the wireless communication between a mobile phone and a microcontroller and serial communication of VB and a microcontroller. Currently the main work that has been done on the existing system is through serial communication to the microcontroller but not wireless. If they want to change the message, they have to go to the remote area with the laptop and change the message. The system has to be reprogrammed to display new messages. But in this new design, the systems need not be reprogrammed to display new messages because it is wireless. The user will send SMS from his phone and it will be display on the display unit which is being made up of liquid crystal display. In the new system, when new messages enter, the old messages will be deleted. 2.4 SOFTWARE TOOL USED 2.4.1 VISUAL BASIC 6.0 Visual Basic (VB) is an event driven programming language and associated development environment from Microsoft for its COM programming model. Visual Department of Computer Science, Christ University

GSM Based Digital Notice Board

Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications. Visual Basic allows many additional components to be added to the toolbox. The Microsoft Comm component is used to add a serial communication facility. Here we have used VB also for providing graphical user interface at PC for easy access to display system, password changing and monitoring. 2.4.2 KEIL U VISION 3.0 Keil development tools for the 8051 Microcontroller Architecture support every level of software developer from the professional applications engineer to the student just learning about embedded software development. The Keil 8051 Development Tools are designed to solve the complex problems facing embedded software developers. 2.4.3 EMBEDDED C Embedded C is used for microcontroller programming. There is a large and growing international demand for programmers with 'embedded' skills, and many desktop developers are starting to move into this important area. Because most embedded projects have severe cost constraints, they tend to use low-cost processors like the 8051 family of devices considered in this paper. 2.4.4 EXPRESS PCB Express PCB is free PCB software and is a snap to learn and use. Designing circuit boards is simple for the beginner and efficient for the professional. The board manufacturing service makes top quality two and four layer PCBs.

3. SYSTEM REQUIREMENTS
3.1 SYSTEM MODEL

Department of Computer Science, Christ University

GSM Based Digital Notice Board

Figure 3.1 : System Model

3.2 FUNCTIONAL REQUIREMENTS

Department of Computer Science, Christ University

GSM Based Digital Notice Board Table 3.1 : Functional Requirements

MODULE (SERIAL) PC INTERFACE (GUI)

ENTRIES

FUNCTIONS

REQUIREMENTS

VB 6.0 used to Login Password: Requests user to specify the password for login. create the login and GUI.

Serial port Admin can type the Send Message text to be displayed on LCD screen. connectivity to the microcontroller is required to display the message.

Admin can send the current date and Date and Time time to be displayed when the LCD is idle. VB 6.0 and Serial port connectivity to microcontroller.

Predefined Messages

Similar to a Dictionary

List of Dictionary Words and Basic Phrases are Requires

Department of Computer Science, Christ University

GSM Based Digital Notice Board

User name, time of User Log message and text of message are stored.

Database Connectivity is required to store it in Database

The Authorized (WIRELESS) HARDWARE INTERFACE GSM modem person can send the text message to the modems phone number.

GSM transmitter and a SIM card are required to receive and interpret the text message to the microcontroller.

The machine code (main program) is Microcontroller used to interpret the text or message to the display. The text to be displayed on the LCD is required.

It displays the text Display Unit interpreted by the microcontroller.

The interpreted text message is required to be displayed

Department of Computer Science, Christ University

GSM Based Digital Notice Board

3.3 HARDWARE REQUIREMENTS 3.3.1 MICROCONTROLLER The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K 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 pin out. 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 AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Powerdown mode saves the RAM con-tents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset. 8-bit Microcontroller with 8K Bytes In-System Programmable Flash AT89S52 1919D

Figure 3.2 : Atmel 89S52

FEATURES Department of Computer Science, Christ University

GSM Based Digital Notice Board

8K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 10,000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 256 x 8-bit Internal RAM 32 Programmable I/O Lines Fast Programming Time Flexible ISP Programming Interrupt Recovery from Power-down Mode Eight Interrupt Sources Three 16-bit Timer/Counters

3.3.2 GSM MODEM

Figure 3.3: GSM Modem

A GSM modem is a wireless modem that works with a GSM wireless network. A wireless modem behaves like a dial-up modem. The main difference between them is that a dial-up modem sends and receives data through a fixed telephone line while a Department of Computer Science, Christ University

GSM Based Digital Notice Board

10

wireless modem sends and receives data through radio waves. Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate. Generally, computers use AT commands to control modems. Reading of message from the SIM card inserted into the modem is done by sending the appropriate AT command to the modem. In addition to the standard AT commands, GSM modems support an extended set of AT commands. These extended AT commands are defined in the GSM standards. Some common basic SMS related AT Commands are shown in table below:

Figure 3.4 : AT Commands

3.3.2.1 GSM MODEM CHARACTERISTICS Triband GSM GPRS modem (EGSM 900/1800 / 1900 MHz) Designed for GPRS, data, fax, SMS and voice applications GPRS multi-slot class 10 Department of Computer Science, Christ University

GSM Based Digital Notice Board

11

GPRS mobile station class B Designed for GPRS, data, fax, SMS and voice applications Fully compliant with GSM Phase 2/2+ specifications Built-in TCP/IP Protocol Built-in RTC in the module AT Command based

3.3.2.2 SPECIFICATION FOR SMS VIA GSM Point-to-point Mobile Originated(MO)&Mobile Terminated(MT) SMS cell broadcast Text

3.3.2.3 POWER SUPPLY Use AC DC Power Adaptor with following ratings: Input AC Voltage: 230V Output DC Voltage : 12V Output DC Current : 2A Polarity : Centre +ve & Outside ve

3.3.2.4 INTERFACES RS-232 through D-TYPE 9 pin connector Serial port baud rate 1200 to 115200 bps Power supply through DC jacket Toggle spring/Flap Opening type SIM holder LED status of GSM / GPRS module

3.3.3 RS 232 In telecommunications, RS-232 is a standard for serial binary data signals connecting between a DTE (Data terminal equipment) and a DCE (Data Circuit-terminating Equipment). It is commonly used in computer serial ports. In RS-232, data is sent as a time-series of bits. Both synchronous and asynchronous transmissions are supported Department of Computer Science, Christ University

GSM Based Digital Notice Board

12

by the standard. In addition to the data circuits, the standard defines a number of control circuits used to manage the connection between the DTE and DCE. Each data or control circuit only operates in one direction thatis, signaling from a DTE to the attached DCE or the reverse. Since transmit data and receive data are separate circuits, the interface can operate in a full duplex manner, supporting concurrentdata flow in both directions. The standard does not define character framing within the datastream, or character encoding.

Figure 3.5: Female 9 pin plug

3.3.4 MAX 232 The MAX220MAX249 family of line drivers/receivers is intended for all EIA/TIA232E and V.28/V.24 communications interfaces, particularly applications where 12V is not available. These parts are especially useful in battery-powered systems, since their low-power shutdown mode reduces power dissipation to less than 5W

Figure 3.6: Pin Diagram MAX - 232

3.3.3 DISPLAY UNIT One of the most common devices attached to amicrocontroller is an LCD display. Here we have used 16x2 that means 2 rows and 16 characters. It is a Hitachi HD44780 compatible module, having 16 pins including 2 pins for backlight.

Department of Computer Science, Christ University

GSM Based Digital Notice Board

13

To program the LCD module, first we have to initialize the LCD by sending some control words. RS should be low and E should be high when we send control. R/W pin 0 mean write data or control to LCD and R/W pin 1 means read data from the LCD. To send a data to LCD, make RS high, R/W low, place the data in pins 7 to 14 and make pin E high and low once. To make this let us first build a circuit. We are going to write on the LCD module and not reading back. So, R/W is connected to ground directly. We need not have to input any data through, so all output pins are used in our application. Data pins of LCD are connected to data pins of the port. Strobe signal (Pin 1 of D25 connector) is given to E (Pin 6 of LCD), Select printer (Pin 17 of D25) is connected to RS (pin 4 of the LCD). Pin Configuration of LCD is shown in fig 3.5

Figure 3.7 : Pin Description of LCD

3.3.4 SYSTEM Minimum 256 MB RAM Minimum 256 MB Storage Capacity Processor Speed 1 GHz and Above

3.4 SOFTWARE REQUIREMENTS FRONT END Visual Basic 6.0

Department of Computer Science, Christ University

GSM Based Digital Notice Board

14

BACK END Oracle 10g Keil u Vision3

OS PLATFORM Microsoft Windows Xp Sp2 or Above

4. DESIGN SPECIFICATION
4.1 ARCHITECTURE DESIGN An early stage of the system design process, represents the link between specification and design processes, often carried out in parallel with some specification activities, it involves identifying major system components and their communications. Department of Computer Science, Christ University

GSM Based Digital Notice Board

15

Multi-Tier Architecture: It represents the structure of data and program components that are required to build the software. This software has Multi-tier architecture. The description of the two tiers is as follows: 1stTier: This tier represents the easy to use user interface (GUI) used to interact with the software. It is developed using the VB 6.0. It consists of various forms with buttons and other controls to transfer the text to the LCD. 2ndTier: This tier represents the data which is stored in the database. The software used to store data into database is Oracle 10g.

Figure 4.1 : Architecture Design

3rd Tier: This tier represents the hardware equipment and here there is transfer of message from the microcontroller to the LCD.

4.2FLOWCHARTS 4.2.1 WIRELESS

Department of Computer Science, Christ University

GSM Based Digital Notice Board

16

Figure 4.2: Wireless Communication

4.2.2SERIAL

Department of Computer Science, Christ University

GSM Based Digital Notice Board

17

Figure 4.3: Serial Communication

4.3 DATABASE DESIGN

Department of Computer Science, Christ University

GSM Based Digital Notice Board

18

Normalization is the process of efficiently organizing data in a database. There are two of goals the normalization process: eliminating redundant data and ensuring data dependency. Both of these are worthy goals as they reduce the amount of space a database consumes and ensures that data is logically stored. The Normal forms Normalizations are classified into three groups: First normal form (1NF), second normal form (2NF) and third normal form (3NF). The three normal forms are based on the functional dependencies among the attributes of a relation. First Normal Form (1NF) First Normal form (1NF) sets the very basic rules for an organized database: Eliminate duplicate columns from the same table. Create separate tables for each group of related data and identify each row with a unique column or set of columns (primary key). Second Normal Form (2NF) The second Normal form (2NF) further addresses the concept of removing data: Meet all the requirements of the first normal form Remove subsets of data that apply two multiple rows of a table and place them in separate tables. Create relationships between these new tables and their predecessors through the use of foreign keys. Third Normal Form (3NF) Third normal form (3Nf) goes one large step further: Meet all the requirements of the second normal form Remove column that are not dependent upon the primary key

4.3.1 TABLE DESIGN

Department of Computer Science, Christ University

GSM Based Digital Notice Board Table 4.1: Table Design of Login

19

COLUMN NAME

DESCRIPTION

DATA TYPE

SIZE

CONSTRAINTS

It contains all username It contains the

Varchar2

20

Primary Key

corresponding password

Varchar2

20

It contains the secret question It contains the answer to the secret question

Varchar2

20

Varchar2

50

Table 4.2: Table Design of Userlog

COLUMN NAME

DESCRIPTION

DATA TYPE

SIZE

CONSTRAINTS

Username

It contains all username The Current date of the message sent This contains the login time of the user This is the text being sent

Varchar2

10

Foreign Key

Tdate

Varchar2

10

Login Time

Varchar2

20

Message

Varchar2

20

4.3.2 DATA DICTIONARY Department of Computer Science, Christ University

GSM Based Digital Notice Board Table 4.3: Data Dictionary of Login Table COLUMN NAME MIN VALUE MAX VALUE

20

DECIMAL

DEFAULT

CHECK CONDITION

10

NA

No

NOT NULL

10

NA

No

NOT NULL

20

NA

No

NOT NULL

20

NA

No

NOT NULL

Table 4.4: Data Dictionary of Userlog Table COLUMN NAME MIN VALUE MAX VALUE CHECK CONDITION

DECIMAL

DEFAULT

Username

20

NA

No

NOT NULL

Tdate

20

NA

No

NOT NULL

Login Time

20

NA

No

NOT NULL

Message

50

NA

No

NOT NULL

4.4 USER INTERFACE DESIGN Department of Computer Science, Christ University

GSM Based Digital Notice Board

21

4.4.1 SPLASH SCREEN It pops at the launch of the application which highlights the developers of the application. This even highlights the project title and the copyright law

Figure 4.4: Splash Screen

4.4.2 LOGIN SCREEN This screen makes sure that no unauthorized person accesses the application. Department of Computer Science, Christ University

GSM Based Digital Notice Board

22

This form contains a username and password, on entering the correct username and the password the respective user is preceded to the main screen.

Figure 4.5: Login Screen

Figure 4.6 : Invalid Password Screen

4.4.2 FORGOT PASSWORD This screen helps users to retrieve their password if they have forgotten it. Department of Computer Science, Christ University

GSM Based Digital Notice Board

23

This form contains a username, question and answer on entering the correct answer the password is being retrieved and displayed to the respective user.

Figure 4.7 : Forgot Password Screen

Figure 4.8 : Invalid Answer Screen

4.4.3 MAIN SCREEN

Department of Computer Science, Christ University

GSM Based Digital Notice Board

24

This is the heart of the application which helps the respective user to send message to the LCD, Maintain LOG and many other functionalities. ABOUT US This screen describes what this application is all about containing the following information: Developers of the application Application version Copyright details

Figure 4.9 : About Us Screen

MESSAGE

Department of Computer Science, Christ University

GSM Based Digital Notice Board

25

This screen is used to send the message to the display unit. It even contains a predefined dictionary from which the user can select the words and form sentences. This Screen conational features such as: Clock:

If the user clicks on the clock the current time gets displayed automatically. Calendar:

If the user clicks on the calendar the current date gets displayed automatically.

Figure 4.10 : Message Screen

USERLOG

Department of Computer Science, Christ University

GSM Based Digital Notice Board

26

This form is actually used to record what message the user sends including the date and time of the message being sent The userlog contains the following information: Username: The current user who is logged in. Date: The current date the message being sent. Time: The current time the message being sent. Message: The actual message being sent.

Figure 4.11 : Userlog Screen

4.5 REPORT DESIGN The report is used in this application to print logs according to the specified date. Department of Computer Science, Christ University

GSM Based Digital Notice Board

27

The report contains the following information: Username: The current user. Date: The current date the message being sent. Time: The current time the message being sent. Message: The actual message being sent.

Figure 4.12 : Report Screen

5. IMPLEMENTATION
5.1 SOURCE CODE LOGIN SCREEN Department of Computer Science, Christ University

GSM Based Digital Notice Board

28

Dim attemp As Integer Dim CurrentUser As String Dim clsData As New clsUsers Private Sub cmdCANCEl_Click() Call Exit1 End Sub Private Sub cmdOK_Click() If cbouser.ListIndex = -1 Then MsgBox "Please select your username", vbOKOnly + vbCritical, "LOGIN" ElseIf txtPass.Text = "" Then MsgBox "Please enter your password", vbOKOnly + vbCritical, "LOGIN" ElseIf rs.State = adStateOpen Then rs.Close sql = "select * from login where (login.u) = '" & cbouser.Text & "'" rs.Open sql, conn If txtPass.Text = (rs!p) Then MsgBox "Login Sucessful", vbOKOnly + vbInformation, "LOGIN" MainFrm.Show MainFrm.Label5.Caption = cbouser.Text Unload Me Else MsgBox "Invalid Password", vbOKOnly + vbCritical, "LOGIN" attemp = attemp + 1 Department of Computer Science, Christ University

GSM Based Digital Notice Board

29

txtPass.Text = "" txtPass.SetFocus If attemp = 4 Then Dim aa As String aa = MsgBox("Have You Forgotten Your Password ? ", vbYesNo + vbQuestion, "LOGIN") If aa = vbYes Then Label3.Caption = "Forgot Password" Frame1.Visible = False Frame2.Visible = True Text3.Text = cbouser.Text Call forgot Else MsgBox "You have reached your maximum tries ", vbInformation, "LOGIN" End If End If End If End Sub Private Sub jcbutton1_Click() If rs.State = adStateOpen Then rs.Close sql = "select * from login where (login.u) = '" & Text3.Text & "'" rs.Open sql, conn

Department of Computer Science, Christ University

GSM Based Digital Notice Board

30

If Text1.Text = (rs!a) Then MsgBox "Your password is :" & (rs!p), vbInformation, "LOGIN" Unload Me LoginFrm.Show Else MsgBox "Invalid Answer", vbOKOnly + vbCritical, "LOGIN" Text1.Text = "" Text1.SetFocus End If End Sub MAIN SCREEN Dim dict1 As Dictionary Dim CurrentUser As String Dim clsUserData As New clsUsers Dim clsData As New clsUsers Dim a, c As String Dim clsPrint As New clsPrint Dim msg As String Dim lt As Integer Option Explicit Private Sub cmdclear_Click() Timer5.Enabled = False Department of Computer Science, Christ University

GSM Based Digital Notice Board

31

Timer6.Enabled = False Timer4.Enabled = False TxtMessage.Text = "" TxtMessage.SetFocus End Sub Private Sub cmdExit_Click() Call Exit1 End Sub Private Sub cmdLogin_Click() If MsgBox("Are You Sure You Want To Logout", vbYesNo + vbQuestion, "Logoff") = vbYes Then Unload LoginFrm Unload Me Me.Hide LoginFrm.Show End If End Sub Private Sub cmdSTART_Click() Frame2.Visible = True End Sub Private Sub cmdsend_Click() CurrentUser = Label5.Caption

Department of Computer Science, Christ University

GSM Based Digital Notice Board

32

If optn.Value = True Then MSComm1.Output = "5095" & TxtMessage.Text & "." userlog = clsData.UserLoginTime(CurrentUser, Time(), msg) jcuserlog.Enabled = True ElseIf optb.Value = True Then MSComm1.Output = "5095" & TxtMessage.Text & "." userlog = clsData.UserLoginTime(CurrentUser, Time(), msg) Timer6.Enabled = True jcuserlog.Enabled = True ElseIf optr.Value = True Then Call count1 Text2.Text = Len(TxtMessage.Text) MSComm1.Output = "5095" & TxtMessage.Text & "." userlog = clsData.UserLoginTime(CurrentUser, Time(), msg) Timer5.Enabled = True jcuserlog.Enabled = True Else MsgBox "Select the Type Of Animation Below", vbCritical, "Error" Label10.ForeColor = &HC0& End If End Sub Private Sub DTPicker2_change() Department of Computer Science, Christ University

GSM Based Digital Notice Board

33

clsUserData.DisplayUserLog lstUserLog, DTPicker2.Value End Sub Private Sub Form_Load() MSComm1.CommPort = 1 MSComm1.Settings = "9600,N,8,1" MSComm1.PortOpen = True Lblcalander.Caption = Date FrameAboutUs.Visible = True DTPicker2.Value = Date Label5.Caption = LoginFrm.cbouser.Text MonthView1.Value = Date ShockwaveFlash1.Movie = App.Path & "\FLASHZ\clock147.swf" End Sub Private Sub Form_Unload(Cancel As Integer) MSComm1.PortOpen = False End Sub Private Sub CmdPrint_Click() If lstUserLog.ListItems.Count > 0 Then clsPrint.PrintUserLog DTPicker2.Value Else MsgBox " No data to print.", vbInformation, "Print" End If Department of Computer Science, Christ University

GSM Based Digital Notice Board

34

End Sub Private Sub cmdrefresh_Click() Call jcuserlog_Click End Sub Private Sub jcuserlog_Click() Timer5.Enabled = False Timer4.Enabled = False Timer6.Enabled = False Dim clsUserData As New clsUsers Frameuserlog.Visible = True Framemessage.Visible = False FrameAboutUs.Visible = False DTPicker2.Value = Date clsUserData.DisplayUserLog lstUserLog, DTPicker2.Value End Sub Private Sub optb_Click() Label10.ForeColor = &H0& End Sub Private Sub optn_Click() Label10.ForeColor = &H0& End Sub Private Sub optr_Click() Department of Computer Science, Christ University

GSM Based Digital Notice Board

35

Label10.ForeColor = &H0& End Sub Private Sub Text2_Change() If Text2.Text = 32 Then MsgBox "You Have Reached the Maximum Characters", vbCritical, "Information" End If End Sub Private Sub Timer5_Timer() c = Len(TxtMessage.Text) - 1 a = (Left(TxtMessage.Text, 1)) TxtMessage.Text = Right(TxtMessage.Text, c) + a MSComm1.Output = "5095" & TxtMessage.Text & "." End Sub Private Sub Timer9_Timer() LblClock.Caption = Time End Sub Private Sub TxtMessage_Change() cmdsend.Enabled = True cmdclear.Enabled = True Text2.Text = Len(TxtMessage.Text) End Sub Private Sub Timer1_Timer() Department of Computer Science, Christ University

GSM Based Digital Notice Board

36

lblTitle.Left = lblTitle.Left + 40 If lblTitle.Left = 6600 Then Timer2.Enabled = True Timer1.Enabled = False Timer2.Enabled = True Timer1.Enabled = False If lblTitle.Left = 6600 Then End If lblTitle.Left = lblTitle.Left + 40 If lblTitle.Left = 6600 Then lblTitle.Left = lblTitle.Left + 40 End Sub MODULE Public rs As New ADODB.Recordset Public conn As New ADODB.Connection Public sql As String Public ConString As String Public CurrentUser As String Public LoginSuccess As Boolean Public UserTitle As String Public userlog As Integer Public rAdd As Boolean, rDelete As Boolean, rUpdate As Boolean, rPrint As Boolean Department of Computer Science, Christ University

GSM Based Digital Notice Board

37

Sub Main() ConString = "Provider=MSDAORA.1;Password=tiger;User ID=scott;Persist Security Info=True" conn.Open ConString With rs .CursorLocation = adUseClient .CursorType = adOpenDynamic .LockType = adLockOptimistic End With SplashFrm.Show End Sub Public Sub Exit1() If MsgBox("Are You Sure You Want To Exit", vbYesNo + vbQuestion, "EXIT") = vbYes Then End End Sub Public Sub forgot() If rs.State = adStateOpen Then rs.Close sql = "select q from login where (login.u) = '" & LoginFrm.cbouser.Text & "'" rs.Open sql, conn LoginFrm.Text2.Text = (rs!q) End Sub Function UserLoginTime(username As String, LoginTime As Date, msg As String) As Integer Department of Computer Science, Christ University

GSM Based Digital Notice Board

38

dd = Date msg = MainFrm.TxtMessage.Text If rs.State = adStateOpen Then rs.Close sql = " Select * From Userlog" rs.Open sql, conn With rs .AddNew !username = username !LoginTime = LoginTime !TDate = dd !Message = msg .Update End With LoginTime = rs(2).Value msg = rs(3).Value End Function Sub DisplayUserLog(lstLog As ListView, mDate As Date) Dim lstItem As ListItem, a As Integer If rs.State = adStateOpen Then rs.Close sql = " Select * From Userlog " 'Where (Userlog.TDate)='" & mDate & "' order by (userlog.logintime) ASC" 'sql = " Select * From Userlog Where (Userlog.TDate)='" & mDate & "' order by (userlog.logintime) ASC" Department of Computer Science, Christ University

GSM Based Digital Notice Board

39

rs.Open sql, conn lstLog.ListItems.Clear Do While Not rs.EOF a=a+1 Set lstItem = lstLog.ListItems.Add(, , a, 1, 1) lstItem.SubItems(1) = rs(0).Value lstItem.SubItems(3) = rs(1).Value lstItem.SubItems(2) = rs(2).Value If IsNull(rs(3).Value) Then lstItem.SubItems(4) = "" Else lstItem.SubItems(4) = rs(3).Value End If lstItem.SubItems(3) = rs(1).Value rs.MoveNext Loop End Sub MICROCONTROLLER #include<stdio.h> #include<reg51.h> sfr ldata = 0x0A0; sbit regsel = P2^2; Department of Computer Science, Christ University //P2

GSM Based Digital Notice Board

40

sbit enbl = P2^3; sbit mybit = P2^0; //led

void MSDelay(unsigned int); void LCDCOMMND(unsigned char); void LCDDATA(unsigned char); void sertx(unsigned char); void init(void); void main(void) { unsigned int a1,z=0; unsigned char y; const unsigned char cmd1[10]={0X41,0X54,0X2B,'C','M','G','F','=','1',0X0D}; //AT command to operate in SMS text const unsigned char cmd2[12]= {0X41,0X54,0X2B,'C','M','G','S','=','"','+','9','1'}; //country code const unsigned char cmd4[18]= {0X41,0X54,0X2B,'C','N','M','I','=','1',',','2',',','0',',','0',',','0',0X0D};// new message indication to DTE unsigned char paswd[4] = {'5', '0', '9', '5'}; // password unsigned char msg[32]; //to store the message init(); for(z=0;z<32;z++) {

Department of Computer Science, Christ University

GSM Based Digital Notice Board

41

msg[z] = 0x20; // blank chars(0x20-space) } for(z=0;z<10;z++) { y = cmd1[z]; sertx(y); MSDelay(2); } MSDelay(200); for(z=0;z<12;z++) { y = cmd2[z]; sertx(y); MSDelay(2); } MSDelay(200); for(z=0;z<18;z++) { y = cmd4[z]; sertx(y); MSDelay(2); } Department of Computer Science, Christ University

GSM Based Digital Notice Board

42

regsel = 1;

//For DATA // Clear Command(0x01-soh start of heading)

LCDCOMMND(0x01); MSDelay(20); { while ( RI == 0); y = SBUF; paswd[z] = y; RI = 0; } z=0; while(z<4) { z=z+1; do { while ( RI == 0); y = SBUF; RI = 0; }while(y != '5'); do { while ( RI == 0);

// WAIT FOR MESSAGE

//retrieving byte by byte

Department of Computer Science, Christ University

GSM Based Digital Notice Board

43

y = SBUF; RI = 0; msg[z]= y; z = z +1; a1 = z ; RI = 0; }while(y != '.'); //End of message && ( paswd[2]== '9') && ( paswd[3]== // store no of chars received

if (( paswd[0]== '5') && ( paswd[1]== '0') '5')) { if ( a1 <= 16) { LCDCOMMND(0x01); MSDelay(20); for(z=0;z<(a1 -1);z++) y = msg[z]; LCDDATA(y); } for(z=0;z<32;z++) { msg[z] = 0x20; // blank chars }

// Clear Command(0x01 soh start of heading)

Department of Computer Science, Christ University

GSM Based Digital Notice Board

44

mybit = 1; MSDelay(50); mybit = 0; MSDelay(50); mybit = 1; MSDelay(50); mybit = 0; MSDelay(50); mybit = 1; } else if ( a1 > 16) { LCDCOMMND(0x01); heading) MSDelay(20); for(z=0;z<16;z++) { y = msg[z]; LCDDATA(y); } LCDCOMMND(0x0C0); MSDelay(20); // \f -form feed(page break,next line) // Clear Command (0x01 soh start of

Department of Computer Science, Christ University

GSM Based Digital Notice Board

45

for(z=16;z<(a1-1);z++) { y = msg[z]; LCDDATA(y); } y = 'N'; LCDDATA(y); LCDDATA(y); mybit = 1; MSDelay(50); mybit = 0; MSDelay(50); mybit = 1; MSDelay(50); mybit = 0; MSDelay(50); mybit = 1; } } } void LCDCOMMND(unsigned char value1) { Department of Computer Science, Christ University //lcd pointer commands

GSM Based Digital Notice Board

46

unsigned char value2, value3 = 0; value2=value1; value3=ldata; //copy in value1 //read port2

ldata = ((value2 & 0x0F)|(value3 & 0X0F)); regsel=0; enbl=1; MSDelay(5); enbl=0; MSDelay(20); return; } void LCDDATA(unsigned char value1) { unsigned char value2, value3; value2=value1; value3= ldata; //copy in value1 //read port2 //FOR ISSUING COMMAND

ldata = ((value2 & 0x0F0)|(value3 & 0X0F)); regsel=1; enbl=1; MSDelay(1); enbl=0; MSDelay(2); Department of Computer Science, Christ University //FOR ISSUING DATA

GSM Based Digital Notice Board

47

return; } void sertx(unsigned char x) { SBUF = x; while(TI==0); TI = 0; } void MSDelay(unsigned int itime) { unsigned int i,j; for(i=0;i<itime;i++) for(j=0;j<1275;j++); //idle loop } void init(void) { TMOD = 0x20; //empty TH1 = -3; SCON = 0X50; TR1 = 1; //z=0; regsel = 0; Department of Computer Science, Christ University

GSM Based Digital Notice Board

48

enbl = 0; MSDelay(5); enbl = 1; ldata = 0X28; MSDelay(50); enbl = 0; MSDelay(50); enbl = 1; MSDelay(2); LCDCOMMND(0x01); MSDelay(2); LCDCOMMND(0x06); MSDelay(2); LCDCOMMND(0x0C); MSDelay(2); mybit = 1; MSDelay(10); mybit = 0; MSDelay(10); mybit = 1; MSDelay(10); LCDCOMMND(0x01); // Clear Command //ENABLE DISPLAY/CURSOR //CURSOR MOVE DIRECTION // Clear Display Screen Display on, Cursor off

Department of Computer Science, Christ University

GSM Based Digital Notice Board

49

MSDelay(10); }

6. TESTING
Software testing is a critical element of software quality assurance and represents the ultimate reviews of specification, design and coding. Testing presents an interesting anomaly of the software. During earlier definition and development phases, it was attempted to build software from abstract concept to a tangible implementation. A series of tests were performed for the proposed system before the system was ready for implementation. The various types of testing done on the system are: Unit Testing Integration Testing Validation Testing User Acceptance Testing System Testing

6.1 TEST STRATEGIES UNIT TESTING Unit testing emphasizes the verification effort on the smallest unit of software design i.e. a software component or module. Unit testing is a dynamic method for verification, where program is actually compiled and executed. Unit testing is performed in parallel with the coding phase. Unit testing tests units or modules not the whole software. Each view/module of the application has been tested individually. As the modules were built up testing was carried out simultaneously, tracking out each and every kind of input and checking the corresponding output until module is working correctly. The functionality of the modules was also tested as separate units. Each of the Department of Computer Science, Christ University

GSM Based Digital Notice Board

50

modules was tested as separate units. In each module all the functionalities were tested in isolation.

In the Serial Module Login Screen, the username and password are directly coming from database and the login is successfully performed if the username matches with the appropriate password. In case user tries login more than three times with the wrong password thenthe Forgot Password Screen appears where again the secret question comes from the database and user inputs the answer to that secret question. The corresponding answer is matched with the database and the same is correct then the password is retrieved. The user can then login again with the retrieved password. In the Serial Module Main Screen, it has been tested that the messages being sent to the display are being recorded in the database with the username, date, message time and the message content. In the Wireless Module GSM Modem,it has been tested that the modem is configured correctly with the appropriate country code, message mode and the buffer. In Wireless module Microcontroller, it has been testedthat the device is on serial or wireless mode.After confirming the same it checks for the first four characters of the message and compares with the password and even checks if the message is terminated with a period (.). If the device is set on the serial mode and a message is sent through the mobile then the message is not displayed and the display unit is left with and invalid message. In Wireless Module Display Unit, it has been tested that after the verification process done by the microcontroller and if the conditions are true the correct message is getting displayed otherwise invalid message getting displayed. In this module we even test if the message is appropriately getting displayed in both the lines if the message length is more than 16 characters and if any junk characters are getting displayed. INTEGRATION TESTING Integration testingis a systematic technique for constructing the program structure while at the same time conducting tests to uncover error associated with the interface. All modules are combined in this step. The entire program is tested as whole. Department of Computer Science, Christ University

GSM Based Digital Notice Board

51

VALIDATION TESTING It provides final assurances that software meets all functional, behavioral and performance requirement. Black box testing techniques are used. There are three main components Validation test criteria (no. in place of no. and char in place of char) Configuration review (to ensure the completeness of software configuration.) Alpha and Beta testing-Alpha testing is done at developers site i.e. at home and Beta testing once it is deployed USER ACCEPTANCE TESTING User acceptance testing is the key factor for the success of any system. The system under consideration was tested for users acceptance by constantly keeping in touch with the perspective system user at the time of developing and making changes wherever required. SYSTEM TESTING System testing is performed on the entire system in the context of a Functional Requirement Specification. System testing tests not only the design but also the behavior and even the believed expectations of the customer.

Department of Computer Science, Christ University

GSM Based Digital Notice Board

52

6.2 TEST CASES


Table 6.1: Testing Cases

SI No:

Screen Reference

Description

Expected Result

Actual Result

Passed/ Failed

Remarks

1.

Login

Incomplete user information

Message box indicating empty fields

Message box is displayed when correct entry is done

Passed

Login successful and a next page opens for the user. Wrong ID or password and the user remains on the same page Login successful and a next page opens for the user. Wrong ID or password and the user remains on the same page

Message box is displayed for wrong id or password

Failed

2.

Forgot Password

Incomplete information

Message box indicating empty fields

Message box is displayed when correct entry is done

Passed

Message box is displayed for wrong id or password

Failed

Department of Computer Science, Christ University

GSM Based Digital Notice Board

53

3.

Message

Incomplete Information

Message box indicating empty fields

The message is taken

Passed

The message is displayed on the display unit when the correct entry is done

Message OK is displayed when a correct AT command is passed 4. GSM Modem Configurati on OK Message ERROR is displayed when a correct AT command is passed 5. Microcont roller Input High/Low

Passed

It is successful

Failed

It is not successful

Passed

Displays correct message using VB applicatio n

Serial Displays invalid message

Failed

Wireless

Passed

Displays correct message sent using a mobile

Department of Computer Science, Christ University

GSM Based Digital Notice Board

54

Failed

Displays invalid message

6.3 TEST REPORTS LOGIN SCREEN When the username and password matches with the database then the login is successful and the application proceeds further.

Figure 6.1 : Login Successful Screen

MESSAGE SCREEN When the user enters the text to be send it is checked if the user has used any restricted character. If yes then it displays a message saying This character isnt Permitted else the message is displayed on the display unit.

Department of Computer Science, Christ University

GSM Based Digital Notice Board

55

Figure 6.2 : Error Screen

7. CONCLUSION
By introducing the concept of wireless technology in the field of communication we can make our communication more efficient and faster, with greater efficiency we can display the messages and with less errors and maintenance. This model can be used very efficiently in establishments like chain restaurants wherein the order and special discounts can be displayed at all branches simultaneously, in colleges wherein students and staffs can be informed simultaneously in no time. It can be set up at public transport places like railways, bus station, and airport and also at roadside for traffic control and in emergency situations, it is cost efficient system and very easy to handle. Latency involved in using of papers in displaying of notices is avoided and the information can be updated by the authorized persons. 7.1 LIMITATIONS Volatile memory used for message storage: Messages last only as long as power is on. Parallel Connectivity: Both Serial and wireless cannot function at the same time. Dependent on signal strength: Messages are not transmitted if there is weak network coverage. 7.2 FUTURE ENHANCEMENTS A commercial model can be able to display more than one message at a time.

Department of Computer Science, Christ University

GSM Based Digital Notice Board

56

Alphanumeric LCDs have a limitation on size as well as no of characters. These can be replaced with large LED display boards which are not only eye catching but display characters in a moving fashion one after the other.

In our project we are sending messages via GSM network and displaying on a LCD by utilizing AT commands. The same principle can be applied to control electrical appliances at a distant location.

Department of Computer Science, Christ University

You might also like