Arduino Tutorial: Nokia 5110 84×48 LCD display, how to drive with Arduino

Arduino Tutorial: Nokia 5110 84×48 LCD display, how to drive with Arduino


Dear friend welcome to another video. Today we learn how to drive the Nokia 5110 display using an Arduino. I am using an Arduino Mega here, but you can use any Arduino platform you like. Now, about the screen it is up and running, and I have wired it in a small breadboard. This Nokia display is 84×48 pixels resolution as you can see it has a blue backlight and it can display graphics as well as text. I am using a library, I am not writing the code myself and we will see in a few minutes, which library it is and how to use it. This display is really cheap. It costs around 3-4$ You can find it in many places around the web. I can post a link in the description of the video to see where to buy it from and the most important is the low power consumption of this unit. The power consumption is about 10mA if it is fully lit, as it is now But we can remove the backlight and it now draws as little as 0.4mA! But first of all, let’s see how to wire it in our project. Let’s start. The display is 5 by 5 cms long and wide and it has 8 pins in the back that we can connect in our project. The are two ways that we can connect it. I have soldered some header pins here in order to attach it in the breadboard. We have to the attach the first five pins to Arduino and the last three, GND, LIGHT and VCC can go to Ground and VCC We will exactly how. OK, let’s start. I am taking the breadboard here, I will plug the display in and start connecting the wires. First, let’s connect power. The last pin is GROUND. So, pin 8 I take a black wire. Pin 8 goes to GROUND. Next is light Let’s put a green wire Light goes to GROUND. If you want the backlight to be enabled You have to plug the 7th pin of the display to Ground. If you want the backlight to be off you put it in Vcc. I will put it in GROUND because we want backlight. Next, the 6th pin is power, Vcc. That goes here. That will be connected to Arduino 3.3V This display works best with 3.3V. So, in Arduino I plug this to 3.3V output here. So let’s connet Ground as well… Ground from the breadboard goes to Arduino Ground We are ready to connect the 5 wires other than Ground and Vcc. Let’s see. The first pin is RESET. RESET goes to pin 12 of Arduino You can attach any pin but you have to change it in the code afterwards. The next pin is CE. Chip Enable, pin 11 in the Arduino. to pin 2 of the display. Third pin is DC. From pin 10 of the Arduino to third pin of the display. The next pin is named DIN. DIN, pin 9 of the Arduino goes to pin 4 of the display. And the last one CLK. Pin 8 of Arduino goes to pin 5 of the display. We are ready to power it on and see if it is working. Perfect. It is working, as you can see it is very easy. Let’s see the schematic diagram in Fritzing software. Now, let’s see the software side of the project. First of all we have to download the 5110 lcd library in order to use it in our project. We are going to use the LCD5110_Graph library that is made by Henning Karlsen. We can find the library in his website henningkarlsen.com and all we have to do is to click the download link. I will put the link for the library in the description of the video below. Now that the library is downloaded we open it and unzip it. Then we rename it… LCD5110 and cut it and paste it in the Arduino->Libraries folder. Now we are ready to use it and examine one example. I will open up, an example We are going to Files-Examples->LCD5110-Arduino(AVR)->LCD5110_Graph_Demo This is the demo that we saw earlier and this is the code. We only have to do one small change. The RESET pin here is attached to pin 11 of the Arduino and CS to pin 12. In our case it was the opposite. RESET was pin 12 and CS pin 11. So, all we have to do is change this line here. Make this 12 and this 11. And now we press upload and our program will run on Arduino. Let’s see some of its commands. You can see it is very easy. initLCD(), setFont(), it has already some fonts made for us, clrScr(), drawBitmap(), print(), drawRectangle(), setFont(), etc. Now let’s talk about the power consumption of the display. As you can see, when the display is lit The power consumption is 0.43W. The current draw is around 90mA. Now, let’s unplug the backlight and see what happens. When the backlight is of, power consumption drops to 0.38W and curent draw to 80mA. As we said in the beginning the power consumption of the display is 10mA when lit. And when not lit is is around 0.4mA. This USB Voltage Tester can measure current of only 10mA difference. so if I unplug the display completely we won’t see any diference. Let’s try it. Display is off. Power consumption remains the same, because as we said Power consumption with backlight of is only 0.4mA. So, this is the Nokia 5110 LCD display It is a very nice display to use in your project if you want low power consumption and displaying some small graphics and some text. The power consumption is the big advantage of this display and it is very to use because there are many libraries out there to drive this display. Thank you very much for watching this video. Please subscribe to our channel in order to watch the next videos that we going to use with this display and press the like button if you liked it. Of course if you have any comments or questions write them below in the comments. Thank you very much.

