33% found this document useful (3 votes)
1K views66 pages

GSM Based LED Scrolling Board

This project report describes a message scrolling board using an Arduino Mega, GSM modem, and other components. The board is designed to display SMS messages on an LED matrix by relaying messages received via the GSM modem. An Arduino board controls the system and interfaces with the GSM modem to receive messages and decode them for display on the LED matrix using shift registers. The full project is submitted to fulfill BTech degree requirements in electronics and communication engineering.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
33% found this document useful (3 votes)
1K views66 pages

GSM Based LED Scrolling Board

This project report describes a message scrolling board using an Arduino Mega, GSM modem, and other components. The board is designed to display SMS messages on an LED matrix by relaying messages received via the GSM modem. An Arduino board controls the system and interfaces with the GSM modem to receive messages and decode them for display on the LED matrix using shift registers. The full project is submitted to fulfill BTech degree requirements in electronics and communication engineering.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 66

Message Scrolling Board based on SMS

Relaying Implemented using Arduino Mega


and GSM Modem
PROJECT REPORT
SUBMITTED IN PARTIAL FULLFILMENT OF THE REQUIREMENT FOR THE
AWARD OF THE DEGREE OF

BACHELOR OF ENGINEERING
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by
Khaja Ebadur Rahman (160712735054)
Bodampati Satish Chandra (160712735055)
Abdus Saboor Asad (160712735056)
Under the Esteemed Guidance of
M.Satish Yadav
Asst. Professor

METHODIST COLLEGE OF ENGINEERING & TECHNOLOGY


KING KOTI, HYDERABAD
2015-2016

1 | Page

CERTIFICATE
This is to certify that the Project report entitled Message Scrolling
Board based on SMS Relaying Implemented using Arduino Mega and GSM Modem is the
work done by
Khaja Ebadur Rahman (160712735054),
Bodampati Satish Chandra (160712735055),
Abdus Saboor Asad (160712735056),
submitted in partial fulfillment for the award of Bachelor of Engineering (B.E) in Electronics
and Communication Engineering, Methodist College of Engineering affiliated to Osmania
University, Hyderabad.

Internal Guide
M. Satish Yadav
Assistant Professor,
Dept. of ECE

Project Coordinator

Head of the department


Dr. N.H. SHOBHA REDDY,
Professor and Head,
Dept. of ECE

External Examiner

Mr.D.VIKRAM MANAHOR
Assistant Professor
Dept. of ECE

2 | Page

ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany the successful completion of any task
would be incomplete without the mentioning of the people whose constant guidance and
encouragement made it possible. We take pleasure in presenting before you, our project, which
is result of studied blend of both research and knowledge.
We would like to express our sincere gratitude and indebtedness to our project
supervisor M.Satish Yadav Asst. Professor for the kind encouragement and constant support
extended in completion of this project work.
We express our earnest gratitude to our internal guide, Assistant Professor
Mr.D.Suresh, Department of ECE, our project guide, for his constant support, encouragement
and guidance. We are grateful for his cooperation and his valuable suggestions.
We would like to express our thanks to our Principal Dr.V.S Giridhar Akula and all
the faculty members, staff of Department of Electronics and Communication Engineering and
friends who rendered valuable help in making this, project a successful one.

3 | Page

DECLARATION

We hereby certify that the work which is being presented in the THESIS ENTITLED
Message Scrolling Board based on SMS Relaying Implemented using Arduino Mega and
GSM Modem by Khaja Ebadur-Rahman, Bodampati Satish Chandra, Abdus Saboor
Asad on partial fulfillment of requirements for the award of degree of B.E. (ECE) submitted in
the Department of Electronics And Communication Engineering at Methodist College of
Engineering & Technology, Hyderabad is an authentic record of our work carried out during
the final year (2015 - 2016) under the supervision of Mr. M.Satish Yadav, Asst. Professor,
Dept of ECE.

The matter presented in the thesis has not been submitted by us/me in any other
university/institute for the award of B.E Degree. No part of the thesis is directly copied from
books/journals/internet but a part of the content could be the already published information.
The report is based on the project work done entirely by us/me and not copied from any other
source

Signatures of the Student(s)

(1) Khaja Ebadur-Rahman (160712735054)

(2) Bodampati Satish Chandra (160712735055)

(3) Abdus Saboor Asad (1607127355056)

4 | Page

TABLE OF CONTENTS
LIST OF FIGURES...................................................................................................................vi
LIST OF TABLES.....................................................................................................................vi
ABSTRACT..............................................................................................................................vii
OVERVIEW OF PROJECT......................................................................................................1
1.1 INTRODUCTION............................................................................................... 1
1.2 AIM OF PROJECT.............................................................................................. 1
1.3 BLOCK DIAGRAM............................................................................................. 2

ARDUINO BOARD WITH ATMEGA328 MICROCONTROLLER...................................3


2.1 Introduction of Arduino Board.........................................................................3
2.2 Characteristics of Arduino board....................................................................3
2.3 Arduino Mega2560.......................................................................................... 5
2.4 Pin configuration of ATmega2560...................................................................6
2.5 Pin Description................................................................................................ 6
2.6 Why Arduino?............................................................................................... 10

GSM TECHNOLOGY.............................................................................................................12
3.1 Introduction.................................................................................................. 12
3.2 Technical Details........................................................................................... 13
3.3 GSM MODEM-PC Interfacing..........................................................................15
3.4 GSM modem (900/1800 MHz).......................................................................16

SHIFT REGISTERS................................................................................................................18
4.1 Introduction.................................................................................................. 18
4.2 Serial-In and Serial-Out (SISO)......................................................................18
4.3 Serial-in, parallel-out (SIPO)..........................................................................19
4.4 Parallel-in, Serial-out (PISO)..........................................................................20
4.5 Uses.............................................................................................................. 21
4.6 History.......................................................................................................... 22
5 | Page

4.7 74HC595 8 bit Shift Register Module for Arduino..........................................22


4.8 Interfacing Of Arduino Mega2560 and 74HC595..........................................25

SD CARD & SD CARD MODULE.........................................................................................26


5.2 ARDUINO SD CARD MODULE........................................................................27
5.2.1 Interfacing SD card with Arduino Board.....................................................29

LIGHT EMITTING DIODES (LEDs)....................................................................................31


6.1 Introduction.................................................................................................. 31
6.2 History.......................................................................................................... 32
6.3 Working Principle.......................................................................................... 33
6.4 Applications.................................................................................................. 34

LED DISPLAYS........................................................................................................................35
7.1 Introduction.................................................................................................. 35
7.2 History.......................................................................................................... 35
7.3 Dot Matrix Display........................................................................................ 36
7.4 LED Matrix Display........................................................................................ 37
7.5 Working of LED Matrix.................................................................................. 38
7.6 ASCII Characters and Their Decoding...........................................................40
7.8 Interfacing SSD with Arduino........................................................................45

SOFTWARE & PROGRAMMING........................................................................................47


8.1 Arduino IDE................................................................................................... 47
8.1 PROGRAMMING............................................................................................. 48
8.1.1 PROGRAM USED FOR GSM MESSAGE SCROLLING BOARD.........................49

6 | Page

LIST OF FIGURES

Fig 1.1: Block Diagram of GSM Led Scrolling Board..............................2


Fig 2.1: Arduino Mega2560...................................................................5
Fig 2.2: Pin diagram of Atmega2560....................................................6
Fig 3.1: Architecture of GSM Network.................................................13
Fig 3.2: GSM Module (900A)...............................................................16
Fig 4.1: SIPO.......................................................................................19
Fig 4.2: 4-Bit PISO Shift Register.........................................................20
Fig 4.3: Shift Register Module.............................................................22
Fig 4.4: 74HC595 Pin Out And Description.........................................24
Fig 4.5: Interfacing Of Arduino and 74HC595.....................................25
Fig 5.1: Arduino SD card Module........................................................27
Fig 5.2: SD Card Module Wiring Block Diagram..................................30
Fig 5.3: SD Card Module Connected to Arduino Board.......................30
Fig 6.1: Different Types Of LEDs.........................................................32
Fig 6.2: Simple LED.............................................................................33
Fig 6.3: Working of LEDs (Band Diagram)..........................................34
Fig 7.1: Simple LED Matrix Display.....................................................38
Fig 7.2: LEDs Connected In Matrix (8x8)............................................38
Fig 7.3: A standard 5x7 LED dot matrix display structure..................39
Fig 7.4: Scanning across the Columns and feeding with appropriate
Row values.........................................................................................40
Fig 7.5: Different Pictures Showing the Preparation of LED Matrix.....44
Fig 7.6: Interfacing of Arduino and LED Matrix...................................46
Fig 7.7: Character A on the 5x7 LED display...................................47
Fig 7.8: Special character < on the 5 X 7display............................47
Fig 8.1: Arduino IDE running on Windows OS.....................................48
Fig 8.2: Power LED (Red) and Integrated LED on Line 13 (Green) on
Arduino Compatible Board.................................................................50

LIST OF TABL
Y

