0% found this document useful (0 votes)
79 views

Design and Implementation of Arduino Uno R3 With LCD Display and Angular Potenentiometer

The document describes a project to control an LCD display and read values from a potentiometer using an Arduino Uno. It involves connecting an LCD display and potentiometer to the Arduino and using its analog and digital pins. The Arduino code uses functions like analogRead() to read the potentiometer and display values on the LCD. The project aims to automatically adjust the LCD brightness with one potentiometer and display readings from the other potentiometer.

Uploaded by

Yidersal Marew
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

Design and Implementation of Arduino Uno R3 With LCD Display and Angular Potenentiometer

The document describes a project to control an LCD display and read values from a potentiometer using an Arduino Uno. It involves connecting an LCD display and potentiometer to the Arduino and using its analog and digital pins. The Arduino code uses functions like analogRead() to read the potentiometer and display values on the LCD. The project aims to automatically adjust the LCD brightness with one potentiometer and display readings from the other potentiometer.

Uploaded by

Yidersal Marew
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Design and Implementation of Arduino Uno R3 with LCD Display and angular

Potenentiometer
Table of Contents

1 Introduction
1.1 Introduction…… … … … … … … … … … … … … … … … … … … … … … … … … … … … … 2
1.2) General and Specific Objective……………………………………………………………………...2
1.2.1) General Objective ………………………………………………………………………………….2
1.2.3) Specific Objective………………………………………………………………………....2
2. Literature Review ………………………………………………………………………………………..3
2.1Introduction …………………………………………………………………………………………..3
2.3 Literature Review………………………………………………………………………………………3
3. Methodology
3.1 Introduction …………………………………………………………………………………………..,4
3.2.1 Components Description …………………………………………………………………………….4
3.1.3 Experimental Circuit Setup …………………………………………………………………………..5
3.1.3.1 Circuit Diagram……………………………………………………………………………………..6
3.1.3.2 Project Wiring ……………………………………………………………………………………...7
4. Result and Discussion.....................................................................................................................8
References
Appendix 1 : Code for Project 1

1
CHAPTER ONE
1. Introduction
The project uses closed loop control system to automatically operate a lighting system. It employed Light
Dependent Resistor LDR to sense the illumination level and compare the measured signal with the reference
voltage realized through the usage of a potentiometer forming a potential divider. It highlights how an operational
amplifier can be used as a comparator. This idea was transferred into Arduino Microcontroller. The latter is used to
compare the signals using Arduino programming functions.

To display any output and input of Arduino we can use a liquid crystal display module (LCD).LCD is one of the
essential components to get the visual output. The output can be a value of any sensor or a device such as
potentiometer. This discourse explains the process of how wecan display the potentiometer values on the LCD
display in Arduino.The Arduino is multitasked using millis() to sound alarm at system switch-On or Reset. An i2C
is used to interface a Liquid Crystal Display with an advantage of using two analog pins A4 and A5 instead of four
or eight I/O pins for four and eight LCD modes.

The project will use an LCD 16×2 display and two potentiometers, one to adjust the LCD brightness and one to get
readings. The Arduino uses an analog pin to read the sensor values. So the potentiometer want to read will connect
it to the analog pin of the Arduino.The process of controlling the display involves putting the data that form
theimage of what you want to display into the data registers, then putting instructions in the instruction register. The
LiquidCrystal Library simplifies this for you so you don't need to know the low-level instructions. The Hitachi-
compatible LCDs can be controlled in two modes: 4-bit or 8-bit.The 4-bit mode requires seven I/O pins from the
Arduino, while the 8-bit mode requires 11 pins. For displaying text on the screen, you can do most everything in 4-
bit mode, so example shows how to control a 16x2 LCD in 4 bit mode.

1.2. General and Specific Objective


1.2.1) General Objective
The objective of this project is to control brightness of LED’S and Reading voltage by using two potentiometer
with Arduino Uno R3.
1.2.3) Specific Objective
The analog input is a pin with ADC (Analog-to-Digital Converter) function. It can convert the externally input
analog signal into a digital signal that can be recognized during chip operation, so as to realize the function of
reading in the analog value.
The Arduino analog input function has 10-bit precision, that is, it can convert a voltage signal of 0 to 5V into
an integer form of 0 to 1024. Utilize the analogRead() function to read input voltage values by the
potentiometer, and then use the analogWrite() function to control the brightness of the LED ligh

