5110 lcd module arduino factory

Are you bored by making those projects that don’t grab your interest? And, that’s why feeling demotivated? And are you looking for some interesting project that excites and motivates you? You’re in the right spot. Because, In this tutorial, we’ll interface “Nokia 5110 LCD with Arduino UNO” The Nokia 5110 LCD is one of the devices that are used to display words, numbers, images, etc. The reason to use Nokia LCD is that it’s inexpensive and easily get interfaced with Arduino.

Nokia 5110 is a simple graphic LCD. Initially, it was made to use as a mobile phone screen. The LCD contains the PCD8544 controller in it. Practically, it’s a low-powered controller. This controller was designed to display 48 rows and 84 cols on an LCD screen. The LCD is easy to solder and mount on board. Also, it’s easy to interface with any microcontroller.

Assemble the circuit to interface “Nokia 5110 LCD with Arduino UNO” according to the above-given diagram. Upload the code in Arduino. When you upload the code in it, the Arduino transfers it to the LCD through wires/buses. And, you will see that LCD will display “Hello World”. Use the potentiometer to increase or decrease the light intensity.

In the void setup, initialize the LCD by Lcd.begin(84, 48). Remember, that this 84 and 48 is the dimension of LCD. Then createchar( ) is used to create the character fonts for the LED matrices.

5110 lcd module arduino factory

Here I’ve added a the 5110 LCD to a logger recording data from a BME280 & Tipping Bucket Rain gauge. If the BME  survives in our field environment, this will become a standard configuration for our climate stations. I’m not holding my breath though, as we’ve tested half a dozen RH sensors so far and none of them have gone the distance in high humidity environments that occasionally go condensing.

This year I want to tackle some projects that need live data out, so I’ve been sifting through the many display options available for Arduino. Unlike flashier projects, my goal was to find one that I could add to existing logger builds without sacrificing too much of the multi-year lifespan I had worked so hard to achieve. The low power winner by a fair margin was the Nokia 5110 Liquid-crystal Display  which you can pick up for around $2 from the usual sources. With the back-light off these displays pull between 100-400 μA, depending on the number of pixels turned on.

This screen uses a PCD8544 controller and the SPI protocol.  It will tolerate 5V, but it works best at 3.3V, which is perfect when you are driving it from an 8mhz ProMini. Each pixel on the display is represented by a single bit in the PCD8544’s RAM. Each byte in RAM correlates to a vertical column of 8 pixels. The X coordinate works on a per-pixel basis, and accepts values between 0 and 83. The Y coordinate accepts values of 0 – 5 which on this 48 pixel high screen, corresponds to 6 “rows of bytes” in the controller’s RAM. So bitmaps can only be displayed on a per row (& column) basis. The display is quite sluggish compared to competitors like the 0.96 I2C monochrome OLED and you have to handle any processing overhead on the Arduino.

This screen’s been around for a very long time, so there’s are a huge number of easy to use, highly functional libraries for Arduino. But they tend to focus on things like speed or endless font options which are not important for most data logging applications. And these libs assume your project can afford to lose up to ⅓ of the available program & variable memory just driving the display. Most also require the hardware SPI lines, but our project needs those for SD cards, which are finicky enough without some pokey LCD gumming up the works: the 5110 maxes out at 4mbps, and this slows the bus significantly .

Those fat libs were non-starters for our project, and I had almost given up on this display when I found Ilett’s Ardutorial offering a bare-bones method more suitable for our resource limited data loggers. If you haven’t discovered Julians YouTube channel yet then you are in for a treat because if Andreas Spiess is the maker worlds answer to Werner Herzog, then Julian is surely their equivalent to Bob Ross.  I don’t know if he’s growing “Happy little trees” with his DIY hydroponics, but I can say that the gentle timbre of his “Gooood morning all” reduces stress faster than a warm cup of Tea.  And his “Arduino sandwiches” are brilliant examples of minimalist build technique.

To make this limited large-number font I first composed a black & white bitmap for each number with a graphic editor, and then loaded that .bmp file into the LCD assistant program as described in this instructables tutorial.  I started with a bitmap that was 11 pixels wide, by 16 pixels high (though you can use any arbitrary size you want – just remember to leave the blank spacer row at the bottom) and for this two-pass ‘sliced-letters’ method I set vertical & little endian encoding in LCD assistant. I then put the top 11 bytes in the Big11x16numberTops[] array & the lower 11 bytes for each number in the Big11x16numberBottoms[] array.