Table 2.1: Arduino Mega 2560 PIN mapping table..............................10


Table 3.1: Basic AT Commands...........................................................17
Table 7.1: Row Values of Each Column for Displaying A...................39
Table 7.2: Table showing ASCII Codes and their Binary Equivalents for
Alphabets...........................................................................................41
7 | Page

ABSTRACT

Message Scrolling Board based on SMS Relaying Implemented using Arduino Mega and
GSM Modem
Every institution, organization or any commercial establishment would be glad to
announce any new event or activity to the public. Or there is a necessity to announce some
important headlines in public. This can be achieved by a person announcing for quite some
time or for convenience LED boards can be installed and the news scrolls on the LED board.
Such boards utilize microcontroller and the message to be displayed is fed to it only once. But
it is devoid of the flexibility of changing the message. Well this can also be achieved if there is
a way to feed the microcontroller with message dynamically.
Hence, this project aims at achieving the above purpose using GSM module which can
feed the message dynamically. There is one particular advantage of using GSM Modem in this
project. Since this involves SMS, the user can display message of choice even he/she is at any
given place.
GSM based Message Relaying and Displaying on LED Board is an automated
microcontroller electronic system which scrolls text on an LED board, the message to be
displayed can be dynamically changed using GSM module to which the user sends an SMS.
When the user sends a text to be displayed via SMS, GSM module receives and
transfers the text to Arduino. The code in Arduino converts each character in the text into a 2
Dimensional array of 1s and 0s. The array size depends on the size of the LED matrix being
used on the LED display board. These 1s and 0s are fed to LED driver circuit, which does its
own unique role.
LED Matrix is an n number of either 8x8 or 5x7 matrices or sometime a single matrix
of 96 columns and 7 rows made of LEDs, which receive data one after the other, i.e., they are
cascaded in series by the LDE driver circuit.
In conclusion, this microcontroller based displaying of text on LED matrices board is
advantageous, not to mention low cost, by providing dynamic yet simple and flexible aid to
institutions, organizations or commercial establishments to display and scroll texts. The scope

8 | Page

of application of this project can be expanded by the choice of the user. Our project is a modest
prototype of integrating GSM and LED scrolling.

9 | Page

CHAPTER 01
OVERVIEW OF PROJECT

1.1 INTRODUCTION
Over the last few years, the GSM cellular phone has grown from a luxury item owned
by the rich to something so common that one out of five people already owns one. This is
amazing when we look at the fact that our country is a developing one with almost half our
population living below the poverty line. This continuously growing popularity of the GSM
cell phone has spurred the growth of the countrys cellular network infrastructure. The primary
reason we can see for this tremendous and unexpected cellular boom is the popularity of the
short message service (SMS). A variety of services have grown around SMS.
The led Display System is aimed at the colleges and universities for displaying day-today information continuously or at regular intervals during the working hours. Being GSMbased system, it offers flexibility to display flash news or announcements faster than the
programmable system. GSM-based display system can also be used at other public places like
schools, hospitals, railway stations, gardens etc. without affecting the surrounding
environment. The led display system mainly consists of a GSM receiver and a display toolkit
which can be programmed from an authorized mobile phone. It receives the SMS, validates the
sending Mobile Identification Number (MIN) and displays the desired information after
necessary code conversion. It can serve Mobile Identification Number (MIN) and displays the
desired information after necessary code conversion It can serve as an electronic notice board
and display the important notices instantaneously thus avoiding latency. Being wireless, the
GSM based led display is easy to expand and allows the user to add more display units at
anytime and at any location in the campus depending on the requirement of the institute.
1.2 AIM OF PROJECT

1 | Page

A text message is typed in the GSM mobile phone and sent it by using SMS service of
the mobile phone to LED moving display boards. A GSM modem is connected to the LED
display hardware is used to receive the SMS and send it to the controller circuit of the LED
display. Then the controller circuit of the LED display filters the message content in SMS and
changes the display text in LED display dynamically. [4]By using this SMS service it is
possible to change the text in the LED display board from anywhere in the country. The idea
described in this paper reduces the total cost that is required in the traditional LED display
boards not only it makes easier to send message to the LED display boards. The system uses a
GSM modem at the display side to receive SMS. An IC ATmega328 belongs to Arduino
microcontroller board act as controller to drive the LED display board. Along with these a
power supply unit and supporting hardware for microcontroller is used.
1.3 BLOCK DIAGRAM
There are mainly four components used for processing & performing the action which
are as follows:

Arduino board with atmega328 microcontroller

GSM Modem
LED Driver Circuit
LED Board

User Cell
Phone

SD card
Module
ARDUINO

GSM
Microcontrolle
Modem
r
Fig 1.1:
Block Diagram of GSM Led Scrolling
Board

LED
Driver
Circuit

LED
Matrix
Display

CHAPTER 02

2 | Page

ARDUINO BOARD WITH ATMEGA328 MICROCONTROLLER

2.1 Introduction of Arduino Board


Arduino is an open-source electronics prototyping platform based on flexible, easy-touse hardware and software. It's intended for artists, designers, hobbyists, and anyone interested
in creating interactive objects or environments. Arduino can sense the environment by
receiving input from a variety of sensors and can affect its surroundings by controlling lights,
motors, and other actuators. The microcontroller on the board is programmed using
the Arduino programming language (based on Wiring) and the Arduino development
environment (based on Processing). Arduino projects can be stand-alone or they can
communicate with software running on a computer (e.g. Flash, Processing, and MaxMSP. It is
a tool for making computers that can sense and control more of the physical world than your
desktop computer. It's an open-source physical computing platform based on a simple
microcontroller board, and a development environment for writing software for the board.
Arduino can be used to develop interactive objects, taking inputs from a variety of switches or
sensors, and controlling a variety of lights, motors, and other physical outputs. Arduino
projects can be stand-alone, or they can be communicated with software running on your
computer (e.g. Flash, Processing, MaxMSP.) The boards can be assembled by hand or
purchased preassembled; the open-source IDE can be downloaded for free. The Arduino
programming language is an implementation of Wiring, a similar physical computing platform,
which is based on the Processing multimedia programming environment.
2.2 Characteristics of Arduino board

a)

Inexpensive

3 | Page

Arduino boards are relatively inexpensive compared to other microcontroller platforms.


The least expensive version of the Arduino module can be assembled by hand, and even

b)

the pre-assembled Arduino modules cost less than $50


Cross-platform
The Arduino software runs on Windows, Macintosh OSX, and Linux operating

c)

systems. Most microcontroller systems are limited to Windows.


Simple, clear programming environment
The Arduino programming environment is easy-to-use for beginners, yet flexible
enough for advanced users to take advantage of as well. For teachers, it's conveniently
based on the Processing programming environment, so students learning to program in

d)

that environment will be familiar with the look and feel of Arduino
Open source and extensible software
The Arduino software and is published as open source tools, available for extension by
experienced programmers. The language can be expanded through C++ libraries, and
people wanting to understand the technical details can make the leap from Arduino to

e)

the AVR C programming language on which it's based.


Open source and extensible hardware
The Arduino is based on Atmel's ATMEGA8 and ATMEGA168microcontrollers. The
plans for the modules are published under a Creative Commons license, so experienced
circuit designers can make their own version of the module, extending it and improving
it.

2.3 Arduino Mega2560


The Mega 2560 is a microcontroller board based on the ATmega2560. It has 54 digital
input/output pins (of which 15 can be used as PWM outputs), 16 analog inputs, 4 UARTs
(hardware serial ports), a 16 MHz crystal oscillator, a USB connection, a power jack, an ICSP
4 | Page

header, and a reset button. It contains everything needed to support the microcontroller; simply
connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to
get started. The Mega 2560 board is compatible with most shields designed for the Uno and the
former boards Duemilanove or Diecimila.
The Mega 2560 is an update to the Arduino Mega, which it replaces.

Fig 2.1: Arduino Mega2560

5 | Page

2.4 Pin configuration of ATmega2560

6 | Page

Fig 2.2: Pin diagram of Atmega2560


2.5 Pin Description
VCC: Digital supply voltage
GND: Ground
Port B (PB7): Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit). The Port B output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs, Port B pins that are externally pulled low will
7 | Page

source current if the pull-up resistors are activated. The Port B pins are tri-stated when a
reset condition becomes active, even if the clock is not running. Depending on the clock
selection fuse settings, PB7 can be used as output from the inverting Oscillator amplifier.
PB6: Depending on the clock selection fuse settings, PB6 can be used as input to the inverting
Oscillator amplifier and input to the internal clock operating circuit.
Port C (PC5): Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit). The output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port C pins that are externally pulled low will source current
if the pull-up resistors are activated. The Port C pins are tri-stated when a reset condition
becomes active, even if the clock is not running.
PC6: PC6 is used as an I/O pin. Note that the electrical characteristics of PC6 differ from
those of the other pins of Port C.; PC6 is used as a Reset input. A low level on this pin for
longer than the minimum pulse length will generate a Reset, even if the clock is not running.
Port D (PD7): Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected
for each bit). The Port D output buffers have symmetrical drive characteristics with both
high sink and source capability. As inputs, Port D pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port D pins are tri-stated when a
reset condition becomes active, even if the clock is not running.
AVcc: AVCC is the supply voltage pin for the A/D Converter. It should be externally
connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to
VCC through a low-pass filter. Note that PC6...4 use digital supply voltage.
AREF: AREF is the analog reference pin for the A/D Converter.