2
CHAPTER TWO
2. Literature Review

2.1 INTRODUCTION

Literature review was carried out throughout the whole project to gain knowledge and improve skills needed to
complete this project. The main sources for this project are previous related projects, books, journals and articles
which are mostly obtained from online. This chapter focuses on the basic concepts and all fundamental theories
which related to this project.

2.2 LITERATURE REVIEWS

The project of Interfacing LCD to Arduino – Display Text and Characters on LCD Screen using Arduino In this guide, we’re
learning how to interface LCD to Arduino and display text characters on LCD screen.We’reinterfacing 16×2 LCD to Arduino
as a demonstration with circuit and code
The other project presents an automated non-intrusive control system for monitoring the water level of domestic
overhead and underground reservoir tank base on the property of wave reflection. The system consists of two HC-
SR04 Ultrasonic transceivers that generate ultrasonic pulses and determines the depth of the water surface based on
the total Time of Flight (TOF) of the reflected wave. An ATMEGA328 microcontroller was programmed to read
the sensors, control the water level and display the corresponding volume of the water on a Liquid Crystal Display
(LCD). .( AUTONOMOUS ULTRASONIC BASED WATER LEVEL DETECTION AND CONTROL SYSTEM ,M. I. BelloS. M.
Gana M. I. Faruk and M. J. Umar)

The project uses closed loop control system to automatically operate a lighting system. It employed Light
Dependent Resistor LDR to sense the illumination level and compare the measured signal with the reference
voltage realized the usage of a potentiometer forming a potential divider. It highlights how an operational amplifier
can be used as a comparator. This idea was transferred into Arduino Microcontroller. The latter is used to compare
the signals using Arduino programming functions. The Arduino is multitasked using millis() to sound alarm at
system switch-On or Reset.The paper recommends among others further improvement in the display interactivity
through robust programming. An alarm could also be made to sound at each switch- over. It is believed that its
simplicity will encourage its mass production with its attendant socio economic benefits.( Akinwole OO* and
Oladimeji TT)

A liquid crystal display (LCD) controller includes a plurality of segment/key source control circuits connected with an

LCD panel and a key matrix through a plurality of segment key source terminals, to periodically output a signal for
one frame which contains a display output period and a key source output period. The plurality of segment/key
source control circuits output segment signals having display drive voltages indicating a maximum value, a
minimum value, and interne• date values between the maximum value and the minimum value. The plurality of
segment/key source control circuits output first key scan pulse signals varying between maximum.( Attorney,
Agent, or Firm - Foley & Lardner LLP)

3
CHAPTER THREE
3. Methodology and Procedure

3.1) Introduction

The design project was consummated by highlighting the problems to be solved and an algorithm was spelt out to
realize the solution. This was also buttressed using a flowchart thus simplifying the writing of the Arduino source
codes. The inputs to the analog is never digital but analog, this allows the choice of functions to read the analog
signals that changes from 0V to +5V depending on the level of illumination and voltage reference set. Maximum
output current for the Microcontroller is 20mA hence there was a need to have a transistor switch to drive a relay
which switches the Lighting units.

3.1.2 )Component Description

a) Arduino microcontroller
The ubiquitous application of microcontroller in automobiles, robotics and industrial system has made its studies
important. An Arduino board has a microcontroller and other extras that make its programming and debugging
easy. An engineer just need to install an Arduino IDE which is downloadable online on his computer from
www.arduino.cc, write the program, compile it and load it into the board. No need for a separate programmer that
costs extra money. Its functions are easy to understand, a gesture which makes it ideal for prototyping by inventors.
An Arduino uses C programming language.

Arduino structures
The project uses the simplest Arduino board referred to as Arduino Uno (Figure 2) [4]. It is a small microcontroller
board. In this case an At mega 328 that has 28 pins is used. Some of the component surrounding it is voltage
regulator, reset button and Crystal oscillator; they allow the board to communicate with the computer without
separate programmer.

4
Fig; 1 arduino un card