The stuff I posted on Github assumes you are using a standard 6-pin arrangement shown in most Nokia 5110 hookup guides you will find on the web. But once I had that wrangled, I realized that it would be possible to reduce the number pins needed to drive the display.  You will have to tweak that default example by commenting out the RS & CS commands if you implement the pin-power changes I’m suggesting here…

Getting rid of the RESET line is a little trickier. The data sheet says that the RS line must be low while power stabilizes and should then be pulled high within 100ms of power on. Several people create an auto-reset situation by connecting the screens reset to the Arduino’s reset line. Others make the low-high transition with an RC network across the supply for a delayed rising signal. This can even be driven by the DC line (which is low in command mode and high in data mode)

If you use the back-light in the default configuration, the screen can potentially draw up to 80mA (4 white LEDs at 20mA each). The back-light pin is usually connected to a transistor, so you can PWM all 4 LEDs at once for variable lighting control, but the peak currents are still too high for direct pin-powering unless you add some kind of series resistor.  A 10k pot gives you a simpler method to adjust the screen brightness, but I found that a 3k3 series resistor brought the total display current down to ~1mA with decent readability( & blue LEDs are brighter than white).  Adding an in-line slide switch provides a way to completely disable the back-light for long deployments.  With the entire display safely below Arduino’s pin-current limit, you can then power it by writing a driver pin high or low in output mode.

My tests so far have shown reliable operation of pin-powered 5110’s through more than 8000 ‘long-sleep’ power cycles. In applications where I want to display data on the screen on for long periods of time,  I still depower the screen during the new sensor readings. This lets me know when the logger is capturing data and forces a periodic re-synch with the bus. I don’t know how long these displays would run continuously without that step, but I’m sure the coms would eventually go AWOL without some kind of regular reset.

No screen is much use on our project unless it can withstand some bumping around in the real world, and ideally we want one that is dive-able. For several years my go-to solution has been to pot surface mounted LED’s and sensors in Loctite E30CL. I like this epoxy because the slow cure usually sets clear because bubbles have time to rise to the surface without a vacuum treatment. My first attempts looked great the night of the pour, but I got a nasty surprise the following morning. You see I usually mount sensors in small ½-1 inch wells, but the 5110 required a ring more than 2” in diameter. The contraction of the epoxy in this 10mm deep well caused pressure marks on the edges of the screen, and a significant brown spot in the center of the display where the text became inverted.

The next attempt was much more successful, as I built up the epoxy a few mm at a time like the layers of an onion. As each layer hardened, it protected the screen from the contraction of the subsequent layers above.  The trick was to bring the first pour to the base of the pcb, and the second pour to “just barely” cover the surface of the screen. The epoxy penetrates about 1/3 of the way into the display housing but this does not interfere with readability as those edges are invisible under natural lighting conditions. That epoxy is actually under the LCD, in the air gap between the transparent glass LCD sandwich and the white reflector plastic which holds the thin LCD in place between the metal rim and the PCB.  I’ll try future pours at different angles to see if that lets the space under the LCD fill completely. Looking at the epoxy penetration, it’s clear that the black edges in pour #1 were places where the LCD was compressed on both sides, and the brown discoloration was from pressure on top with no support below.

After several builds using the this LCD screen I finally got around to (not counting EEprom.h) And that’s with three copies of the output functions because of the simple 2-pass method I’m using to display the large numbers.  A small price to pay for live data output on our loggers!

5110 lcd module arduino factory

In the file ui.c, there are the binary values of user interface that appears after the the project boots up. Please watch the attached video I have prepared in order to see how to load your custom graphics to your Arduino Project.

The main code of the project is very simple. We need to include the Nokia 5110 library. Next we declare some variables. We initialize the display and we print the ui icon once. Then we read the analog value from the sensor second. All the magic happens in the loop function:

I have attached the code to this Instructable. In order to download the latest version of the code you can visit the project"s webpage: http://educ8s.tv/arduino-soil-moisture-sensor/

5110 lcd module arduino factory