Pin Number
1
2
3
4
5
6
7
8

Pin Name
PG5 ( OC0B )
PE0 ( RXD0/PCINT8 )
PE1 ( TXD0 )
PE2 ( XCK0/AIN0 )
PE3 ( OC3A/AIN1 )
PE4 ( OC3B/INT4 )
PE5 ( OC3C/INT5 )
PE6 ( T3/INT6 )

Mapped Pin Name


Digital pin 4 (PWM)
Digital pin 0 (RX0)
Digital pin 1 (TX0)
Digital pin 5 (PWM)
Digital pin 2 (PWM)
Digital pin 3 (PWM)

8 | Page

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

PE7 ( CLKO/ICP3/INT7 )
VCC
GND
PH0 ( RXD2 )
PH1 ( TXD2 )
PH2 ( XCK2 )
PH3 ( OC4A )
PH4 ( OC4B )
PH5 ( OC4C )
PH6 ( OC2B )
PB0 ( SS/PCINT0 )
PB1 ( SCK/PCINT1 )
PB2 ( MOSI/PCINT2 )
PB3 ( MISO/PCINT3 )
PB4 ( OC2A/PCINT4 )
PB5 ( OC1A/PCINT5 )
PB6 ( OC1B/PCINT6 )
PB7 ( OC0A/OC1C/PCINT7 )
PH7 ( T4 )
PG3 ( TOSC2 )
PG4 ( TOSC1 )
RESET
VCC
GND
XTAL2
XTAL1
PL0 ( ICP4 )
PL1 ( ICP5 )
PL2 ( T5 )
PL3 ( OC5A )
PL4 ( OC5B )
PL5 ( OC5C )
PL6
PL7
PD0 ( SCL/INT0 )
PD1 ( SDA/INT1 )
PD2 ( RXDI/INT2 )
PD3 ( TXD1/INT3 )
PD4 ( ICP1 )
PD5 ( XCK1 )
PD6 ( T1 )
PD7 ( T0 )
PG0 ( WR )

VCC
GND
Digital pin 17 (RX2)
Digital pin 16 (TX2)
Digital pin 6 (PWM)
Digital pin 7 (PWM)
Digital pin 8 (PWM)
Digital pin 9 (PWM)
Digital pin 53 (SS)
Digital pin 52 (SCK)
Digital pin 51 (MOSI)
Digital pin 50 (MISO)
Digital pin 10 (PWM)
Digital pin 11 (PWM)
Digital pin 12 (PWM)
Digital pin 13 (PWM)

RESET
VCC
GND
XTAL2
XTAL1
Digital pin 49
Digital pin 48
Digital pin 47
Digital pin 46 (PWM)
Digital pin 45 (PWM)
Digital pin 44 (PWM)
Digital pin 43
Digital pin 42
Digital pin 21 (SCL)
Digital pin 20 (SDA)
Digital pin 19 (RX1)
Digital pin 18 (TX1)

Digital pin 38
Digital pin 41
9 | Page

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94

PG1 ( RD )
PC0 ( A8 )
PC1 ( A9 )
PC2 ( A10 )
PC3 ( A11 )
PC4 ( A12 )
PC5 ( A13 )
PC6 ( A14 )
PC7 ( A15 )
VCC
GND
PJ0 ( RXD3/PCINT9 )
PJ1 ( TXD3/PCINT10 )
PJ2 ( XCK3/PCINT11 )
PJ3 ( PCINT12 )
PJ4 ( PCINT13 )
PJ5 ( PCINT14 )
PJ6 ( PCINT 15 )
PG2 ( ALE )
PA7 ( AD7 )
PA6 ( AD6 )
PA5 ( AD5 )
PA4 ( AD4 )
PA3 ( AD3 )
PA2 ( AD2 )
PA1 ( AD1 )
PA0 ( AD0 )
PJ7
VCC
GND
PK7 ( ADC15/PCINT23 )
PK6 ( ADC14/PCINT22 )
PK5 ( ADC13/PCINT21 )
PK4 ( ADC12/PCINT20 )
PK3 ( ADC11/PCINT19 )
PK2 ( ADC10/PCINT18 )
PK1 ( ADC9/PCINT17 )
PK0 ( ADC8/PCINT16 )
PF7 ( ADC7 )
PF6 ( ADC6 )
PF5 ( ADC5/TMS )
PF4 ( ADC4/TMK )
PF3 ( ADC3 )

Digital pin 40
Digital pin 37
Digital pin 36
Digital pin 35
Digital pin 34
Digital pin 33
Digital pin 32
Digital pin 31
Digital pin 30
VCC
GND
Digital pin 15 (RX3)
Digital pin 14 (TX3)

Digital pin 39
Digital pin 29
Digital pin 28
Digital pin 27
Digital pin 26
Digital pin 25
Digital pin 24
Digital pin 23
Digital pin 22
VCC
GND
Analog pin 15
Analog pin 14
Analog pin 13
Analog pin 12
Analog pin 11
Analog pin 10
Analog pin 9
Analog pin 8
Analog pin 7
Analog pin 6
Analog pin 5
Analog pin 4
Analog pin 3
10 | P a g e

95
96
97
98
99
100

PF2 ( ADC2 )
PF1 ( ADC1 )
PF0 ( ADC0 )
AREF
GND
AVCC

Analog pin 2
Analog pin 1
Analog pin 0
Analog Reference
GND
VCC

Table 2.1: Arduino Mega 2560 PIN mapping table


2.6 Why Arduino?
Thanks to its simple and accessible user experience, Arduino has been used in
thousands of different projects and applications. The Arduino software is easy-to-use for
beginners, yet flexible enough for advanced users. It runs on Mac, Windows, and Linux.
Teachers and students use it to build low cost scientific instruments, to prove chemistry and
physics principles, or to get started with programming and robotics. Designers and architects
build interactive prototypes, musicians and artists use it for installations and to experiment
with new musical instruments. Makers, of course, use it to build many of the projects exhibited
at the Maker Faire, for example. Arduino is a key tool to learn new things. Anyone - children,
hobbyists, artists, programmers - can start tinkering just following the step by step instructions
of a kit, or sharing ideas online with other members of the Arduino community.
There are many other microcontrollers and microcontroller platforms available for physical
computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handy board, and many
others offer similar functionality. All of these tools take the messy details of microcontroller
programming and wrap it up in an easy-to-use package. Arduino also simplifies the process of
working with microcontrollers, but it offers some advantage for teachers, students, and
interested amateurs over other systems:
Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller
platforms. The least expensive version of the Arduino module can be assembled by hand, and
even the pre-assembled Arduino modules cost less than $50
Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and Linux
operating systems. Most microcontroller systems are limited to Windows.

11 | P a g e

Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for
beginners, yet flexible enough for advanced users to take advantage of as well. For teachers,
it's conveniently based on the Processing programming environment, so students learning to
program in that environment will be familiar with how the Arduino IDE works.
Open source and extensible software - The Arduino software is published as open source
tools, available for extension by experienced programmers. The language can be expanded
through C++ libraries, and people wanting to understand the technical details can make the
leap from Arduino to the AVR C programming language on which it's based. Similarly, you can
add AVR-C code directly into your Arduino programs if you want to.
Open source and extensible hardware - The plans of the Arduino boards are published under
a Creative Commons license, so experienced circuit designers can make their own version of
the module, extending it and improving it. Even relatively inexperienced users can build
the breadboard version of the module in order to understand how it works and save money.

CHAPTER 03
GSM TECHNOLOGY

3.1 Introduction
GSM (Global System for Mobile Communications, originally Groupe Spcial Mobile),
is a standard developed by the European Telecommunications Standards Institute (ETSI) to
describe the protocols for second-generation (2G) digital cellular networks used by mobile
phones, first deployed in Finland in July 1991. As of 2014 it has become the default global

12 | P a g e

standard for mobile communications - with over 90% market share, operating in over 219
countries and territories.
2G networks developed as a replacement for first generation (1G) analog cellular networks,
and the GSM standard originally described a digital, circuit-switched network optimized
for full duplex voice telephony. This expanded over time to include data communications, first
by circuit-switched transport, then by packet data transport via GPRS (General Packet Radio
Services) and EDGE (Enhanced Data rates for GSM Evolution or EGPRS).
Subsequently, the 3GPP developed third-generation (3G) UMTS standards followed by fourthgeneration (4G) LTE Advanced standards, which do not form part of the ETSI GSM
standard."GSM" is a trademark owned by the GSM Association. It may also refer to the
(initially)mos common voice codec used, Full Rate.

3.2 Technical Details

Fig 3.1: Architecture of GSM Network


A. Network structure

The network is structured into a number of discrete sections:


