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

LCD

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

CHAPTER 1

INTRODUCTION

1.1. INTRODUCTION
To fully understand how to interface an Arduino microcontroller to an LCD screen, it is
important to understand how an LCD functions. An LCD display is composed of pixels made
up of liquid crystals. Liquid crystals exist in a state that’s between a solid and a liquid. At any
time liquid crystals can be in a variety of phases, most notably the nematic phase or the
smectic phase. In the nematic phase the crystals act more like a liquid, allowing the
molecules of the crystals to rearrange themselves while remaining oriented in a uniform
direction. In the smectic phase, the molecules can form into layers that can move past one
another relatively easily. Molecules of a certain layer can move freely within that layer, but
cannot move to adjacent layers. When the liquid crystals exist in the nematic phase they tend
to adapt a twisted up structure, which can be straightened out when electricity is applied to
them. In an LCD, a liquid crystal pixel lies between two glass filters, one behind it and
another in front at 90 degrees. When electricity is applied to the liquid crystals the twisted
structures that have naturally formed are straightened out. This rotates any light passing
through 90 degrees, thus allowing it to pass through the two glass filters

1.2. PURPOSE

The object of this application note is to demonstrate how an Arduino microcontroller can be
used to interface with an LCD screen.

1
1.3. COMPANY PROFILE

FIG1.1 LOGO OF COMPANY

INFOWIZ:is a 7 years young organization with ISO Certification which has been working in
the field of IT, Embedded System and has been providing its clients with exceptional quality
in IB Design, IB Development and SEO services. Our clients range from small, medium to
large scale Business houses & individuals. I also provide the off shore companies of US, UK,
France, Ireland, Canada and Australia with quality and timely IB and SEO services.
INFOWIZ is an organization which is established in the field of IB Development (PHP &
.NET), JAVA (Core as Ill as Advance), IPhone & Android Applications, Embedded systems
(AVR, PIC & ARM), ROBOTICS and Networking (MCSE, CCNA & RHSE). INFOWIZ
does not boost itself of being the best Development Company but enjoys reputable position
among top IB Development and Electronics companies because of our timely delivery and
quality work. Our skilled team of professionals make sure that the product is developed as per
the customer’s needs and also keeping the customer informed about the development of their
project from time to time. I do not only emphasize on formulating an attractive solution to
our clients but also believe in providing a workable solution. INFOWIZ offers research based
Search Engine Marketing products that help achieve greater insights to customer’s online
business. Our Research & Development arm offers SEO tools for SEM professionals.
INFOWIZ also provides Technical Support & Consultancy to Software Companies like
Sagitech solutions Panchkula, Jarc InfoTech Mohali, Infonet Solution, Delhi etc.

2
CHAPTER 2

SCHEMATIC DIAGRAM

FIG 2.1.SCHEMATIC DIAGRAM

3
CHAPTER 3
CIRCUIT DIGRAM

FIG 3.1. CIRCUIT DIAGRAM


In 16x2 LCD there are 16 pins over all if there is a back light, if there is no back light there
will be 14 pins. One can power or leave the back light pins. Now in the 14 pins there are 8
data pins (7-14 or D0-D7), 2 power supply pins (1&2 or VSS&VDD or GND&+5v), 3rd pin
for contrast control (VEE-controls how thick the characters should be shown), and 3 control
pins (RS&RW&E).
The connections which are done for LCD are given below:

Connect 100 ohm variable resistor to +5 power

PIN1 or VSS to +5V power

PIN2 or VDD to +5v power

PIN3 or VEE to variable resistor

PIN4 or RS (Register Selection) to PIN12 of ARDUINO UNO

PIN5 or RW to ground (puts LCD in read mode eases the communication for user)

PIN6 or E (Enable) to PIN11 of ARDUINO UNO

PIN11 or D4 to PIN5 of ARDUINO UNO

PIN12 or D5 to PIN4 of ARDUINO UNO

PIN13 or D6 to PIN3 of ARDUINO UNO

PIN14 or D7 to PIN2 of ARDUINO UNO

4
CHAPTER 4
COMPONENTS
4.1. HARDWARE

The following described are the components used in this projects.

4.1.1 Arduino UNO:-

