1.6 nokia 5110 lcd module w blue backlight for arduino free sample
Remember the pre-iPhone days when cell phones had buttons and you only touched that tiny black and white screen if you needed to clean it? Nokia used these little LCDs in their 3310 and 5110 cell phones.
As technology changed, these displays finally found their new place in the world of DIY. Soon they became popular among hobbyists as these displays are small(only about 1.5″), inexpensive, easy to use, fairly low power and can display text as well as bitmaps.
Thanks to the PCD8544 controller’s versatility, it includes on-chip generation of LCD supply and bias voltages which results in low power consumption making it suitable for power sensitive applications. In a normal state, the LCD consumes as low as 6 to 7mA only.
As per datasheet, this chip operates in the range of 2.7 to 3.3 V and has 3v communication levels. So, for any 5V logic microcontroller like Arduino, some sort of logic level shifting is required (otherwise display may get damaged).
If you want to change the backlight of the LCD, just remove the LCD off the board by pushing the metal clips at the back side. When the screen comes off, you will notice the four LEDs soldered around the edges of the display. Just replace the LEDs with desired color LEDs.
There are many versions of these LCD displays that don’t come with any current limiting resistor. This means you have to be careful while connecting power supply to it. As a precautionary measure, you can place a 330Ω current limiting resistor in series with the ‘Backlight’ pin.
The PCD8544 LCD driver has a built-in 504 bytes Graphic Display Data RAM (GDDRAM) for the screen which holds the bit pattern to be displayed. This memory area is organized in 6 banks (from 0 to 5). Each bank contains 84 columns/segments (from 0 to 83). And each column can store 8 bits of data (from 0 to 7). That surely tells us we have
RST pin resets the display. It’s an active low pin meaning; you can reset the display by pulling it low. You can also connect this pin to the Arduino reset so that it will reset the screen automatically.
BL(Backlight) pin controls the backlight of the display. To control its brightness, you can add a potentiometer or connect this pin to any PWM-capable Arduino pin.
Connections are fairly simple. As we are implementing software SPI, we have flexible pin options. You can connect data transmission pins to any digital I/O pin. In our case the serial clock(CLK), serial data(DIN), data/command(DC), chip enable(CE) and reset(RST) pins are connected from pin 7 all the down to pin 3 on Arduino.
But unfortunately, the LCD has 3v communication levels, so we cannot directly connect these pins to the Arduino. We need some protection. This can be done by shifting levels.
One of the cheap and easiest way to shift levels is to add resistors inline with each data transmission pin. Just add 10kΩ resistors between the CLK, DIN, D/C, and RST pins and a 1kΩ resistor between CE.
Finally, The backlight(BL) pin is connected to 3.3V via 330Ω current limiting resistor. You can add a potentiometer or connect this pin to any PWM-capable Arduino pin, if you wish to control its brightness.
The PCD8544 LCD controller has flexible yet complex drivers. Vast knowledge on memory addressing is required in order to use the PCD8544 controller. Fortunately, Adafruit’s PCD8544 Nokia 5110 LCD library was written to hide away all the complexities so that we can issue simple commands to control the display.
To install the library navigate to the Sketch > Include Library > Manage Libraries… Wait for Library Manager to download libraries index and update list of installed libraries.
Filter your search by typing ‘nokia’. There should be a couple entries. Look for Adafruit PCD8544 Nokia 5110 LCD library. Click on that entry, and then select Install.
This library is a hardware-specific library which handles lower-level functions. It needs to be paired with Adafruit GFX Library to display graphics primitives like points, lines, circles, rectangles etc. Install this library as well.
Although the PCD8544 has a built-in GDDRAM for the screen, we cannot read the contents of it. Therefore, it is not possible to manipulate the screen buffer to perform mathematical operations.
As an alternative, the library allocates 504 bytes of memory from ATmega328P as buffer. So, it can manipulate the screen buffer and then perform a bulk transfer from the ATmega328P’s memory to the internal memory of the PCD8544 controller.
This will give you complete understanding about how to use the Nokia 5110 LCD display and can serve as the basis for more practical experiments and projects. Try the sketch out and then we will dissect it in some detail.
The sketch starts by including three libraries viz. SPI.h, Adafruit_GFX.h and Adafruit_PCD8544.h. Next, we need to create an LCD object. This object takes 5 parameters and specifies which Arduino pins are connected to the LCD’s CLK, Din, D/C, CE and RST pin. We also defined rotatetext variable which will make sense a little later.
In setup function: we need to initialize the LCD object using begin() function. We also need to set the contrast of the display using setContrast(value) function with value can be anywhere between 0-100. However, value between 50-60 gives great results.
For displaying text on the screen, we need to set the font size. This can be done by calling setTextSize() and passing font size (starting from 1) as a parameter.
Next, we need to set the font color by calling function setTextColor(). Pass parameter BLACK for the dark background and pass WHITE for bright background. Now before printing the message we need to set the cursor position by calling function setCursor(X,Y).
Pixels on the screen are addressed by their horizontal (X) and vertical (Y) coordinates. The coordinate system places the origin (0,0) at the top left corner, with positive X increasing to the right and positive Y increasing downward.
We can use simple print(" ") or println(" ") function to print the message on the screen just like we print data on serial monitor. Remember, println() will move the cursor to the new line.
In order for the library to perform extremely fast mathematical operations on the screen buffer (more than 100 frames per second), calls to the print functions do not immediately transfer the contents of screen buffer to the PCD8544 controller. A display() command is required to instruct the library to perform the bulk transfer from the screen buffer in the ATmega328P to the internal memory of the PCD8544 controller. As soon as the memory is being transferred, the pixels corresponding to the screen buffer will show up on the LCD display.
For displaying inverted text, we will call setTextColor(FontColor,BackgroundColor) function again. If you are paying attention, you know we passed only one parameter to this function earlier, but now we are passing two parameters. This is possible because of something called function overloading. Function overloading is the ability to create multiple functions of the same name but with different set of parameters. Calls to an overloaded function will run a specific implementation of that function depending upon the parameters passed.
Earlier in this tutorial, we called setTextSize() function to set font size and passed 1 as parameter. You can use this function to scale the font by passing any non-negative integer.
Characters are rendered in the ratio of 5:7. Meaning, passing font size 1 will render the text at 5×7 pixels per character; passing 2 will render the text at 10×14 pixels per character and so on.
The Adafruit_GFX library is responsible for rendering font. By default the mono-spaced font is selected. However, more recent versions of the Adafruit GFX library offer the ability to use alternate fonts. Several alternate fonts come with the library, plus there’s the ability to add new ones.
Numbers can be displayed on the LCD display by just calling print() or println() function. An overloaded implementation of these functions accepts 32-bit unsigned int, so you can only display numbers from 0 to 4,294,967,295.
The print() & println() functions has optional second parameter that specifies the base (format) to use; permitted values are BIN (binary, or base 2), OCT (octal, or base 8), DEC (decimal, or base 10), HEX (hexadecimal, or base 16). For floating point numbers, this parameter specifies the number of decimal places to use. For example:print(78, BIN) gives “1001110”
The print() & println() functions send data to the display as human-readable ASCII text while write() function sends binary data to the display. So, you can use this function to display ASCII symbols. In our example sending number 3 will display heart symbol.
You can rotate the contents of the display by calling setRotation() function. It allows you to view your display in portrait mode, or flip it upside down.
The function accepts only one parameter that corresponds to 4 cardinal rotations. This value can be any non-negative integer starting from 0. Each time you increase the value, the contents of the display are rotated 90 degrees counter clockwise. For example:0 – Keeps the screen to the standard landscape orientation.
In this example, we’re going to try some basic drawings. This sketch demonstrates many drawing functions, including rectangles, round rectangles, circles and triangles. Try the sketch out and then we will dissect it in some detail.
You can draw rectangle on the display by using drawRect() function. The function takes five parameters viz. X coordinate, Y coordinate, Width, Height and color. Actually this function draws hollow rectangle with 1 pixel border. You can draw filled rectangle using fillRect() function.
You can draw round rectangle on the display by using drawRoundRect() function. This function takes same parameters as drawRect() function except one additional parameter – Radius of corner rounding. Actually this function draws hollow round rectangle with 1 pixel border. You can draw filled round rectangle using fillRoundRect() function.
You can draw circle on the display by using drawCircle() function. The function takes four parameters viz. X coordinate of center, Y coordinate of center, radius and color. This function draws hollow circle with 1 pixel border. You can draw filled circle using fillCircle() function.
You can draw triangle on the display by using drawTriangle() function. The function takes seven parameters viz. 3 X & Y coordinates (x0, y0, x1, y1, x2 & y2) of vertices of triangle and color. (X0,y0) represents top vertex, (x1,y1) represents left vertex and (x2,y2) represents right vertex.
This last example shows how to draw bitmap images to the Nokia 5110 LCD Display. This is useful for creating splash screens of company logos, making sprites or just creating fun graphics for displaying information. Copy the following code, paste it into the Arduino IDE and click upload.
To show bitmap image on the Nokia 5110 LCD display we need to call drawBitmap() function. It takes six parameters viz. Top left corner X coordinate, top left corner Y coordinate, byte array of monochrome bitmap, width of bitmap in pixels, height of bitmap in pixels and Color.
But, before we can call the drawBitmap() function, we first need an image to draw. Remember, the screen resolution of Nokia 5110 LCD display is 84×48 pixels, so images larger than that will not display correctly. To get a correctly sized image, you can use your favorite drawing programs like Inkscape, Photoshop, Paint, etc., setting the canvas size to 84×48 pixels.
Once you have a bitmap, it’s time to convert it into an array that the PCD8544 controller can understand. This can be done using two ways: Online method using image2cpp and Offline method using LCD Assistant.
There’s an online application called image2cpp – http://javl.github.io/image2cpp/ which can convert your image into an array. Image2cpp is newer and much more powerful than LCD Assistant (later solution). It will allow you to:
This tool is so powerful that it can work offline as well. Simply save the page to your PC and open it in your browser. Thanks to Jasper van Loenen for his excellent contribution.
The dimensions of your image will populate in Canvas size option under Image settings. If you have selected bigger image than 84×48, change it to 84×48 and select proper Scaling option. You can view the output in Preview section.
Finally, change the most important option – Brightness threshold as per your requirement. Setting threshold will make pixels above this level white and below black. In our case we have set it to 171 to get nice details of Marilyn Monroe.
Once you are satisfied with the outcome, you can proceed generating the data array. Simply select Code output format as Arduino Code and click on Generate code button.
Just for your information, there’s an option called Draw mode. It actually creates image according to the scanning patter of the display. If your image looks all messed up on your display, try changing the mode.
That’s it. The byte array of your bitmap will be generated. You can use the output directly with our example code. Just be sure to name it appropriately. Then call your array inside the drawBitmap() function.
There’s another application called LCD assistant – http://en.radzio.dxp.pl/bitmap_converter/which can convert your bitmap image into data array. It’s not as powerful as image2cpp but still popular among hobbyists.
To start with, you need to convert you image into 84×48 1-bit monochrome bitmap. You can use your favorite drawing programs like Inkscape, Photoshop, Paint, etc. to do it, just like we did in MS paint.
Now, save your file as bitmap. While saving the file choose Save as type : Monochrome Bitmap(*.bmp;*.dib). This will generate 1-bit/binary bitmap image that has only two possible values for each pixel i.e. 0 (black) or 1 (white).
Just for your information, there’s an option called Byte Orientation. It actually creates image according to the scanning patter of the display. If your image looks all messed up on your display, try changing the mode.
That’s it. With your array created, paste it into your code. Just be sure to name it appropriately. Then call your array inside the drawBitmap() function.
By continuing to use AliExpress you accept our use of cookies (view more on our Privacy Policy). You can adjust your Cookie Preferences at the bottom of this page.
We have published quite a number of tutorials using different displays with the Arduino, with the most recent being the tutorial on displaying graphics on all kind of displays with Arduino. For today’s tutorial, we will look into achieving more with displays by implementing a menu based system with the Nokia 5110 LCD display and the Arduino. The menu is one of the easiest and most intuitive ways through which users interact with products that require navigation. From mobile phone to PCs, its applications are endless. Today we will explore how to add this cool feature to your Arduino project.
At the heart of today’s project is the Nokia 5110 LCD Display. The Nokia 5110 LCD is one of the most popular LCD display among makers. It was originally developed for use as a screen for cell phones and was used in lots of mobile phones during the 90’s. The display uses a low power CMOS LCD controller/driver, the PCD8544, which drives the 84×48px graphics display. In a normal state, the display consumes about 6 to 7mA which makes it quite ideal for low power devices. We have published quite a number of tutorials on this display that might help you understand how to drive such a display.
To showcase how to create the menu on a display with the Arduino, we will build a simple demo menu with three pages. To navigate through the menu, we will use 3x push buttons. The first to scroll up, the second to scroll down and the third one to select a highlighted option. The first screen/page of the menu will serve as the home page and will host the options that open the next two screens/pages. The second page will open after the first menu option on the homepage has been selected. Users will be able to change the contrast of the display using the up and down push buttons to increase or reduce it respectively. By pressing the select button, users will be able to go back to the home page. The second option on the homepage displays the third page, where users will be able to turn the backlight of the display on/off by pressing the select item button.
Selecting the last option on the homepage does what it is labeled for, it clears all the previous settings for the contrast and backlight. This is a fun and interesting project which I believe can be very useful to anyone irrespective of your technical know-how level.
To make the schematics easy to follow, a pin map of the connection between the Arduino Uno and the Nokia 5110, which isthe major component, is shown below.
Looking at the schematics, you will see that the push buttons are connected to the Arduino without the common pull-up or pull-down resistors. This is because we will use the Arduino’s internal pull-up resistor. You can read more about using pull-up/down resistors here. If you have any challenges understanding the concept, do reach out to me via the comment section.
With the connections all done, we can now proceed to the code for the project. It might be useful to go over the entire connection one more time to ensure everything is as it should be.
To be fair, the code for today’s tutorial is a little bit complex and while I will do my best to break it down and ensure you understand the basics, it might take you building your own menu to fully grab the concept. The code for today is heavily dependent on two major libraries; The Adafruit GFX library and the Adafruit Nokia 5110 LCD Library. The Adafruit GFX library is probably one of the libraries we use the most in our tutorials. It makes it easy to display graphics and perform simple animations on supported displays. The Nokia 5110 LCD library, on the other hand, reduces the amount of work and code required to interact with the LCD.
We start the code as with other sketches by including all the libraries required for the project which in this case, are the Adafruit GFX and Nokia 5110 LCD libraries.
Next, we declare the pins to which the buttons are connected and also declare all the variables that we will use for the project. I believe the variable name provides enough insight into what each variable stands for.
Next, we write the void setup function. Here we declare all the pins to which the push buttons are connected as inputs and set digital pin 7 as output since the Light pin of the LCD is connected to it. This pin will be used to turn the backlight on/off later on.
After setting the pin modes, we initialize serial communication, initialize the screen, and set the screen contrast to 50 which serves as a default value (to be varied later using the menu buttons) and use the display.display() function to apply the changes.
Next, we write the void loop function. We start the void loop function by calling the drawmenu() function which contains the code to create the menu objects on the screen.
The state of the buttons is then fed into a series of if-else statements which checks which button was pressed and which of the screens is currently being displayed to determine what action is done next. For instance, the first if statement checks if the menu is currently on page 1 and if the up button is pressed. If this is the case, it then checks the position of the menu cursor and adjusts it accordingly.
Go through the schematics one more time to ensure everything is connected as it should be, then connect the Arduino to your computer and upload the code. After a couple of seconds, you should see the menu displayed on the LCD and it should respond to the push buttons when pressed.
That’s it for today’s tutorial. Thanks for reading. While this is certainly not a project that is useful on its own, it will be a fantastic feature to add to your existing or new projects. Feel free to reach out via the comment section with your questions, suggestions, and comments on today’s tutorial. I will try to reply to them as soon as possible.
In this project, I will show you how to interface a Nokia 5110 LCD with Arduino UNO. First, we will see a little bit about the famous Nokia 5110 LCD Module and its LCD Controller PCD8544 from Phillips. Then we will see the steps for Interfacing Nokia 5110 LCD with Arduino UNO board and display some basic text.
In previous Arduino projects, I have interfaced 16×2 LCD Module with Arduino (and other Microcontrollers as well). It is a simple character display module which is good enough for displaying simple alpha – numeric characters.
But if you want to display some custom characters or change the font size of the characters or even display some small graphical images, then you have to look elsewhere (a Graphical LCD to be precise).
The Nokia 5110 LCD Module is one such Graphical LCD Screen, which is now gaining a widespread following among electronic hobbyists and DIY Project builders. The Nokia 5110 LCD is originally developed for use in, well, as you might have guessed, Nokia Cell Phones (originally used in Nokia 5110 Mobile Phone. Hence, the name).
In fact, the iconic Nokia 3310 mobile phone consists of the same LCD screen. As a result, the LCD screen is known as either Nokia 3310 LCD or Nokia 5110 LCD.
The Nokia 5110 LCD is a Monochrome Graphical LCD with a resolution of 84 x 48 Pixels i.e., it contains 48 Rows and 84 Columns. You can control individual pixel on the screen and hence, this LCD Module is suitable for displaying text, graphics and bitmaps.
Coming to the data transfer, a serial interface is used to communicate with the LCD Module and this interface is similar to an SPI interface. The following table shows the Pinout of the Nokia 5110 LCD Module along with pin description.
My Nokia 5110 LCD has a blue backlight. But the module also has some other backlight colours like Red, White and Green. To provide the backlight, the LCD Module has four LEDs on the vertical edges (two LEDs on each edge). There is a dedicated backlight ON / OFF pin.
Behind the wonderful Nokia 5110 LCD, there lies the PCD8544 LCD Controller from Phillips. It is a single chip solution for driving a display of 48 rows and 84 columns.
An important point to remember from the datasheet is related to the power supply. The maximum logic supply voltage is 3.3V. So, proper care must be taken while interfacing with 5V logic level of Arduino.
Now that we have seen a little bit about the Nokia 5110 LCD Module and PCD8544 Controller, let us proceed with interfacing one with Arduino. The first point to consider is the LCD module is at a logic level of 3.3V while Arduino is at 5V.
The first and the easy way is to connect some current limiting resistors between Arduino and Nokia 5110. We need few 10KΩ resistors, a 1KΩ resistor and a 220Ω resistor (for backlight).
The next option is to use 3.3V to 5V logic level converter modules. Simple transistor based bi-directional logic level converters can be used. You need two such boards as each board consists of only four level conversion channels but we need five connections (RST, CE, DC, DIN and CLK).
If you do not have logic level converters, then you can use the above implementation. But I highly suggest you to get a couple of logic level converter modules. The following image shows the circuit diagram for Interfacing Nokia 5110 LCD with Arduino UNO using Logic Level Converter.
The interface between Arduino and Nokia 5110 LCD Module can be implemented through Arduino’s hardware SPI or a software SPI. In this project, I have used the software SPI interface.
Before writing the code, there are a couple of libraries you need to download in order to successfully interface the Nokia 5110 LCD module with Arduino. In the Arduino IDE, go to Tools -> Manage Libraries… option. Search for “PCD8544 Nokia”.
Select the “Adafruit PCD8544 Nokia 5110 LCD Library” and click on install. After successful installation, search for “Adafruit GFX” and install the “Adafruit GFX Library”. This is an additional library and it helps in displaying graphics on the LCD.
The working of the project is very simple. We have to include the PCD8544 as well as the GFX header file in our code. First, declare an object the LCD and initialize it with the pins associated with software SPI.
A simple project for interfacing Nokia 5110 LCD with Arduino is implemented here. Since this just an introduction project, I have displayed a simple text on the LCD. But you can easily extend this basic functionality to display bitmap images, menu interface, etc.
This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.
The listing says that these are new (at the bottom of this listing), these screens are actually recycled/pulled screens from actual Nokia Phones and devices in China. Because of this, there may be small blemishes or imperfections or even nicks. This is unavoidable at this point. This screen has not been manufactured for many years now. We have to take what we can get. Its still a great screen and Vetco Guarantees functionality.
This is LCD Graphics Display is straight forward to hook up and quick to get running with your Arduino or other microcontroller. At only 1.72" x 1.72", this display is easy to integrate into just about any project. The bright blue LED backlight illuminates the display from either edge.
This module requires both 3.3VDC Power and uses 3.3V Logic - To inteface this module with the 5 Volt Logic of an Arduino, we suggest our NTE4050B Non-Inverting Buffer Chip.
QTY: 1 x Nokia 5110 LCD Display for Arduino - Includes solder-on 8-Pin Single-Row header. (Header MAY be pre-soldered depending on which supplier we get these from)
desertcart is the best online shopping platform where you can buy ADRAxX 1.6" Nokia 5110 LCD Module with Blue Backlit for Arduino from renowned brand(s). desertcart delivers the most unique and largest selection of products from across the world especially from the US, UK and India at best prices and the fastest delivery time.
desertcart ships the ADRAxX 1.6" Nokia 5110 LCD Module with Blue Backlit for Arduino to and more cities in Grenada. Get unlimited free shipping in 164+ countries with desertcart Plus membership. We can deliver the ADRAxX 1.6" Nokia 5110 LCD Module with Blue Backlit for Arduino speedily without the hassle of shipping, customs or duties.
desertcart buys ADRAxX 1.6" Nokia 5110 LCD Module with Blue Backlit for Arduino directly from the authorized agents and verifies the authenticity of all the products. We have a dedicated team who specialize in quality control and efficient delivery. We also provide a free 14 days return policy along with 24/7 customer support experience.
Yes, it is absolutely safe to buy ADRAxX 1.6" Nokia 5110 LCD Module with Blue Backlit for Arduino from desertcart, which is a 100% legitimate site operating in 164 countries. Since 2014, desertcart has been delivering a wide range of products to customers and fulfilling their desires. You will find several positive reviews by desertcart customers on portals like Trustpilot, etc. The website uses an HTTPS system to safeguard all customers and protect financial details and transactions done online. The company uses the latest upgraded technologies and software systems to ensure a fair and safe shopping experience for all customers. Your details are highly secure and guarded by the company using encryption and other latest softwares and technologies.