Nokia 5110 LCD Display Setup For Raspberry Pi Guide

Nokia 5110 LCD Display Setup For Raspberry Pi Guide

The Nokia 5110 LCD Display seems a perfect fit for the Raspberry Pi as the screen can be connected directly. So here is a guide on how to set one up with details on how to hookup and install libraries. Also included is an example Python program in addition to the code examples included with the libraries.

In many cases, it is probably not necessary to fit a display to the Raspberry Pi powered robot vehicle. However, having an onboard display can widen experimentation. Thus you can view the feedback without taking your eyes off the robot during manoeuvres. And since I’m using a Raspberry Pi compatible game controller, there are spare buttons that can be used to operate a menu system within the display.

With my robot projects, I am not sure how I am going to use the Nokia 5110 LCD Display yet. So to begin with, I will be looking at getting some feedback from the game controller that controls the robot. I may also create a splash screen to show the robot name and software version on program startup. In any case, having a display available to work with will likely generate more exciting ideas.

Nokia 5110 Display Details

Nokia 5110 LCD Front View
Nokia 5110 LCD Front View

When you search for the Nokia 5110 display on ebay, you might notice slight differences in some breakout boards between sellers. So while the screen itself will be a consistent size, the breakout board is probably not. Furthermore, the pinout order may also be inconsistent between boards. So checking the labels when connecting to the Raspberry Pi is necessary when following hookup guides.

Display Measurements
Display Measurements

3D Printing

However, in case you do not have the screen yet, it should still be possible to design in this screen into a project using approximate measurements. Then make adjustments as necessary to fit the display into the design. Using a CAD, CAM tool like Fusion 360 should make this easy.

Specification

  • Uses Serial SPI (Serial Peripheral Interface).
  • Power supply voltage: 2.7V – 3.3V.
  • Backlight power supply voltage: 3.3V maximum.
  • 45.3mm x 46.7mm (width x height).
  • 84 x 48 dot matrix LCD.
  • Transfer rate up to 4Mbps.
  • No display write lag.
  • Working supply current can be less than 200μA.

Pinout Details

  1. RST – Reset.
  2. CE – Chip Select.
  3. DC – Mode Select.
  4. DIN – Serial Data In (MOSI).
  5. CLK – Serial Clock.
  6. VCC – Supply voltage range between 2.7V and 3.3V.
  7. BL – Backlight 3.3V Maximum.
  8. GND – Ground.

Display Wire connections

Nokia 5110 LCD and Raspberry Pi Wiring Diagram
Nokia 5110 LCD and Raspberry Pi Wiring Diagram

Using jumper wires to connect the Nokia 5110 to the Raspberry Pi should be fine for testing purposes. However, using jumper wires can be prone to accidental sabotage which can damage the Raspberry Pi. Therefore, for a project such as a robot vehicle, I recommend soldering wires directly between the boards. In the case of the Raspberry Pi, you can solder the wires directly to a prototyping Hat.

Backlight

In my circuit, I opted to connect a slide switch and an 80 Ohm resistor to the backlight. The backlight resistor is in addition to the resistors already installed on my particular module.

Note that some LCD modules could have different backlight wiring and powering requirements. You will need to investigate how to use the backlight on a per LCD module bases. There are no guarantees that each Nokia LCD module will have the same backlight wiring and powering requirements.

Nokia 5110 Python Library Installation

For a complete installation guide visit the Adafruit Learn pages, and also check out some of the great products there. Take a look at the Nokia 5110 guide at the following link.

Adafruit Learn – Nokia 5110/3310 LCD Python LibraryLink.

However, here is a quick reminder of the installation steps for those who have installed the libraries before:

Raspberry Pi and Python Setup Summary

Enable SPI using the Raspberry Pi configuration tool. When in the configuration tool menu, navigate to the Interface Options and ‘select’ to find the SPI enable option.

Raspberry Pi Configuration Tool (raspi-config)
Raspberry Pi Configuration Tool (raspi-config)

Execute the following command to open the Raspberry Pi configuration tool at the Terminal command prompt:

Then, after enabling SPI, leave the Raspberry Pi configuration and return to the Terminal command prompt.

Enter the following commands:

Nokia 5110 Example Python Code

With the Nokia 5110 display wired up correctly to the Raspberry Pi, the example Python code can now be used to test the Nokia display. You can find example code in the Adafruit library download files. The Python code will illustrate the minimum lines of code you will need to operate the screen.

Nokia LCD Python Output Example
Nokia LCD Python Output Example

However, I include my example code that will show the display continually updating from the game controller feedback. The Python code for the game controller is from this article; then Python code is added to operate the Nokia display.

You can also get the Python code from GitHub here.

Related Articles

Robot Control with Raspberry Pi and Python

Robot Control with Raspberry Pi and Python – Link.

Pi Wars 2018 Raspberry Pi Configuration

Beginners Guide to Raspberry Pi ConfigurationLink.

Buying Featured Items

The purchase price is going to vary greatly depending on how quickly you want the items. Therefore shop around checking out Amazon, Ebay, Adafruit and local electronic stores.

Adafruit:

  • Nokia 5110/3310 monochrome LCD + extras – Link.

UK Searches:

UK Amazon:

  • Raspberry Pi – Search
  • MicroSD Card – Search
  • Raspberry Pi Compatible Wi-Fi Dongle – Search

US Searches:

US Amazon:

  • Raspberry Pi – Search
  • MicroSD Card – Search
  • Raspberry Pi Compatible Wi-Fi Dongle – Search

On Closing

I hope you find this article useful – Nokia 5110 Display Setup For Raspberry Pi Guide, please like and share.

Leave a Reply

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