The main part of the Traffic Light Controller is the controller itself. Arduino UNO will serve
the purpose in this project to handle all the switching of the LEDs and controlling their
timings.
Arduino Uno is programmed using Arduino Software which is a cross-platform application
called IDE written in Java. The AVR microcontroller Atmega328 laid out on the base comes
with builtin bootloader that sets you free from using a separate burner to upload the program
on the board.

Communication

Arduino can be used to communicate with a computer, another Arduino board or other
microcontrollers. The ATmega328P microcontroller provides UART TTL (5V) serial
communication which can be done using digital pin 0 (Rx) and digital pin 1 (Tx). An
ATmega16U2 on the board channels this serial communication over USB and appears as a
virtual com port to software on the computer. The ATmega16U2 firmware uses the standard
USB COM drivers, and no external driver is needed. However, on Windows, a .inf file is
required. The Arduino software includes a serial monitor which allows simple textual data to
be sent to and from the Arduino board. There are two RX and TX LEDs on the Arduino
board which will flash when data is being transmitted via the USB-to-serial chip and USB
connection to the computer (not for serial communication on pins 0 and 1). A Software Serial
library allows for serial communication on any of the Uno's digital pins. The ATmega328P
also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire
library to simplify use of the I2C bus

5
Applications|

Arduino Uno comes with a wide range of applications. A larger number of people are using
Arduino boards for developing sensors and instruments that are used in scientific research.
Following are some main applications of the board.
 Embedded System
 Security and Defense System
 Digital Electronics and Robotics
 Parking Lot Counter
 Weighing Machines
 Traffic Light Count Down Timer
 Medical Instrument
 Emergency Light for Railways
 Home Automation
 Industrial Automation

Why Arduino Uno?

Actually, Arduino comes with a big community that is developing and sharing the knowledge
with a wide range of audience. Quick support is available pertaining to technical aspects of
any electronic project. When you decide Arduino board over other controllers, you don’t
need to arrange extra peripherals and devices as most of the functions are readily available on
the board that makes your project economical in nature and free from a lot of technical
expertise

6
FIG 4.1.1. ARDUINO UNO

Arduino Uno to ATmega328 Pin Mapping

When ATmega328 chip is used in place of Arduino Uno, or vice versa, the image below shows the pin
mapping between the two.

7
4.1.2 Liquid Crystal Diode:-

4.1.3 FIG 4.1.2. Liquid Crystal Diode:-

LCD modules are vey commonly used in most embedded projects, the reason being its
cheap price, availability and programmer friendly. Most of us would have come across
these displays in our day to day life, either at PCO’s or calculators. The appearance and
the pinouts have already been visualized above now let us get a bit technical.

16×2 LCD is named so because; it has 16 Columns and 2 Rows. There are a lot of
combinations available like, 8×1, 8×2, 10×2, 16×1, etc. but the most used one is the
16×2 LCD. So, it will have (16×2=32) 32 characters in total and each character will be
made of 5×8 Pixel Dots. A Single character with all its Pixels is shown in the below
picture.

Now, we know that each character has (5×8=40) 40 Pixels and for 32 Characters we
will have (32×40) 1280 Pixels. Further, the LCD should also be instructed about the
Position of the Pixels. Hence it will be a hectic task to handle everything with the help
of MCU, hence an Interface IC like HD44780is used, which is mounted on the
backside of the LCD Module itself. The function of this IC is to get the Commands
and Data from the MCU and process them to display meaningful information onto our
LCD Screen. You can learn how to interface an LCD using the above mentioned links.
If you are an advanced programmer and would like to create your own library for
interfacing your Microcontroller with this LCD module then you have to understand
the HD44780 IC is working and commands which can be found its datasheet.

8
4.1.3 Jumper wire:-

A jump wire (also known as jumper, jumper wire) is an electrical wire or group of them in a
cable with a connector or pin at each end(or sometimes without them simply "tinned"), which
is normally used to interconnect the components of a breadboard or other prototype or test
circuit, internally or with other equipment or components, without soldering.
Individual jump wires are fitted by inserting their "end connectors" into the slots provided in
a breadboard, the header connector of a circuit board, or a piece of test equipment.

FIG 4.1.3. JUMPER WIRE

9
4.1.4 BREADBOARD

A breadboard is a simple device designed to let you create circuits without the need for
soldering. They come in various sizes.

The two larger pieces of wire down each side are typically used to connect a power
source to the board. They are usually referred to as powerrails. The other smaller pieces
of wire running perpendicular all the way across the board are used for components in
your circuit. This diagram will help visualize this pattern from the top.

