• Skip to main content
  • Skip to primary sidebar

Homemade Circuit Projects

Get free circuit help 24/7

New Projects | Privacy Policy | About us | Contact | Disclaimer | Copyright | Videos | Circuits for Beginners | Basic Circuits | Hobby Projects | Transistor Circuits | LED Drivers 

You are here: Home / Arduino Engineering Projects / How to Interface Cellphone Display with Arduino

How to Interface Cellphone Display with Arduino

Last Updated on January 13, 2019 by Swagatam

caution electricity can be dangerous

In this post we will be learning how to interface Nokia 5110 display with arduino microcontroller and how to display some text, we will also be constructing a simple digital clock and finally we will be exploring graphical capabilities of the Nokia 5110 display.

By  

Nokia was the most popular mobile phone brand across the globe before they jump into smartphone market. Nokia was known for manufacturing robust phones and one of the iconic and most robust of all was Nokia 3310.

Nokia brand made lot of noise across social media and meme started floating around internet and most of the meme was about 3310 model, due to its great durability with hard-core users. Some legit source says Nokia phones even saved some people’s life from bullets.

After the reduction in demand for these models in the market there were lot of displays left unused. Now they are refurbished and launched in market for our customized needs.

If want one for hands-on, you no need to create a mini-nuclear explosion around your area to salvage one from your old Nokia phone 🙂 It is commonly available in E-commerce sites.

Illustration of Nokia 5110 display:

Fun fact: Nokia 5110 display was also used in 3310 model and some more other Nokia phone models too.

Now let’s see how to connect the display with arduino.

Connect Display with Arduino

 

How to Interface Cellphone Display with Arduino

The display is monochrome and it has 84x48 pixels which can display text and even graphics.
The display consists of 8 pins: Vcc, GND, reset, chip select (CS), command select, serial data out, Serial clock and backlight.

The display is designed to work at 3.3V and applying 5V will damage the display, so care must be taken while handling it.

The display has backlight functionality which is commonly in white or blue in colour. 5V is given to backlight with 330 ohm current limiting resistor.

Pins 7, 6, 5, 4 and 3 are connected to the digital pins of the display. It is not mandatory to know how the arduino communicates with display in order to use it; we will add appropriate library files to the arduino software which will take care of the communication between arduino and display.

Now let’s display some text.

Displaying Text

Cellphone Display Displaying Text with Arduino

Before you upload the code you must download the library files and add to your arduino IDE.

•    github.com/adafruit/Adafruit-PCD8544-Nokia-5110-LCD-library
•    github.com/adafruit/Adafruit-GFX-Library

Program for Hello world:

//------------Program Developed by R.Girish--------//
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);
void setup()
{
display.begin();
display.setContrast(50);
display.clearDisplay();
}
void loop()
{
display.setTextSize(1);
display.setTextColor(BLACK);
display.print("Hello world !");
display.display();
delay(10);
display.clearDisplay();
}
//------------Program Developed by R.Girish--------//

If you want to explore more about the coding part, you may take a look at example program, which showcased about graphics, text colour (black/white), test size, text rotation and much more.

Now let’s construct a digital clock.

Circuit diagram for Digital clock:

 

The schematic is same as previous one, only the difference is the two 10K ohm pull-down resistors for setting time are connect to pin #8 and pin # 9; rest of the circuit is self-explanatory.

Program for Digital clock:

//----------------Program developed by R.Girish-------//
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>
Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);
int h=12;
int m;
int s;
int flag;
int TIME;
const int hs=8;
const int ms=9;
int state1;
int state2;
void setup()
{
display.begin();
display.setContrast(50);
display.clearDisplay();
}
void loop()
{
s=s+1;
display.clearDisplay();
display.setTextSize(2);
display.print(h);
display.print(":");
display.print(m);
display.setTextSize(1);
display.print(":");
display.print(s);
display.setTextSize(2);
display.setCursor(0,16);
if(flag<12) display.println("AM");
if(flag==12) display.println("PM");
if(flag>12) display.println("PM");
if(flag==24) flag=0;
display.setTextSize(1);
display.setCursor(0,32);
display.print("Have a nice  day");
display.display();
delay(1000);
if(s==60)
{
s=0;
m=m+1;
}
if(m==60)
{
m=0;
h=h+1;
flag=flag+1;
}
if(h==13)
{
h=1;
}
//-----------Time setting----------//
state1=digitalRead(hs);
if(state1==1)
{
h=h+1;
flag=flag+1;
if(flag<12) display.print(" AM");
if(flag==12) display.print(" PM");
if(flag>12) display.print(" PM");
if(flag==24) flag=0;
if(h==13) h=1;
}
state2=digitalRead(ms);
if(state2==1)
{
s=0;
m=m+1;
}
}
//-------- Program developed by R.GIRISH-------//