13 | P a g e

Base Station Subsystem the base stations and their controllers explained
Network and Switching Subsystem the part of the network most similar to a fixed network,
sometimes just called the "core network"
GPRS Core Network the optional part which allows packet-based Internet connections
Operations support system (OSS) network maintenance
B. Base Station Subsystem
GSM is a cellular network, which means that cell phones connect to it by searching for
cells in the immediate vicinity. There are five different cell sizes in a GSM network
macro, micro, pico, femto, and umbrella cells. The coverage area of each cell varies according
to the implementation environment. Macro cells can be regarded as cells where the base
station antenna is installed on a mast or a building above average rooftop level. Micro cells are
cells whose antenna height is under average rooftop level; they are typically used in urban
areas. Picocells are small cells whose coverage diameter is a few dozen metres; they are mainly
used indoors. Femtocells are cells designed for use in residential or small business
environments and connect to the service providers network via a broadband internet
connection. Umbrella cells are used to cover shadowed regions of smaller cells and fill in gaps
in coverage between those cells.
Cell horizontal radius varies depending on antenna height, antenna gain, and
propagation conditions from a couple of hundred meters to several tens of kilometres. The
longest distance the GSM specification supports in practical use is 35 kilometres (22 mi).
There are also several implementations of the concept of an extended cell where the cell radius
could be double or even more, depending on the antenna system, the type of terrain, and
the timing advance.
Indoor coverage is also supported by GSM and may be achieved by using an indoor
picocell base station, or an indoor repeater with distributed indoor antennas fed through power
splitters, to deliver the radio signals from an antenna outdoors to the separate indoor distributed
antenna system. These are typically deployed when significant call capacity is needed indoors,
like in shopping centers or airports. However, this is not a prerequisite, since indoor coverage
is also provided by in-building penetration of the radio signals from any nearby cell.
C. GSM carrier frequencies

14 | P a g e

GSM networks operate in a number of different carrier frequency ranges (separated


into GSM frequency ranges for 2G and UMTS frequency bands for 3G), with most 2G GSM
networks operating in the 900 MHz or 1800 MHz bands. Where these bands were already
allocated, the 850 MHz and 1900 MHz bands were used instead (for example in Canada and
the United States). In rare cases the 400 and 450 MHz frequency bands are assigned in some
countries because they were previously used for first-generation systems.
Most 3G networks in Europe operate in the 2100 MHz frequency band. For more
information on worldwide GSM frequency usage, see GSM frequency bands.
Regardless of the frequency selected by an operator, it is divided into timeslots for individual
phones. This allows eight full-rate or sixteen half-rate speech channels per radio frequency.
These eight radio timeslots (or burst periods) are grouped into a TDMA frame. Half-rate
channels use alternate frames in the same timeslot. The channel data rate for all 8
channels is270.833 kbit/s, and the frame duration is 4.615 ms. The transmission power in the
handset is limited to a maximum of 2 watts in GSM 850/900 and 1 watt in GSM 1800/1900.
D. Subscriber Identity Module (SIM)
One of the key features of GSM is the Subscriber Identity Module, commonly known
as a SIM card. The SIM is a detachable smart card containing the user's subscription
information and phone book. This allows the user to retain his or her information after
switching handsets. Alternatively, the user can also change operators while retaining the
handset simply by changing the SIM. Some operators will block this by allowing the phone to
use only a single SIM, or only a SIM issued by them; this practice is known as SIM locking.
3.3 GSM MODEM-PC Interfacing
GSM Modem is used to receive message from the authorized user. This GSM modem
requires a SIM card from a wireless carrier in order to operate. This SIM number is contact
number of the receiving section.
PCs use AT commands to control modems. Although GSM modem is interfaced with PC
through Bluetooth using a VB program, a GSM modem can be tested before actually
15 | P a g e

implementing into the system. The MS HyperTerminal is a handy tool when it comes to testing
the GSM device. It can be found at Start -> Programs ->Accessories ->Communications ->
HyperTerminal. Various parameters like connection name, icon, com port, and correct port
settings are specified for our GSM modem. Finally in the hyper terminal main window, AT
commands are sent and responds received from GSM modem can be seen.
We will first have to type AT A response "OK" should be returned from the mobile
phone or GSM modem. Now we will type "AT+CPIN?". The AT command AT+CPIN?" is used
to query whether the mobile phone or GSM modem is waiting for a PIN (personal
identification number, i.e. password). If the response is "+CPIN: READY", it means the SIM
card is ready for use. After this, various AT commands depending on the used modems
instruction set are send to modem and responses are received. This process is very useful in
testing GSM modems.
3.4 GSM modem (900/1800 MHz)
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 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.

16 | P a g e

Fig 3.2: GSM Module (900A)


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:

Table 3.1: Basic AT Commands

17 | P a g e

CHAPTER 04
SHIFT REGISTERS

4.1 Introduction
In digital circuits, a shift register is a cascade of flip flops, sharing the same clock, in
which the output of each flip-flop is connected to the "data" input of the next flip-flop in the
chain, resulting in a circuit that shifts by one position the "bit array" stored in it, shifting in the
data present at its input and shifting out the last bit in the array, at each transition of the clock
input.
More generally, a shift register may be multidimensional, such that its "data in" and stage
outputs are themselves bit arrays: this is implemented simply by running several shift registers
of the same bit-length in parallel.
Shift registers can have both parallel and serial inputs and outputs. These are often configured
as 'serial-in, parallel-out' (SIPO) or as 'parallel-in, serial-out' (PISO). There are also types that
have both serial and parallel input and types with serial and parallel output. There are also
'bidirectional' shift registers which allow shifting in both directions: LR or RL. The serial
input and last output of a shift register can also be connected to create a 'circular shift register'.
4.2 Serial-In and Serial-Out (SISO)

18 | P a g e

These are the simplest kind of shift registers. The data string is presented at 'Data In',
and is shifted right one stage each time 'Data Advance' is brought high. At each advance, the bit
on the far left (i.e. 'Data In') is shifted into the first flip-flop's output. The bit on the far right
(i.e. 'Data Out') is shifted out and lost.
The data are stored after each flip-flop on the 'Q' output, so there are four storage 'slots'
available in this arrangement, hence it is a 4-bit Register. To give an idea of the shifting
pattern, imagine that the register holds 0000 (so all storage slots are empty). As 'Data In'
presents 1,0,1,1,0,0,0,0 (in that order, with a pulse at 'Data Advance' each timethis is called
clocking or strobing) to the register, this is the result. The left hand column corresponds to the
left-most flip-flop's output pin, and so on.
So the serial output of the entire register is 10110000. It can be seen that if data were to be
continued to input, it would get exactly what was put in, but offset by four 'Data Advance'
cycles. This arrangement is the hardware equivalent of a queue. Also, at any time, the whole
register can be set to zero by bringing the reset (R) pins high.
This arrangement performs destructive readout - each datum is lost once it has been shifted out
of the right-most bit.
4.3 Serial-in, parallel-out (SIPO)

Fig 4.1: SIPO


This configuration allows conversion from serial to parallel format. Data is input
serially, as described in the SISO section above. Once the data has been clocked in, it may be
either read off at each output simultaneously, or it can be shifted out
In this configuration, each flip-flop is edge triggered. The initial flip-flop operates at the given
clock frequency. Each subsequent flip-flop halves the frequency of its predecessor, which
19 | P a g e

doubles its duty cycle. As a result, it takes twice as long for the rising/falling edge to trigger
each subsequent flip-flop; this staggers the serial input in the time domain, leading to parallel
output.
In cases where the parallel outputs should not change during the serial loading process, it is
desirable to use a latched or buffered output. In a latched shift register (such as the 74595) the
serial data is first loaded into an internal buffer register, then upon receipt of a load signal the
state of the buffer register is copied into a set of output registers. In general, the practical
application of the serial-in/parallel-out shift register is to convert data from serial format on a
single wire to parallel format on multiple wires.
4.4 Parallel-in, Serial-out (PISO)
This configuration has the data input on lines D1 through D4 in parallel format, being
D1 the MSB. To write the data to the register, the Write/Shift control line must be held LOW.
To shift the data, the W/S control line is brought HIGH and the registers are clocked. The
arrangement now acts as a SISO shift register, with D1 as the Data Input. However, as long as
the number of clock cycles is not more than the length of the data-string, the Data Output, Q,
will be the parallel data read off in order.

Fig 4.2: 4-Bit PISO Shift Register


The animation below shows the write/shift sequence, including the internal state of the shift
register.

20 | P a g e