100 thoughts on “Arduino Tutorial: Nokia 5110 84×48 LCD display, how to drive with Arduino

  • Great project man, all of your arduino videos are great! You explain everything with so much detail and you talk slowly and clearly! Very good, thank you for a great demonstration!

  • Thank you for the tutorial but the link to the library is a different library than the one you show as there is no link in there for arduino or sketch.

    Thanks Bob

  • An interesting tutorial.  Have tried several others and still don't have my Nokia runniig.

    Wish you would paste you code into the 

  • Excellent tutorial, as are all your other videos. In this tutorial you use 3.3v for the VCC to the display but no level shift chip is used.
    I noticed that Henning Karlson commented on his website that a level shift controller should be used. I am confused and do not want to damage my display. Can you advise me please?
    Keep up with the great work.

  • Dear Sir,

    Thank you for replying so quickly and providing excellent information.
    Please continue to such wonderfully clear and instructive videos as they are so helpful.

    Best regards.

  • or http://www.ebay.com/itm/84-48-84×84-LCD-Module-White-backlight-adapter-PCB-for-Nokia-5110-Arduino-FO-/291356564507?pt=LH_DefaultDomain_2&hash=item43d6345c1b (CHEAPER) 

  • Thank you for sharing with us your experience. The tutorial was for me verry usefull.
    You explain verry well .We waiting more titorials from you ! Succes !

  • Update: The library is now at http://www.rinkydinkelectronics.com/library.php?id=47
    I saw that the breadboard is not really needed to connect the 5110 to the Arduino Mega.  I also figured out how to control the contrast with a 10k pot when running on 5v (although it works perfectly at 3.3v) and the display is too bright. Very good tutorial Sir! I look forward to watching the rest you have so kindly provided. Thank You.

  • Χαίρομαι που εχεις κανει μια πληρη περιγραφή και εγκατάσταση , λειτούργησε άψογα σε arduino nano !

  • Good video. However, the contrast in these displays is poor ,erratic and frustratingly, tends to fade in and out.

  • Φίλε μου….
    Έχεις κάνει καταπληκτική δουλειά!!!
    Απλά δεν ξέρω πως θα βρω κι' άλλα τέτοια δικά σου Video.
    Πάντως, συνέχισε έτσι.
    Μπράβο σου!!!

  • Έχω μία ερώτηση σχετικά με το project της οθόνης NOKIA 5110 και με το πρόγραμμα το Demo.
    Ακολούθησα όλες τις οδηγίες πού περιγράφεις στο Video αλλά δεν μού έπαιξε καθόλου και υποψιάζομαι ότι φταίει το ότι εγώ έχω Arduino uno και εσύ έχεις Mega.
    Παίζει κάποιο ρόλο ή φταίει κάτι άλλο?
    Και αν ναι μπορώ να κάνω κάτι γι' αυτό?
    Συγχώρεσε μου την άγνοια, αλλά είμαι νέος με τα ψηφιακά και δεν τα έχω ακόμα ενώ έχω άριστες σχέσεις με τα RF (Τηλεπικοινωνίες-Πομποδέκτες VHF-UHF κ.λ.π.)
    Και πες μου πού ακριβώς κάνω εγγραφή στο site σου
    Σε ευχαριστώ πολύ για τον χρόνο σου.
    Βαγγέλης

  • Hello my friend,
    I do exactly the same process but i haven't the graphic in the lcd. i use arduino uno,
    Have you a suggestion for me?
    cordially

  • Nice vid, can you tell me how did you connect arduino pin to lcd pin? I need the name of the pin, because mine are in different sorting

  • I was reading somewhere that the 5110 had to run at a 3.3v signal and it might damage running at a 5v signal.

  • good night, good video I loved, I'm from Brazil.
      I doubt, the signals coming from the Arduino is 5v damage the display?
    WHAT should I do to convert them to 3.3v?
    thanks

  • I enjoy your videos. I wish you would have either just changed the pins and left the program the same as it gets confusing to those of us that get confused easy!

  • C:Program Files (x86)Arduino/Distance_Sensor_Nokia.ino:29: undefined reference to `ui'
    collect2.exe: error: ld returned 1 exit status

    Error… what sould i do?

  • Hi was able to do the wiring and also pasted the library under the Arduino library, but when trying to complite the demo on the examples, i get the following error: Arduino:1.6.5 Hourly Build 2015/05/15 04:50 (Windows 8.1), Placa:"Arduino Uno"

    Opciones de compilación cambiadas, reconstruyendo todo

    LCD5110_Scrolling_Text.pde:18:27: fatal error: LCD5110_Graph.h: No such file or directory
    compilation terminated.
    Error de compilación

    This report would have more information with
    "Show verbose output during compilation"
    activala desde Archivo > Preferencias

    Any help will be aooreciated.

    Regards,

  • Please stop recording sound in stereo. As you're moving in front of the microphone narrating and demonstrating, your voice travels all across the place. It's nauseating!

  • you are THE MAN,This is the best Tutorial and very well documented,easy to understand,easy to follow,down to the point,listen ,watch and do and it works with no problems……..THANK YOU………WCH

  • Best video in quality and substance,thank you. One question please: You also made a Video with Mp3 player /Arduino Mega, ……Can you hook this LCD to the project so that it will display music file info such as Title,…etc ?. Again thanks for your valuable Videos.

  • I do everything like a movie, step by step but on my LCD nothing happens 😐 . And I do not understand why ?!? I have a broken display ?

  • hello thank you for your video
    my worry is that the display illuminates but after one minute written noting
    can you help me please

  • Hi and thank you for your video . this is the 10th video i have watched and it is the only one that worked for me …i like the way you simply explain everything.
    keep up the good work……

  • Does this work with other phone displays? I have e bunch of old Nokia phones.

    6230 128×128
    6230i 208×208
    6280 240×320
    N95 8gb 240×320

    Does the same basic wiring principal apply to these other screens or just the one you got there?

  • I always use Due for better performance, becouse Mega has 16 MHz clock speed, and Due has 86 MHz(I think), it's 5 times bigger clock speed!

  • Hi, thank you again for the very good tutorial.
    It didn't work properly for my Arduino Uno R3 : I could only see sometimes the drawings, but they disappared after 1/2 s.
    I found the solution on this link : http://ianlangelectronic.webeden.co.uk/#/lcd-module-0/4569058582

    The way to let it work is to connect the pins with resistors :
    – RST, DC, DIN, CLK : connected with 10 kOhm resistors
    – CE : connected with a 1 kOhm resistor
    – VCC, LIGHT, GND : connected directely with the cable

    That works very well !

  • You need to us either the 4050 level shifter ic, or use current limiting resistors of 10k on the logic pins to prevent damage.

  • Be careful how you connect the backlight. I used resistor which has not enough ohms and got glitched pacmans. Use resistor with greater value and you'll be good.

  • Excelent video, I have a question, You are using an Arduino, it's 5V logic level CPU. The display has 3v3 logic level, internally it has a 5V to 3V3 regulator but logic level remains at 3v3!
    Accordly datasheet, ILI9163C doesn't support 5V logic levels, this mean you need a logic converter, such as CD4050 IC, powered at 3v3 between arduino and display. Why you don't use this ? no risk of screen burn? I Ask because I use the lcd like you show and few hours later the screen turn off sometimes.
    Thank's

  • Hi, Thanks for the video, I made the connections properly rechecked them again. Connections are ok Voltage between GND and VCC is 3.3V DC, Sill no display, I suspected problem with Nokia5110 hence got a new Nokia 5110 still the problem remains, please guide. regards. MM

  • Can you suggest me a way to remove the adafruit logo from the the library, I tried to replace the flower logo with a one of my own, but it was not supported.

  • I try make UV meter but not work for me I have Geekcreit™ UNO R3 ATmega328P Arduino & Nokia 5110 LCD display from banggood. LCD stay light fine but still blank no display.
    I bet cheap Chinese LCD

  • I found http://cyaninfinite.com/tutorials/nokia-screen-for-display/ is worked great with resistors on Nokia 5110 LCD no more blank display.

    I think this video bit wrong without resistors will still blank display.

    Here photo I made it is awesome worked 🙂
    http://i.imgur.com/I2mJYmG.jpg
    http://i.imgur.com/5k99MUd.jpg

  • hello, i have a problem with the display

    every time i upload something my lcd remains blank or just shows sth for 1 second and then go black again.sometime when i push reset it show sth again for 1 second, do you know whats my mistake?

    ευχαριστουμε για τα βιντεο αδερφε

  • It soes not work for me. I connectet everything as shown in the video and after i uplad the cod the diaplay work for ca. 2 sek. and the turns off 🙁 I am getting this error: C:UsersusernameAppDataLocalTemparduino_modified_sketch_277763LCD5110_Graph_Demo.pde: In function 'void loop()':

    C:UsersusernameAppDataLocalTemparduino_modified_sketch_277763LCD5110_Graph_Demo.pde:52:42: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("LCD5110_Graph", CENTER, 0);

    ^

    C:UsersusernameAppDataLocalTemparduino_modified_sketch_277763LCD5110_Graph_Demo.pde:53:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("DEMO", CENTER, 20);

    ^

    C:UsersusernameAppDataLocalTemparduino_modified_sketch_277763LCD5110_Graph_Demo.pde:61:40: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("(C)2015 by", CENTER, 36);

    ^

    C:UsersusrenameAppDataLocalTemparduino_modified_sketch_277763LCD5110_Graph_Demo.pde:62:45: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("Henning Karlsen", CENTER, 42);

    ^

    C:UsersusernameAppDataLocalTemparduino_modified_sketch_277763LCD5110_Graph_Demo.pde:165:43: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("Runtime (ms):", CENTER, 32);

    ^

    I then tought the us port might not deliver enough currrent to power the display so i connect it to the wall charger but the i didn't diaplay anything 🙁

    Can someone help me?

  • Clear explanation on all your videos, thanks! But I am getting an error with this, can you please help?

    Arduino: 1.8.1 (Windows 10), Board: "Arduino Pro or Pro Mini, ATmega328 (5V, 16 MHz)"

    L:DocumentsArduinoLCD5110_Graph_DemoLCD5110_Graph_Demo.ino: In function 'void loop()':

    L:DocumentsArduinoLCD5110_Graph_DemoLCD5110_Graph_Demo.ino:52:42: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("LCD5110_Graph", CENTER, 0);

    ^

    L:DocumentsArduinoLCD5110_Graph_DemoLCD5110_Graph_Demo.ino:53:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("DEMO", CENTER, 20);

    ^

    L:DocumentsArduinoLCD5110_Graph_DemoLCD5110_Graph_Demo.ino:61:40: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("(C)2015 by", CENTER, 36);

    ^

    L:DocumentsArduinoLCD5110_Graph_DemoLCD5110_Graph_Demo.ino:62:45: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("Henning Karlsen", CENTER, 42);

    ^

    L:DocumentsArduinoLCD5110_Graph_DemoLCD5110_Graph_Demo.ino:165:43: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

    myGLCD.print("Runtime (ms):", CENTER, 32);

    ^

    C:UsersUserAppDataLocalTempccpN5Xgf.ltrans0.ltrans.o: In function `loop':

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:46: undefined reference to `arduino_logo'

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:46: undefined reference to `arduino_logo'

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:148: undefined reference to `pacman2'

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:148: undefined reference to `pacman2'

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:139: undefined reference to `pill'

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:139: undefined reference to `pill'

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:142: undefined reference to `pacman1'

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:142: undefined reference to `pacman1'

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:146: undefined reference to `pacman3'

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:146: undefined reference to `pacman3'

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:160: undefined reference to `The_End'

    L:DocumentsArduinoLCD5110_Graph_Demo/LCD5110_Graph_Demo.ino:160: undefined reference to `The_End'

    collect2.exe: error: ld returned 1 exit status

    exit status 1
    Error compiling for board Arduino Pro or Pro Mini.

    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

  • It works too for "blue" LCD variant with PINS RST, CE, DC, Din, Clk,Vcc,BL,Gnd http://embedded-lab.com/blog/wp-content/uploads/2016/01/T7_OP2.jpg but: SCK is Clk, MOSI is Din and CS is CE

    // It is assumed that the LCD module is connected to
    // the following pins:
    // SCK – Pin 8 is Clk my PIN 6
    // MOSI – Pin 9 is DIN my PIN 5
    // DC – Pin 10 — DC my PIN 4
    // RST – Pin 11 — RST my PIN 2
    // CS – Pin 12 is CE my PIN 3
    //
    #include <LCD5110_Graph.h>
    //RST, CE, DC, Din, Clk,Vcc,BL,Gnd
    //D2,D3,D4,D5,D6 and VCC-3,3V, BL-(potentiometer to control backlight)-5V, GND-GND

  • Thanks for the help.
    To sum it up for people here is a connection diagram

    LCD -> Arduino:

    VCC -> Arduino 3.3V

    LIGHT -> Arduino GND (I am going to be using it on)

    GND -> Arduino GND

    CLK (SCLK) -> Arduino pin 7

    DIN (MOSI) -> Arduino pin 6

    DC -> Arduino pin 5

    CE or CS -> Arduino pin 4

    RST (RESET) -> Arduino pin 3

  • The Nokia 5110 was designed for 3v operation, not 5v. Providing 3v from the Arduino as you have done in the video is not a fix because all of the outputs from the Ardy are 5v. Consider using resistors between the Ardy and the Noky, or a Ti CD4050BE level shifter. If you set its VCC and Gnd to 3v, the incoming 5v Ardy outputs will be level-shifted to 3v to the Noky.
    See the following for info on which resistors to use: https://learn.sparkfun.com/tutorials/graphic-lcd-hookup-guide
    See the following info on how to connect a level shifter: https://cdn-learn.adafruit.com/downloads/pdf/nokia-5110-3310-monochrome-lcd.pdf

  • Δοκιμασα να στειλω στην οθονη τη θερμοκρασια απο το ds3231 {myGLCD.print(rtc.getTemp(), LEFT, 0);} και βγαζει σφαλμα. Το εχεις αντιμετωπισει μηπως αυτο και αν ναι πώς το ξεπερασες;

  • Try not to move while recording. Your microphone seems to be recording both left and right channel and with headphones I can hear that you are moving. I don't like that.

  • You have the best instructional videos and not only do I learn from each one I also really enjoy listening to you talk. You have the coolest accent ive ever heard, especially when youre really excited about one of your new cool projects. Thank you and keep up the great work.

  • hello, im using Arduino mega and sparkfun Si 7021 Temp sensor and MPL3115A2 Humidity sensors.
    i have code and run perfectly on my PC
    But i want LCD display connect to it. Please help me how to connect my Arduino with Nokia display
    i use some code from internet but its not working

  • Just to let people know it is possible to use the Nokia 5110 screens without a library using shift-out​.

    https://thecavepearlproject.org/2018/05/18/adding-the-nokia-5110-lcd-to-your-arduino-data-logger/

    That saved me from messing with the hardware SPI bus which we were already using for the SD cards. A secondary benefit is that the code is really lean, on the order of about 250 bytes for the default font after the compile if you already have EEprom.h in the build anyway. The font, however takes up about 500 bytes, and I wanted the smallest possible footprint so that we could add live data output to loggers that are already compile near the memory limits. As it turns out, stuffing those fonts (and some calibration data) into the internal EEprom was pretty easy to do:

    https://thecavepearlproject.org/2018/08/24/tutorial-using-the-arduinos-internal-eeprom-for-fonts-header-data/

  • Thank you for the well explained video, my display doesn't show the pacman, , just random letters, but some of the things are the same as yours.

  • Does it matter where you place the screen on the breadboard? Can it be anywhere or does it have to be in the exact same holes as in the video?

  • Λοοολ σε βλεπω τοσο καιρο! Σημερα καταλαβα οτι εισαι ελληνας! Με το που ειδα τα ελληνικα στον υπολογιστη σκαλωσα ασχημα! Μπραβο πολυ καλη δουλεια!

  • OK so I followed the steps completely (except using arduino nano) screen will light up but nothing happens when I upload 'Graph demo" code? Any suggestions

Leave a Reply

Your email address will not be published. Required fields are marked *