b) Breadboard
A breadboard is a construction base for prototyping of electronics. In the 1970s the solder less bread- board (a.k.a.
plug board, a terminal array board) became available and nowadays the term ”bread- board” is commonly used to
refer to these. Because the solder less breadboard does not require soldering, it is reusable. This makes it easy to
use for creating temporary prototypes and experiment with circuit design. For this reason, solder less breadboards
are also popular with students and in technological education. A variety of electronic systems may be prototyped by
using breadboards, from small analog and digital circuits to complete central processing units.

c) Potentiometer

A potentiometer is a three-terminal resistor with a sliding or rotating contact that forms an adjustable voltage
divider. 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.

d) External Power Source

The board is powered through the USB connection to the computer. While the external power can be anywhere in
the range of 6 to 24 V (for example, you could use a car battery), a standard 9 V battery is convenient. While you
could jam the leads of a battery snap into the Vin and Gnd connections on the board, it is better to connect the
battery snap leads to a DC power plug and connect to the power jack on the board.

e) Liquid Crystal Display (LCD)

Parallel LCD modules have pin outs that are the same. They have eight data pins D0-D7. If four pins (D4-D7) are
used, it is called 4-pin mode and when all are utilized, the connection is being referred to as 8 pin mod. For obvious
reason, engineers use 4-pin method. There are pins on the LCD for enabling display that is EN. RW pin is normally
Employed for setting Read/Write. VSS and VDD pins are for ground and +5V respectively. RS is used to select the

5
register. Backlight LED has two terminals, one for the anode and the other is the cathode. VO pin allow contrast
adjustment using potentiometer.

6
3.1.3 )Experimental Circuit Setup
3.1.3.1) Circuit Diagram
 How to interface the potentiometer with and LCD using Arduino

Connect Arduino and other components with the help of the below circuit diagram to display the potentiometer
readings on an LCD 16×2 display. To display the output of the potentiometer on the liquid crystal display we have
to interface the LCD and variable resistor with Arduino. The following are the components required for displaying
the output of potentiometer on LCD. The Arduino program for displaying the output of the potentiometer in the
LCD is given followed by the schematic diagram of the circuit.

Fig; 2 schematic diagram of the circuit

7
3.1.3.2) Project wiring

The project was wired on a breadboard as shown in below. The threshold of switching was set using the
potentiometer in the potential divider which has its output feeding Arduino analog Pin A1. As a flashlight is
directed to the LDR, the LED switches off thus indicating day while LCD display displaying.

Figure 3: Physical Connection Diagram

 The dimensions of the LCD module are initialized that are 16×2 and then for the serial Communication a
baud rate is given. In the loop function the value of the potentiometer is read by using the function
analogRead() and the output of the read function is then displayed using the lcd.print() function. Similarly
to assign a specific place for the data to be displayed on the LCD the function lcd.setCursor() is used.

 The second potentiometer connected to the (Vee) pin of the LCD is used to control the Before wiring the
LCD screen to your Arduino board we suggest to solder aspen header strip to the 14 (or 16) pin count
connector of the LCD screen, as you can see in the image further up. Device of Arduino that can be used for
various purposes like controlling the brightness of LED or LCD by increasing or decreasing its resistance.
In this write-up a potentiometer is interfaced with Arduino and its values are displayed on the LCD.

8
CHAPTER FOUR
4. Result and Discussion
The project has succeeded in showing simplicity in the use of Arduino in prototyping and designs of intelligent and
embedded systems. The advantage of programming a microcontroller without a programmer coupled with the ease
of debugging Arduino codes is an asset. In order to control lighting systems and other bigger loads with higher
power expected to draw higher currents. Figure 6 a bipolar switching transistor or MOSFET driven relay can have
its normally opened contact connected in series with the controlled lighting units. In a situation where the current
rating of the relay’s contact set is not enough, the latter can be connected in series with the operating coil of a
contactor while the load, that is, the lighting load connected in series with its normally open poles. MOSFET is
being suggested being voltage operated, with very high input impedance can be driven directly by Arduino I/O
pins. Ideas and functions used in this project can as well be employed in other equipment which has been hitherto
designed with analog approach or other traditional microcontrollers.
In this project, only one input signal which is obtained from the switch and one output signal which goes to the
transistor is used. For better understanding the current flow in the circuit an LED is connected to the switch in series
as an indicator. When current passes through the switch, it turned on. As the switch is pushed, Arduino board
receives the input signal. As per the code programmed in the Arduino board, it sends an output signal in the form of
a low voltage current (approximately 5 volts) to the gate pin of the transistor, which allows the high voltage current
(approximately 9 volts) of the battery through the source and drain pin of the transistor. Rotating the potentiometer
knob changes the brightness of the LED light.