4.5 Uses
One of the most common uses of a shift register is to convert between serial and
parallel interfaces. This is useful as many circuits work on groups of bits in parallel, but serial
interfaces are simpler to construct. Shift registers can be used as simple delay circuits. Several
bidirectional shift registers could also be connected in parallel for a hardware implementation
of a stack.
SIPO registers are commonly attached to the output of microprocessors when
more General Purpose Input/Output pins are required than are available. This allows several
binary devices to be controlled using only two or three pins, but slower than parallel I/O - the
devices in question are attached to the parallel outputs of the shift register, then the desired
state of all those devices can be sent out of the microprocessor using a single serial connection.
Similarly, PISO configurations are commonly used to add more binary inputs to a
microprocessor than are available - each binary input (i.e. a button or more complicated
circuitry) is attached to a parallel input of the shift register, then the data is sent back via serial
to the microprocessor using several fewer lines than originally required.
Shift registers can also be used as pulse extenders. Compared to monostable
multivibrators, the timing has no dependency on component values, however it requires
external clock and the timing accuracy is limited by a granularity of this clock. In early
computers, shift registers were used to handle data processing: two numbers to be added were
stored in two shift registers and clocked out into an arithmetic and logic unit (ALU) with the
result being fed back to the input of one of the shift registers (the accumulator) which was one
21 | P a g e

bit longer since binary addition can only result in an answer that is the same size or one bit
longer.
Many computer languages include instructions to 'shift right' and 'shift left' the data in a
register, effectively dividing by two or multiplying by two for each place shifted.
Very large serial-in serial-out shift registers (thousands of bits in size) were used in a similar
manner to the earlier delay line memory in some devices built in the early 1970s. Such
memories

were

sometimes

called circulating

memory.

For

example,

the Datapoint

3300 terminal stored its display of 25 rows of 72 columns of upper-case characters using fiftyfour 200-bit shift registers, arranged in six tracks of nine packs each, providing storage for
1800 six-bit characters. The shift register design meant that scrolling the terminal display could
be accomplished by simply pausing the display output to skip one line of characters.
4.6 History
One of the first known examples of a shift register was in the Colossus, a codebreaking

machine

built

in

1943.

It

was

five-stage

device

built

of vacuum

tubes and thyratrons. A shift register was also used in the IAS machine, built by John von
Neumann and others at the Institute for Advanced Study in the late 1940s.
4.7 74HC595 8 bit Shift Register Module for Arduino

Fig 4.3: Shift Register Module


A. General Description

22 | P a g e

This is a breakout board for 74HC595 8 bit Shift Register. The 74HCT595 are highspeed Si-gate CMOS devices and are pin compatible with Low-power Schottky TTL (LSTTL).
They are specified in compliance with JEDEC standard No. 7A.The 74HC595; 74HCT595 are
8-stage serial shift registers with a storage register and 3-state outputs. The registers have
separate clocks.Data is shifted on the positive-going transitions of the shift register clock input
(SHCP). The data in each register is transferred to the storage register on a positive-going
transition of the storage register clock input (STCP). If both clocks are connected together, the
shift register will always be one clock pulse ahead of the storage register.The shift register has
a serial input (DS) and a serial standard output (Q7S) for cascading. It is also provided with
asynchronous reset (active LOW) for all 8 shift register stages. The storage register has 8
parallel 3-state bus driver outputs. Data in the storage register appears at the output whenever
the output enable input (OE) is LOW.
B. Features and benefits
8-bit serial input
8-bit serial or parallel output
Storage register with 3-state outputs
Shift register with direct clear
100 MHz (typical) shift out frequency
ESD protection:
HBM JESD22-A114F exceeds 2 000 V
MM JESD22-A115-A exceeds 200 V
Multiple package options
C. Applications
Serial-to-parallel data conversion
Remote control holding register

D. Pinning information
23 | P a g e

Fig 4.4: 74HC595 Pin Out And Description

4.8 Interfacing Of Arduino Mega2560 and 74HC595

24 | P a g e

Fig 4.5: Interfacing Of Arduino and 74HC595

CHAPTER 05
SD CARD & SD CARD MODULE
5.1 Introduction to SD cards
Secure Digital (SD) is a non-volatile memory card format developed by the SD Card
Association (SDA) for use in portable devices. The standard was introduced in August 1999 by

25 | P a g e

joint efforts between SanDisk, Panasonic (Matsushita Electric) and Toshiba as an improvement
over Multi Media Cards(MMC),and has become the de facto industry standard.
The three companies formed SD-3C, LLC, a company that licenses and enforces intellectual
property rights associated with SD memory cards and SD host and ancillary products. The
companies also formed the SD Association in January 2000 to promote SD Card
standards. The SD Association is a non-profit organization that sets memory card standards
intended to simplify the use and optimize the performance of consumer electronics products.
SDA today has about 1,000 member companies.
Secure Digital includes four card families available in three different form factors. The four
families are the original Standard-Capacity (SDSC), the High-Capacity (SDHC), the
eXtended-Capacity (SDXC), and the SDIO, which combines input/output functions with data
storage. The three form factors are the original size, the mini size, and the micro size.
Electrically passive adapters allow a smaller card to fit and function in a device built for a
larger card. The SD card's small footprint is an ideal storage medium for smaller, thinner and
more portable electronic devices.
There are many combinations of form factors and device families, although as of 2013, the
prevailing formats are full- or micro-size SDHC and full or micro SDXC
The SDA uses several trademarked logos owned and licensed by SD-3C, LLC to enforce
compliance with its specifications and assure users of compatibility.
5.2 ARDUINO SD CARD MODULE

26 | P a g e

Fig 5.1: Arduino SD card Module


The Arduino SD Card Shield is a simple solution for transferring data to and from a
standard SD card. The pinout is directly compatible with Arduino, but can also be used with
other microcontrollers. It allows you to add mass storage and data logging to your project.
Features

Break out board for standard SD card.

Contains a switch to select the flash card slot

Sits directly on a Arduino

Also be used with other microcontrollers


Overview
SD Cards work only at 3.3V and both the power and I/O levels must be
accommodated. The module shown here uses FETs for level shifting and a 3.3V regulator for
power when operating from 5.0V . A switch allows the module to be used with Arduinos /
Yourduino Robo1 or Minis etc. running at 3.3V. We have tested the YourDuinoRobo1 with it's
power jumper set to 3.3V and the SD card module set at 3.3V and it works well.
This module also has a MicroSD socket on the back side, and we have tested 2Gb and 4Gb
MicroSD cards plugged in there. They worked OK with the SdFAT library. These cards are
formatted FAT32 and SD/HC
The communication between the microcontroller and the SD card uses SPI, which takes
place on digital pins 11, 12, and 13 (on most Arduino boards) or 50, 51, and 52 (Arduino
Mega). Additionally, another pin must be used to select the SD card. This can be the hardware
SS pin - pin 10 (on most Arduino boards) or pin 53 (on the Mega) - or another pin specified in
the call to SD.begin()
Formatting/Preparing the card
(NB : whenever referring to the SD card, it means SD and microSD sizes, as well as SD
and SDHD formats)
Most SD cards work right out of the box, but it's possible you have one that was used in
a computer or camera and it cannot be read by the SD library. Formatting the card will create a
file system that the Arduino can read and write to.
It's not desirable to format SD cards frequently, as it shortens their life span.

27 | P a g e

Youll need a SD reader and computer to format your card. The library supports
the FAT16 and FAT32 file systems, but useFAT16 when possible. The process to format is
fairly straightforward.
Windows: right click on your cards directory and choose Format from the drop
down. Make sure you choose FAT as the file system.
OSX : Open Disk Utility (located in Applications>Utilities). Choose the Card, click on
the erase tab, select MS-DOS(FAT) as the Format, and click Erase. NB: OSX places a number
of hidden files on the device when it formats a drive. To format a SD car without the extra
files on OSX, follow these notes on Ladyadas site.
Linux: With a SD card inserted, open a terminal window. At the prompt, type df, and
press enter. The windows will report the device name of your SD card, it should look
something like /dev/sdb1. Unmount the SD card, but leave it in the computer. Type sudo
mkdosfs -F 16 /dev/sdb1, replacing the device name with yours. Remove the SD card and
replace it to verify it works.
File Naming
FAT file systems have a limitation when it comes to naming conventions. You must use
the 8.3 format, so that file names look like NAME001.EXT, where NAME001 is an 8
character or fewer string, and EXT is a 3 character extension. People commonly use the
extensions .TXT and .LOG. It is possible to have a shorter file name (for example, mydata.txt,
or time.log), but you cannot use longer file names.
Opening/Closing files
When you use file.write(), it doesn't write to the card until you flush() or close().
Whenever you open a file, be sure to close it to save your data.
As of version 1.0, it is possible to have multiple files open
5.2.1 Interfacing SD card with Arduino Board

28 | P a g e

Fig 5.2: SD Card Module Wiring Block Diagram

Fig 5.3: SD Card Module Connected to Arduino Board


The Arduino shows the following pin names:
*SPI:
10 (SS) "Slave Select"
11 (MOSI) "Master Out Slave In"
12 (MISO) "Master In Slave Out"
29 | P a g e

13 (SCK) "System Clock"

To clarify this: to connect this module you must connect:


(Arduino Pin) - Module Pin
10 (SS) to CS
11 (MOSI) to DI
12 (MISO) to DO
13 (SCK) to CLK
and G to GND and + to 5V

CHAPTER 06
LIGHT EMITTING DIODES (LEDs)