The power rails run horizontally as two rows at the top and bottom. Meanwhile, the vertical
columns run inwards as you move down the board.
If you were to pull any one of these metal pieces out, you would see their purpose. They’re
designed to grab onto the legs of any components pushed through the breadboard holes. This
allows you to test circuits without having to worry about soldering, or making a good contact
with the board.

10
4.1.5 POTENTIOMETER

A potentiometer is a three-terminal resistor with a sliding or rotating contact that forms an


adjustable voltage divider.[1] If only two terminals are used, one end and the wiper, it acts as
a variable resistor or rheostat.

The measuring instrument called a potentiometer is essentially a voltage divider used for
measuring electric potential (voltage); the component is an implementation of the same
principle, hence its name.

Potentiometers are commonly used to control electrical devices such as volume controls on
audio equipment. Potentiometers operated by a mechanism can be used as
position transducers, for example, in a joystick. Potentiometers are rarely used to directly
control significant power (more than a watt), since the power dissipated in the potentiometer
would be comparable to the power in the controlled load.

11
4.2. SOFTWARE

4.2.1. Arduino IDE(version 1.8.9)

The open-source Arduino Software (IDE) makes it easy to write code and upload it to
the board. It runs on Windows, Mac OS X, and Linux. The environment is written in
Java and based on Processing and other open-source software.

FIG 4.2. ARDUINO IDE

PROGRAMMING ARDUINO
Once Arduino IDE is installed on the computer, connect the board with computer using USB
cable. Now open the Arduino IDE and choose the correct board by selecting
Tools>Boards>Arduino/Genuino Uno, and choose the correct Port by selecting Tools>Port.
Arduino Uno is programmed using Arduino programming language based on Wiring.

12
CHAPTER 5

Working of the Project

As by the above table we only need to look at these four lines for establishing a
communication between an ARDUINO and LCD.

First we need to enable the header file (‘#include <LiquidCrystal.h>’), this header file has
instructions written in it, which enables the user to interface an LCD to UNO in 4 bit mode
without any fuzz. With this header file we need not have to send data to LCD bit by bit, this
will all be taken care of and we don’t have to write a program for sending data or a command
to LCD bit by bit.

Second we need to tell the board which type of LCD we are using here. Since we have so
many different types of LCD (like 20x4, 16x2, 16x1 etc.). Here we are going to interface a
16x2 LCD to the UNO so we get ‘lcd.begin(16, 2);’. For 16x1 we get ‘lcd.begin(16, 1);’.

13
CHAPTER 6
ADVANTAGES,

DISADVANTAGES,

&APPLICATION

Advantages
 The operating voltage of this LCD is 4.7V-5.3V
 It includes two rows where each row can produce 16-characters.
 The utilization of current is 1mA with no backlight
 Every character can be built with a 5×8 pixel box
 The alphanumeric LCDs alphabets & numbers
 Is display can work on two modes like 4-bit & 8-bit
 These are obtainable in Blue & Green Backlight
 It displays a few custom generated characters.

Limitations

 Limited viewing angle in some older or cheaper monitors, causing color, saturation,
contrast and brightness to vary with user position, even within the intended viewing
angle.
 Dead or stuck pixels may occur during manufacturing or after a period of use. A stuck
pixel will glow with color even on an all-black screen, while a dead one will always
remain black.
 Subject to burn-in effect, although the cause differs from CRT and the effect may not be
permanent, a static image can cause burn-in in a matter of hours in badly designed
displays.
 In a constant-on situation, thermalization may occur in case of bad thermal management,
in which part of the screen has overheated and looks discolored compared to the rest of
the screen.
 Loss of brightness and much slower response times in low temperature environments. In
sub-zero environments, LCD screens may cease to function without the use of
supplemental heating.
 Loss of contrast in high temperature environment

14
Applications

 Using LCD with Arduino we can create a digital thermometer


 A weather station
 Alarm clock
 Digital clock.

15
CHAPTER 6
CONCLUSION

6.1.CONCLUSIONS:-

Thus from this report we can conclude that using the method of Lcd with Arduino can be
helpful in many ways

16
APPENDIX A

PROJECT PICTURES

17
18
APPENDIX B

BIBLIOGRAPHY

1. Wikipedia
2. Instructable

19

You might also like