Now, let’s discuss graphical capabilities of the display. The Nokia 5110 display has 84x48 pixels, which can show very limited graphics that too in monochrome. It may not be as capable colour displays in smartphones but, it is very useful if we need to display logos or symbol in your project.

Illustration of graphics using Nokia 5110 display:

Popular troll face:

Dr. A.P.J Abdul Kalam:

As we can see that using a monochrome display, still we are able display some photos or logos directly from arduino. We no need any kind of external memory such as SD card.

The process of converting a photo into “C” code is subject of another article, where we will be illustrating step by step process.

If you have any queries, please express through the comment section.

You'll also like:

  • 1.  Password Security Lock Circuit Using 4×4 Keypad and Arduino
  • 2.  How to Control Servo Motor Using Joystick
  • 3.  Simple Digital Water Flow Meter Circuit using Arduino
  • 4.  2.4 GHz 10 Channel Remote Control Switch
  • 5.  Ultrasonic Fuel Level Indicator Circuit
  • 6.  Line Follower Robot Circuit using Arduino

About Swagatam

I am an electronic engineer (dipIETE ), hobbyist, inventor, schematic/PCB designer, manufacturer. I am also the founder of the website: https://www.homemade-circuits.com/, where I love sharing my innovative circuit ideas and tutorials.
If you have any circuit related query, you may interact through comments, I'll be most happy to help!

Primary Sidebar

Calculators

  • 3-Phase Power (15)
  • 324 IC Circuits (19)
  • 4017 IC Circuits (52)
  • 4060 IC Circuits (25)
  • 555 IC Circuits (98)
  • 741 IC Circuits (19)
  • Arduino Engineering Projects (83)
  • Audio and Amplifier Projects (114)
  • Battery Chargers (82)
  • Car and Motorcycle (94)
  • Datasheets (46)
  • Decorative Lighting (Diwali, Christmas) (33)
  • Electronic Components (100)
  • Electronic Devices and Circuit Theory (36)
  • Electronics Tutorial (116)
  • Fish Aquarium (5)
  • Free Energy (34)
  • Fun Projects (13)
  • GSM Projects (9)
  • Health Related (20)
  • Heater Controllers (29)
  • Home Electrical Circuits (102)
  • How to Articles (20)
  • Incubator Related (6)
  • Industrial Electronics (28)
  • Infrared (IR) (40)
  • Inverter Circuits (98)
  • Laser Projects (12)
  • LED and Light Effect (93)
  • LM317/LM338 (21)
  • LM3915 IC (25)
  • Meters and Testers (65)
  • Mini Projects (148)
  • Motor Controller (67)
  • MPPT (7)
  • Oscillator Circuits (26)
  • PIR (Passive Infrared) (8)
  • Power Electronics (34)
  • Power Supply Circuits (77)
  • Radio Circuits (10)
  • Remote Control (48)
  • Security and Alarm (61)
  • Sensors and Detectors (120)
  • SG3525 IC (5)
  • Simple Circuits (75)
  • SMPS (29)
  • Solar Controllers (60)
  • Timer and Delay Relay (53)
  • TL494 IC (5)
  • Transformerless Power Supply (8)
  • Transmitter Circuits (40)
  • Ultrasonic Projects (16)
  • Water Level Controller (45)

Calculators

  • AWG to Millimeter Converter
  • Battery Back up Time Calculator
  • Capacitance Reactance Calculator
  • IC 555 Astable Calculator
  • IC 555 Monostable Calculator
  • Inductance Calculator
  • LC Resonance Calculator
  • LM317, LM338, LM396 Calculator
  • Ohm’s Law Calculator
  • Phase Angle Phase Shift Calculator
  • Power Factor (PF) Calculator
  • Reactance Calculator
  • Small Signal Transistor(BJT) and Diode Quick Datasheet
  • Transistor Astable Calculator
  • Transistor base Resistor Calculator
  • Voltage Divider Calculator
  • Wire Current Calculator
  • Zener Diode Calculator

© 2023 · Swagatam Innovations