6.1 Introduction
A Light Emitting Diode (LED) is a two-lead semiconductor light source. It is a pn
junction diode, which emits light when activated. When a suitable voltage is applied to the
leads, electrons are able to recombine with electron holes within the device, releasing energy in
the form of photons. This effect is called electroluminescence, and the color of the light
(corresponding to the energy of the photon) is determined by the energy band gap of the
semiconductor.
An LED is often small in area (less than 1 mm2) and integrated optical components may
be used to shape its radiation pattern.
Appearing as practical electronic components in 1962, the earliest LEDs emitted lowintensity infrared light. Infrared LEDs are still frequently used as transmitting elements in
remote-control circuits, such as those in remote controls for a wide variety of consumer
electronics. The first visible-light LEDs were also of low intensity, and limited to red. Modern
30 | P a g e

LEDs are available across the visible, ultraviolet, and infrared wavelengths, with very high
brightness.
Early LEDs were often used as indicator lamps for electronic devices, replacing small
incandescent bulbs. They were soon packaged into numeric readouts in the form of sevensegment displays, and were commonly seen in digital clocks.
Recent developments in LEDs permit them to be used in environmental and task
lighting. LEDs have many advantages over incandescent light sources including lower energy
consumption, longer lifetime, improved physical robustness, smaller size, and faster switching.
Light-emitting diodes are now used in applications as diverse as aviation lighting, automotive
headlamps, advertising, general lighting, traffic signals, camera flashes and even LED
wallpaper. As of 2015, LEDs powerful enough for room lighting remain somewhat more
expensive, and require more precise current and heat management, than compact fluorescent
lamp sources of comparable output. LEDs have allowed new text, video displays, and sensors
to be developed, while their high switching rates are also useful in advanced communications
technology.

Fig 6.1: Different Types Of LEDs

Fig 6.2: Simple LED


6.2 History

31 | P a g e

Electroluminescence as a phenomenon was discovered in 1907 by the British


experimenter H. J. Round of Marconi Labs, using a crystal of silicon carbide and acat'swhisker detector. Soviet inventor Oleg Losev reported creation of the first LED in 1927. His
research was distributed in Soviet, German and British scientific journals, but no practical use
was made of the discovery for several decades. Kurt Lehovec, Carl Accardo and Edward
Jamgochian, explained these first light-emitting diodes in 1951 using an apparatus
employing SiC crystals with a current source of battery or pulse generator and with a
comparison to a variant, pure, crystal in 1953.
Rubin Braunstein of the Radio Corporation of America reported on infrared emission
from gallium arsenide (GaAs) and other semiconductor alloys in 1955.Braunstein observed
infrared emission generated by simple diode structures using gallium antimonide (GaSb),
GaAs, indium phosphide (InP), and silicon-germanium (SiGe) alloys at room temperature and
at 77 kelvins.
In 1957, Braunstein further demonstrated that the rudimentary devices could be used
for non-radio communication across a short distance. As noted by Kroemer Braunstein had
set up a simple optical communications link: Music emerging from a record player was used
via suitable electronics to modulate the forward current of a GaAs diode. The emitted light was
detected by a PbS diode some distance away. This signal was fed into an audio amplifier, and
played back by a loudspeaker. Intercepting the beam stopped the music. We had a great deal of
fun playing with this setup." This setup presaged the use of LEDs for optical communication
applications.
6.3 Working Principle

32 | P a g e

Fig 6.3: Working of LEDs (Band Diagram)


A P-N junction can convert the absorbed light energy into its proportional electric
current. The same process is reversed here (i.e. the P-N junction emits light when electrical
energy is applied on it). This phenomenon is generally called electroluminescence, which can
be defined as the emission of light from a semi-conductor under the influence of an electric
field. The charge carriers recombine in a forward P-N junction as the electrons cross from the
N-region and recombine with the holes existing in the P-region. Free electrons are in
the conduction band of energy levels, while holes are in the valence energy band. Thus the
energy level of the holes will be lesser than the energy levels of the electrons. Some part of the
energy must be dissipated in order to recombine the electrons and the holes. This energy is
emitted in the form of heat and light.
The electrons dissipate energy in the form of heat for silicon and germanium diodes but
in gallium arsenide phosphide (GaAsP) and gallium phosphide (GaP) semiconductors, the
electrons dissipate energy by emitting photons. If the semiconductor is translucent, the junction
becomes the source of light as it is emitted, thus becoming a light-emitting diode, but when the
junction is reverse biased no light will be produced by the LED and, on the contrary, the device
may also get damaged.
6.4 Applications

33 | P a g e

LED uses fall into four major categories:


1. Visual signals where light goes more or less directly from the source to the human eye, to
convey a message or meaning.
2. Illumination where light is reflected from objects to give visual response of these objects.
3. Measuring and interacting with processes involving no human vision.
4. Narrow band light sensors where LEDs operate in a reverse-bias mode and respond to
incident light, instead of emitting light.

CHAPTER 07
LED DISPLAYS

7.1 Introduction
An LED display is a flat panel display, which uses an array of light-emitting diodes
as pixels for a video display. Their brightness allows them to be used outdoors in
store signs and billboards, and in recent years they have also become commonly used
in destination signs on public transport vehicles. LED displays are capable of providing
general illumination in addition to visual display, as when used for stage lighting or other
decorative (as opposed to informational) purposes.
7.2 History
The first true all-LED flat panel television screen was possibly developed,
demonstrated and documented by James P. Mitchell in 1977. The modular, scalable display
was initially designed with hundreds of MV50 LEDs and a newly available transistor-transistor
logic memory addressing circuit from Texas Instruments. The -inch thin flat panel prototype
and the scientific paper were displayed at the 29th ISEF expo in Washington D.C. in May
1978. It received awards by NASA and General Motors Corporation. A liquid crystal
34 | P a g e

display (LCD) matrix design was also cited in the LED paper as an alternative x-y scan
technology and as a future alternate television display method. Additional recognition was
provided by Westinghouse Educational Foundation "Honors Group" and the concept prototype
was also a selected scientific paper at the Iowa Academy of Science of the University of
Northern Iowa. The replacement of the 70 year+ high-voltage analog system (cathode-ray
tube technology) with a digital x-y scan system has been a significant achievement.
Displacement of the electromagnetic scan systems included the removal of inductive
deflection, electron beam and color convergence circuits. The digital x-y scan system has
helped the modern television to collapse into its current thin form factor.
The 1977 model was monochromatic by design. Efficient blue LEDs did not arrive for
another decade. Large displays now use high-brightness diodes to generate a wide spectrum of
colors. It took three decades and organic light-emitting diodes for Sony to introduce an OLED
TV, the Sony XEL-1 OLED screen which was marketed in 2009. Later, at CES 2012, Sony
presented Crystal LED, a TV with a true LED-display (in which LEDs are used to produce
actual images rather than acting as backlighting for other types of display, as in LED-backlit
LCD displays which are commonly marketed as LED TVs), though no such models have
entered mass production.
The largest manufacturer of wall LED screen displays is Shenzhen, China-based
Leyard Optoelectronic.
7.3 Dot Matrix Display
A dot-matrix display is a display device used to display information on machines,
clocks, railway departure indicators and many other devices requiring a simple display device
of limited resolution.
The display consists of a dot matrix of lights or mechanical indicators arranged in a
rectangular configuration (other shapes are also possible, although not common) such that by
switching on or off selected lights, text or graphics can be displayed. A dot matrix controller

35 | P a g e

converts instructions from a processor into signals which turns on or off lights in the matrix so
that the required display is produced.
Usual character resolutions
A common size for a character is 57 pixels, either separated with blank lines with no dots (in
most text-only displays), or with lines of blank pixels (making the real size 6x8). This is seen
on most graphic calculators, such as Casio calculators or TI-82 and superior.
A smaller size is 35 (or 4x6 when separated with blank pixels). This is seen on the TI80 calculator as a "pure", fixed-size 35 font, or on most 75 calculators as a proportional
(15 to 55) font. The disadvantage of the 75 matrix and smaller is that lower case characters
with descenders are not practical. A matrix of 119 is often used to give far superior resolution.
Dot matrix displays of sufficient resolution can be programmed to emulate the
customary seven-segment numeral patterns.
A larger size is 59 pixels, which is used on many Natural Display calculators.
7.4 LED Matrix Display

Fig 7.1: Simple LED Matrix Display


Structure of LED Matrix
In a matrix format LEDs are arranged in rows and columns. You can also think of them as y
and x coordinates. Lets assume we have 44 matrix. Rows would be marked from A to D and
columns from 1 to 4. Now we can address each LED by row and column. Top left led would be
(A,1). Bottom down led would be (D,4).

36 | P a g e

Fig 7.2: LEDs Connected In Matrix (8x8)