Previously we talked about choosing displays for Arduino. At that time we had no idea that Nokia 5110 Arduino modules are made out of used Nokia 5110 like thrown away phones. After knowing the background story, we really can not suggest this thing to buy. Buying a color LCD, TFT display for Arduino is correct option. Raspberry like single board computers supports high resolution displays and we really want to keep two segments different. If you purchased a basic Arduino LCD at cheap rate then here is Nokia 5110 Arduino wiring, technical details, code. This guide will also give you idea about troubleshooting of common problems.

The above is basic minimum setup enough good for testing, but not good to run more than 10-15 minutes. You should add a 1kΩ resistor between SCE (or CE) and Arduino pin. That is what we have shown in the photographs :

You really need some resisters between the pins of the module and Arduino. VCC supplies the logic circuits inside the LCD and datasheet the supply should be between 2.7V and 3.3V. So it is practical to add a resistor to supply around 3.0V to the module. In a normal state, the LCD will consume about 6 or 7mA. BL is the second voltage supply and is required for the LED backlights. Those LEDs of backlights has no current limiting resistors. In this case also it is practical to add a resistor to supply around 3.0V to the BL pin of the module. 330Ω resistors should work for both of them. Check end voltage with multimeter (we have multimeter using guide for dummies).

You should add a 1kΩ resistor between SCE (or CE) and Arduino pin. The others – SCLK (or CLK), DIN, DC, and RST pins should have 10kΩ resistors. You can lower the values of 10kΩ resistors to 1kΩ resistor if does not work.

Open Arduino IDE. You can install the libraries to make it working from Arduino software user interface. Go to Sketch > Include Library > Manage Libraries. Search with Nokia 5110 on the window which will open. Install Adafruit PCD8544 Nokia 5110 LCD Library. Search with Adafruit GFX and install Adafruit GFX Library. Search with OakOLED and install OakOLED Library. Restart the Arduino IDE. After restart, connect Arduino with computer, go to File > Examples > Adafruit PCD8544 Nokia 5110 LCD library > pcdtest. Upload it and check whether you can see things on Nokia 5110 LCD display.

LCD can appear fade. This depends on how the used LCD was. It is matter of luck. Not all Nokia 5110 LCDs are the same, although they look identical. Even the connector wiring can be completely different. Philips PCD8544 is the LCD driver for this module. Nokia 5110 LCD has 5 control lines and the interface is of the type SPI.

5110 lcd module arduino factory

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.

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.

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.

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 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.

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.

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.

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:

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.

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.

5110 lcd module arduino factory

Consider an example of connecting a Nokia 5110 display to an Arduino, on the basis of which, in the future, you can build interesting projects. The Nokia 5110 display is quite popular, has a low cost, and is capable of displaying not only text, but also images. The screen resolution of Nokia 5110 is 84×48 pixels. This display can be purchased at aaa.kiev.ua.The goal of the project will be to display an image.

The display power supply (Vcc) should be no higher than 3.3V, the same voltage is the maximum for the display backlight (BL). Logic pins can accept 5V logic used in Arduino. 10 kΩ resistors can be included in the display control circuit.

5110 lcd module arduino factory

The Nokia 5110 LCD is very popular among the Arduino tinkerers. These modules are used on wide variety of applications that require some sort of interface or display data to the user.

Nokia 5110 LCD Module can be powered by 3.3V to 5V. But it is recommended to use with 3.3V. It consumes very low power as less than 3mA when no backlight is used.

All necessary functions for the display are provided in a single chip, including on-chip generation of LCD supply and bias voltages, resulting in a minimum of external components and low power consumption.

5110 lcd module arduino factory

The Nokia 5110 is a basic graphic LCD screen for lots of applications. It was originally intended for as a cell phone screen. This one is mounted on an easy to solder PCB.

It uses the PCD8544 controller, which is the same used in the Nokia 3310 LCD. The PCD8544 is a low power CMOS LCD controller/driver, designed to drive a graphic display of 48 rows and 84 columns. All necessary functions for the display are provided in a single chip, including on-chip generation of LCD supply and bias voltages, resulting in a minimum of external components and low power consumption. The PCD8544 interfaces to microcontrollers through a serial bus interface.

5110 lcd module arduino factory

Can use the conductive glue to connect the module with the printed board,without connecting cable.The metal hooks on the module can fix the module on the printed board,which is very easy to install and replace.

A simple but practical Arduino project to automatically water your plants, showing the usage of a 7-Segment Display, a Soild Moisture Sensor, a Temperature Sensor and a Relay.