After connecting the entire component as advised in the manual, our LED’s not give Brightness at first. We thought if
any component was broken. A well organized and clean code with proper side comments and variable names is
desirable. Sometimes A small mistake in the code can make the entire program fail. If that happens, it can be
revised easily. The potentiometer provided with the Arduino Uno R3 kit didn’t fit perfectly on the breadboard. It
was loose. As a result not uniformly for the same rotation of the potentiometer regulator. The push-pull switch is a
better option than the momentary switches we used. It will simplify the programs also. It is very important to make
9
sure not to have battery 9V and Arduino 5V power lines in same connection.

10
REFERENCES

1. By Carullo, A and Parvis, M , 2001. An Ultrasonic Sensor for Distance Measurement in Automotive
Applications. Journal of Ieee Sensors Journal 143-147. http://ieeexplore.ieee.org/document/936931/
2. Lee, Jung-Ryul, Tsuda and Hiroshi, 2006, Sensor application of fiber ultrasonic waveguide. Journal of
Measurement Science and Technology 1235-1235. http://iopscience.iop.org/article/10.1088/0957-
0233/17/4/006/meta.
3. Hsu, Tsung Hua Liu, Jing Fu Yu, Pen Ning Lee, Wang Shuan Hsu, Jia Sing, 2008, Development of an
automatic parking system for vehicle. Journal of 2008 IEEE Vehicle Power and Propulsion Conference,
VPPC 2008.
https://www.researchgate.net/publication/224350298_Development_of_an_automatic_parking_system_for_
vehicle
4. Pham, Viet Thang, Qiu, Qiang Wai, Aung Aung Phyo, Biswas and Jit, 2007, Application of ultrasonic
sensor’s in a smart environment. Journal of Pervasive and Mobile Computing 180-207.
5. Park, Wan Joo, Kim, Byung Sung Seo, Dong Eun, Kim, Dong Suk Lee and Kwae Hi, 2008, Parking space
detection using ultrasonic sensor in parking assistance system. Journal of IEEE Intelligent Vehicles
Symposium, Proceeding 1039-1044. http://ieeexplore.ieee.org/document/4621296/
6. Jeon, Hong Y., Zhu, Heping, Derksen, Richard, Ozkan, Edal, Krause and Charles 2011, Evaluation of
ultrasonic sensor for variable-rate spray applications. Journal of Computers and Electronics in Agriculture
213-221.
http://www.sciencedirect.com/science/article/pii/S0168169910002310
7. By Adhatarao, Sripriya Srikant Alfandi, Omar Bochem, Arne Hogrefe, Dieter, 2015, Smart parking system
for vehicles. Volume 2015-January issue 2015 189-190.
http://ieeexplore.ieee.org/abstract/document/7013341/author
8. Zhang, Zusheng Tao, Ming Yuan, Huaqiang, 2015, A parking occupancy detection algorithm based on
AMR sensor. Journal of IEEE Sensors Journal 1261-1269.
http://ieeexplore.ieee.org/document/6919252/authors
9. By Kianpisheh, Amin Mustaffa, Norlia Limtrairut, Pakapan Keikhosrokiani, Pantea, 2016, Smart Parking
System (SPS) architecture using ultrasonic detector. Journal of International Journal of Software
Engineering and its Applications 51-58.
http://connection.ebscohost.com/c/articles/80176341/smart-parking-system-sps-architecture-using-
ultrasonic-detector
10. Pär Degerman, Jochen Pohl, Magnus Sethson, 2007, Ultrasonic Sensor Modeling for Automatic Parallel
Parking Systems in Passenger Cars. Journal of SAE Technical Paper 2007-01-1103, 2007,
doi:10.4271/2007-01-1103. http://papers.sae.org/2007-01-1103/

11
Appendix 1: Code for Project

You might also like