Figure above shows the different configurations. The difference between these two
configurations is how you lit a led. With common-row anode current sources (positive voltage)
are attached to rows A..D and currents sinks (negative voltage, ground) to columns 1..4. With
common-row cathode current sinks are attached to rows A..D and currents sources to columns
1..4.
For example. To light bottom down led (D,4) of common cathode matrix you would feed
positive voltage to column 4 and connect row D to ground. For sake of clarity I will using
common-row cathode in examples for the rest of this article.
7.5 Working of LED Matrix
In a dot matrix display, multiple LEDs are wired together in rows and columns. This is
done to minimize the number of pins required to drive them. For example, a 88 matrix of
LEDs (shown below) would need 64 I/O pins, one for each LED pixel. By wiring all the
anodes together in rows (R1 through R8), and cathodes in columns (C1 through C8), the
required number of I/O pins is reduced to 16. Each LED is addressed by its row and column
number. In the figure below, if R4 is pulled high and C3 is pulled low, the LED in fourth row
and third column will be turned on. Characters can be displayed by fast scanning of either rows
or columns.
Suppose, we want to display the alphabet A We will first select the column C1
(which means C1 is pulled low in this case), and deselect other columns by blocking their
ground paths (one way of doing that is by pulling C2 through C5 pins to logic high). Now, the
first column is active, and you need to turn on the LEDs in the rows R2 through R7 of this
column, which can be done by applying forward bias voltages to these rows. Next, select the
column C2 (and deselect all other columns), and apply forward bias to R1 and R5, and so on.
Therefore, by scanning across the column quickly (> 100 times per second), and turning on the

37 | P a g e

respective LEDs in each row of that column, the persistence of vision comes in to play, and we
perceive the display image as still.

Fig 7.3: A standard 5x7 LED dot matrix display structure


The table below gives the logic levels to be applied to R1 through R7 for each of the
columns in order to display the alphabet A.
Row\Col
R1
R2
R3
R4
R5
R6
R7

C1
0
1
1
1
1
1
1

C2
1
0
0
0
1
0
0

C3
1
0
0
0
1
0
0

C4
1
0
0
0
1
0
0

C5
0
1
1
1
1
1
1

Table 7.1: Row Values of Each Column for Displaying A

38 | P a g e

Fast Scanning of Rows and Columns gives clear perception of A

Fig 7.4: Scanning across the Columns and feeding with appropriate Row values
7.6 ASCII Characters and Their Decoding
We are using ASCII codes in our project for display purpose on matrix of LEDs. The
character to be displayed is read as ASCII character and is then decoded into its corresponding
binary and then the binary is sent to matrix and then the LEDs glow according to the binary
code 1 gives a glowing LED and 0 gives an off LED
Symbol

Decimal

Binary

Symbol

Decimal

Binary

65

01000001

97

01100001

66

01000010

98

01100010

67

01000011

99

01100011

68

01000100

100

01100100

69

01000101

101

01100101

70

01000110

102

01100110

71

01000111

103

01100111

72

01001000

104

01101000

73

01001001

105

01101001

74

01001010

106

01101010

39 | P a g e

75

01001011

107

01101011

76

01001100

108

01101100

77

01001101

109

01101101

78

01001110

110

01101110

79

01001111

111

01101111

80

01010000

112

01110000

81

01010001

113

01110001

82

01010010

114

01110010

83

01010011

115

01110011

84

01010100

116

01110100

85

01010101

117

01110101

86

01010110

118

01110110

87

01010111

119

01110111

88

01011000

120

01111000

89

01011001

121

01111001

90

01011010

122

01111010

Table 7.2: Table showing ASCII Codes and their Binary Equivalents for Alphabets
7.7 Building an LED Matrix

To build a 44 common-row cathode matrix you will need 16 LEDs, four resistors,
some headers and prototyping board. We started by gluing the LEDs to prototyping board with
epoxy glue. This way it is easier to have LEDs beautifully aligned.
When glue is dry it is time to bend and solder. First bend all cathodes to left as close to
prototyping board as possible. Solder all cathodes in each row together. When cathodes are
ready, bend all anodes. Anodes must not touch cathodes, we used piece of plastic tubing to help
bending the anodes to form a bridge above cathodes.

Now solder together all anodes in each row. Solder the headers and connect cathode rows
directly to the header.

40 | P a g e

Anode rows are connected to header with current limiting resistors. Value of the resistor
depends on the LED used. Check the LED datasheet for forward voltage and current. LED
calculator will help you finding out correct resistor. Matrix is now ready for testing.

Addressing Single LED

Connecting ground to row A and positive voltage to column 1 will light the top
right LED (A,1).

41 | P a g e

Connecting ground to row D and positive voltage to column 4 will light the bottom
down LED(D,4).

Intuition would say lighting the both (A,1) and (D,4) at the same time is just connecting all the
four wires. This is not the case. There are four LEDs which are lit. This is because current is
also flowing through (A,4) and (D,1).

42 | P a g e

Fig 7.5: Different Pictures Showing the Preparation of LED Matrix


Multiplexing and Persistence of Vision
Multiplexing can be used to display arbitrary patterns with led matrices. Multiplexing is
sometimes also called scanning. It scans rows (usually from up to down) and lights needed leds
only in one row at time. Something like following:
Start by having everything disconnected.
2. Connect positive voltage all the needed columns.
3. Connect row to ground. This lights the needed leds in the row.
4. Disconnect the row and all columns.
5. Do the same steps one by one to all rows and then start from the beginning.
6. Do this slowly and you would see blinking LED rows. Do it really fast and human eye can
see the whole pattern. Phenomenon is called persistence of vision.

7.8 Interfacing SSD with Arduino

43 | P a g e

Fig 7.6: Interfacing of Arduino and LED Matrix


Microcontroller based scrolling message display has the following features:
1. The message to be displayed is stored in memory and the message length to be displayed is
limited only by free memory space of the microcontroller.
2. The number of character displayed at a time can be high as 30.
3. The running speed of the message can be increased or decreased by pressing switches. Here,
the circuit is designed for displaying English character on a 35LED dot matrix display.
Microcontroller port is used to display code and clock signal for the scrolling message display.
Parallel-input parallel output registers are used to shift the signal from right to left. The clock
pulse and code signal are generated by microcontroller program and output from the port.
Theoretically, we can add infinite number of PIPO registers but the maximum number of
registers is actually limited to the current triggering value of the clock pulse.
When clock is given to the shift register it displays the data to LED and provides input
to next shift register and the process goes on. The above block diagram is for single character
and there are many such characters in system .The microcontroller is connected with GSM

44 | P a g e

modem which is used to receive any message and that particular message will be displayed on
the LED matrix display. Other special characters can be added as follows. Suppose you want to
display character A. Draw A on the 5x7 LED display.

Fig 7.7: Character A on the 5x7 LED display


Suppose you want to display special character < on the 5 X 7display.

Fig 7.8: Special character < on the 5 X 7display


CHAPTER 08
SOFTWARE & PROGRAMMING

8.1 Arduino IDE

45 | P a g e

Arduino programs may be written in any programming language with a compiler that
produces binary machine code. Atmel provides a development environment for their
microcontrollers, AVR Studio and the newer Atmel Studio.
The Arduino project provides the Arduino integrated development environment (IDE), which
is a cross-platform application written in the programming language Java. It originated from
the IDE for the languages Processing and Wiring. It is designed to introduce programming to
artists and other newcomers unfamiliar with software development. It includes a code editor
with features such as syntax highlighting, brace matching, and automatic indentation, and
provides simple one-click mechanism to compile and load programs to an Arduino board. A
program written with the IDE for Arduino is called a "sketch".

Fig 8.1: Arduino IDE running on Windows OS


The Arduino IDE supports the languages C and C++ using special rules to organize
code. The Arduino IDE supplies a software library called Wiring from the Wiring project,
which provides many common input and output procedures. A typical Arduino C/C++ sketch
consist of two functions that are compiled and linked with a program stub main() into an
executable cyclic executive program:
setup(): a function that runs once at the start of a program and that can initialize settings.
46 | P a g e

loop(): a function called repeatedly until the board powers off.


After compiling and linking with the GNU toolchain, also included with the IDE
distribution, the Arduino IDE employs the program avrdude to convert the executable code
into a text file in hexadecimal coding that is loaded into the Arduino board by a loader program
in the board's firmware.
8.1 PROGRAMMING
A typical program for a beginning Arduino programmer blinks a light-emitting
diode (LED) on and off. This program is usually loaded in the Arduino board by the
manufacturer. In the Arduino environment, a user might write such a program as shown:
#define LED_PIN 13
void setup() {
pinMode(LED_PIN, OUTPUT);
}

// Enable pin 13 for digital output

void loop() {
digitalWrite(LED_PIN, HIGH); // Turn on the LED
delay(1000);
// Wait one second (1000 milliseconds)
digitalWrite(LED_PIN, LOW); // Turn off the LED
delay(1000);
// Wait one second

Fig 8.2: Power LED (Red) and Integrated LED on Line 13 (Green) on Arduino Compatible
Board
Most Arduino boards contain an LED and a load resistor connected between the pin 13
and ground, which is a convenient feature for many simple tests. The previous code would not
be seen by a standard C++ compiler as a valid program, so when the user clicks the "Upload to
I/O board" button in the IDE, a copy of the code is written to a temporary file with an extra
include header at the top and a very simple main() function at the bottom, to make it a valid C+
+ program.The Arduino IDE uses the GNU toolchain and AVR Libc to compile programs, and
47 | P a g e

uses avrdude to upload programs to the board.As the Arduino platform uses Atmel
microcontrollers, Atmel's development environment, AVR Studio or the newer Atmel Studio,
may also be used to develop software for the Arduino.
8.1.1 PROGRAM USED FOR GSM MESSAGE SCROLLING BOARD
ScrollingBoard.Ino
#include "characters.h"
char incoming_char = 0;
#define DATA 2
#define LATCH 3
#define CLOCK 6
#define MR 5
char str[100] = "";
int index = 0;
int mssg = 0;
int start = 0;
void loop()
{
if(Serial1.available() > 0)
{
incoming_char=Serial1.read();

48 | P a g e

if((incoming_char >= ' ') && (incoming_char <= 'z'))


Serial.print(incoming_char);
else
{
Serial.print("%");
Serial.print((int)incoming_char);
Serial.print("%");
if(incoming_char==10)
Serial.println();
}
}
if(Serial.available() > 0)
{
incoming_char = Serial.read();
Serial1.print(incoming_char);
}
}
void setup()
{
pinMode(LATCH, OUTPUT);
49 | P a g e

pinMode(CLOCK, OUTPUT);
pinMode(DATA, OUTPUT);
pinMode(MR, OUTPUT);
digitalWrite(MR, HIGH);
Serial.begin(9600);
Serial1.begin(9600);
delay(12000);
}
void loop()
{
if(Serial1.available() > 0)
{
incoming_char=Serial1.read();
if((incoming_char >= ' ') && (incoming_char <= 'z'))
{
if(start == 3)
{
Serial.print(incoming_char);
str[index] = incoming_char;
index++;
50 | P a g e

}
}
else
{
if(incoming_char==10);
start++;
}
mssg = 1;
}
if(mssg == 1)
{
index = 0;
start = 0;
mssg = 0;
}
digitalWrite(MR, HIGH);
for(int i = 0; i < sizeof(str) - 1; i++)
{
int index = 0;
if(65 <= str[i] && str[i] <= 90)
51 | P a g e

{
for(int j = 0; j < sizeof(asciiSet1); j++)
{
if(str[i] == asciiSet1[j])
index = j;
}
for(int k = 0; k < 5; k++)
{
digitalWrite(LATCH, LOW);
shiftOut(DATA, CLOCK, MSBFIRST, characterSet1[index][k]);
digitalWrite(LATCH, HIGH);
delay(200);
}
digitalWrite(LATCH, LOW);
shiftOut(DATA, CLOCK, MSBFIRST, 0);
digitalWrite(LATCH, HIGH);
}
else if(97 <= str[i] && str[i] <= 122)
{
for(int j = 0; j < sizeof(asciiSet2); j++)
52 | P a g e

{
if(str[i] == asciiSet2[j])
index = j;
}

for(int k = 0; k < 5; k++)


{
digitalWrite(LATCH, LOW);
shiftOut(DATA, CLOCK, MSBFIRST, characterSet2[index][k]);
digitalWrite(LATCH, HIGH);
delay(200);
}
digitalWrite(LATCH, LOW);
shiftOut(DATA, CLOCK, MSBFIRST, 0);
digitalWrite(LATCH, HIGH);
}
else if(48 <= str[i] && str[i] <= 57)
{
for(int j = 0; j < sizeof(asciiSet3); j++)
{
53 | P a g e

if(str[i] == asciiSet3[j])
index = j;
}
for(int k = 0; k < 5; k++)
{
digitalWrite(LATCH, LOW);
shiftOut(DATA, CLOCK, MSBFIRST, characterSet3[index][k]);
digitalWrite(LATCH, HIGH);
delay(200);
}
digitalWrite(LATCH, LOW);
shiftOut(DATA, CLOCK, MSBFIRST, 0);
digitalWrite(LATCH, HIGH);
}
else
{
for(int j = 0; j < sizeof(asciiSet4); j++)
{
if(str[i] == asciiSet4[j])
index = j;
54 | P a g e

}
for(int k = 0; k < 5; k++)
{
digitalWrite(LATCH, LOW);
shiftOut(DATA, CLOCK, MSBFIRST, characterSet4[index][k]);
digitalWrite(LATCH, HIGH);
delay(200);
}
digitalWrite(LATCH, LOW);
shiftOut(DATA, CLOCK, MSBFIRST, 0);
digitalWrite(LATCH, HIGH);
}
}

for(int i = 0; i < 49; i++)


{
digitalWrite(LATCH, LOW);
shiftOut(DATA, CLOCK, MSBFIRST, 0);
digitalWrite(LATCH, HIGH);
delay(300);
55 | P a g e

}
digitalWrite(MR, LOW);
}
Characters.h
int asciiSet1[26] = {65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90};
int asciiSet2[26] = {97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122};
int asciiSet3[10] = {48, 49, 50, 51, 52, 53, 54, 55, 56, 57};
int asciiSet4[29] = {33, 64, 35, 36, 37, 38, 42, 40, 41, 95, 45, 43, 61, 123, 125, 91, 93, 58, 59,
34, 39, 63, 47, 124, 60, 62, 44, 46, 32};
char characterSet1[26][5] = {{126, 17, 17, 17, 126}, {127, 73, 73, 73, 54}, {62, 65, 65, 65,
34}, {127, 65, 65, 34, 28}, {127, 73, 73, 73, 65},
{127, 9, 9, 9, 1}, {62, 65, 73, 73, 122}, {127, 8, 8, 8, 127}, {0, 65, 127, 65, 0}, {32, 64, 65, 63,
1}, {127, 8, 20, 34, 65}, {127, 64, 64, 64, 64},
{127, 2, 12, 2, 127}, {127, 4, 8, 16, 127}, {62, 65, 65, 65, 62}, {127, 9, 9, 9, 6}, {62, 65, 81,
33, 94}, {127, 9, 25, 41, 70}, {70, 73, 73, 73, 49},
{1, 1, 127, 1, 1}, {63, 64, 64, 64, 63}, {31, 32, 64, 32, 31}, {63, 64, 56, 64, 63}, {99, 20, 8, 20,
99}, {7, 8, 112, 8, 7}, {97, 81, 73, 69, 67}};
char characterSet2[26][5] = {{32, 84, 84, 84, 120}, {127, 72, 68, 68, 56}, {56, 68, 68, 68,
32}, {56, 68, 68, 72, 127}, {56, 84, 84, 84, 8},

56 | P a g e

{8, 126, 9, 1, 2}, {12, 82, 82, 82, 63}, {127, 8, 4, 4, 120}, {0, 68, 125, 64, 0}, {32, 64, 68, 61,
0}, {127, 16, 40, 68, 0}, {0, 65, 127, 64, 0},
{124, 4, 24, 4, 120}, {124, 8, 4, 4, 120}, {56, 68, 68, 68, 56}, {124, 20, 20, 20, 8}, {8, 20, 20,
24, 124}, {124, 8, 4, 4, 8}, {72, 84, 84, 84, 32},
{4, 63, 64, 64, 32}, {60, 64, 64, 32, 124}, {28, 32, 64, 32, 28}, {60, 64, 48, 64, 60}, {68, 40,
16, 40, 68}, {12, 80, 80, 80, 60}, {68, 100, 84, 76, 68}};
char characterSet3[10][5] = {{62, 81, 73, 69, 62}, {0, 66, 127, 64, 0}, {66, 97, 81, 73, 70},
{33, 65, 69, 75, 49}, {24, 20, 18, 127, 16},
{39, 69, 69, 69, 57}, {60, 74, 73, 73, 48}, {1, 113, 9, 5, 3}, {54, 73, 73, 73, 54}, {6, 73, 73, 41,
30}};
char characterSet4[29][5] = {{0, 0, 79, 0, 0}, {50, 73, 121, 65, 62}, {20, 127, 20, 127, 20},
{36, 42, 127, 42, 18}, {35, 19, 8, 100, 98},
{54, 73, 85, 34, 80}, {20, 8, 62, 8, 20}, {0, 28, 34, 65, 0}, {0, 65, 34, 28, 0}, {64, 64, 64, 64,
64}, {8, 8, 8, 8, 8}, {8, 8, 62, 8, 8},
{20, 20, 20, 20, 20}, {0, 8, 54, 65, 0}, {0, 65, 54, 8, 0}, {0, 127, 65, 65, 0}, {0, 65, 65, 127, 0},
{0, 54, 54, 0, 0}, {0, 86, 54, 0, 0},
{0, 7, 0, 7, 0}, {0, 5, 3, 0, 0}, {2, 1, 81, 9, 6}, {32, 16, 8, 4, 2}, {0, 0, 127, 0, 0}, {8, 20, 34, 65,
0}, {0, 65, 34, 20, 8}, {0, 80, 48, 0, 0},
{0, 96, 96, 0, 0}, {0, 0, 0, 0, 0}};

57 | P a g e

You might also like