Average Ticker

Make Your Own Nokia 5110 Raspberry Pi Add-on Board

Nokia 5110 home made Raspberry Pi add on boardMy homemade Nokia 5110 add-on board - made with the ProtoPal

Who remembers the Nokia 5110? If you’re too young to have had one, it was a great phone – a bit of a game changer some might say. The battery lasted a decade, it was tough as nails and one of the first mobiles to include swappable faceplates and the infamous ‘Snake’ game.

 
1998 was a long time ago now, so even the most vintage retro sorts aren’t rocking a 5110 anymore. It’s well and truly a redundant device.
 
So – what to do with all those knackered old phones?
 
Well, some clever sort decided that recycling the screens for electronics projects would be a good idea. And it was! You can now get these PCB mounted 5110 LCDs for very little online and are really easy to code.
 
My only issue was that they’re mostly designed to be used on a breadboard. That works fine but I prefer something quick and tidy that I can grab when I want to play with coding – so I’ve used one of my ProtoPal prototyping boards to make a home-made 5110 add-on board for my Raspberry Pi.
 
Read on my friends!
Parts
 
This was a cheap and easy little project, including just a few readily available parts:

 – Nokia 5110 Module
 – ProtoPal Prototyping Board
 – Insulated Wire
 – Solder
 – Soldering Iron

Method

One of the reasons I’m using my ProtoPal board is because it has a breadboard style layout. What this means is that (like a breadboard) the prototyping pads are laid out in connected lanes – which makes adding components very easy:
Protopal prototyping board

Breadboard style prototyping boards are very easy to use

I’ll simply be soldering the Nokia 5110 module to a set of 8 lanes, and then connecting those lanes the the relevant GPIO pins. Easy!

Now there are lots of these modules around and some may have slightly different pin layouts. Here a shot from my Makers Notebook of the diagram I made myself to show which GPIO pin goes where, but check yours just in case it’s different!

5110 pin mapping in my notebook

I added the GPIO pins/names in my notebook for easy reference


Building The Board

First, I will be working out where to add the screen and identifying where I need to be soldering the GPIO connecting wires. You may have expected me to fit the screen first then build on that, but in order to keep things tidy, I’m soldering the connections underneath the screen itself.

I used my new Makers Notebook to make a record of the pin mapping from my earlier breadboard prototype:

Nokia 5110 pin mapping for Raspberry Pi GPIO

I mapped the pin numbers in my notebook whilst breadboarding the project

 

Then I lined up the screen on the ProtoPal board:
Nokia 5110 screen on a ProtoPal Board

With the soldered wires under the screen, the whole thing looks nice and tidy

 
I decided to fit the screen in the middle of the ProtoPal board, which gives me the flexibility to add buttons or LEDs later on.

Next I stripped some wire ready for soldering to the board. This will connect the pins on the screen module to the GPIO breakout section on the Prototyping board:

Stripping wire for prototyping

I used my teeth – I’d suggest getting the proper tools!

These wires need a new home. The next step was to make a note of where the screen pins would enter the board, and attach a wire to the same lane for each pin. 8 pins – 8 wires:

Prototyping wires soldered to the ProtoPal board

The wires soldered to the middle of a lane of pads, to connect to the screen later.

Those wires will be useless unless they connect the screen to the GPIO, so the next step is to do just that.

With a note of the GPIO pin for each wire, I connected them one by one to the GPIO breakout section on the board:

Cut prototyping wires

Cut each wire to roughly the right length, then solder.

Soldered 5110 prototyping board

All wires soldered – now to add the 5110 screen


Before I went ahead and soldered the Nokia screen permanently, I wanted to check everything fitted well.
 
Pushing the screen pins into place highlighted that the screen module would sit at an odd angle due to the lack of supports. Not a problem – we can fix this by simply glueing the plastic part of a header to the rear of the screen:
5110 screen lacking lower support

The screen had no upper support…

Glue the plastic part of a header to add support

…so I added the plastic from a header with a bit of super glue…

5110 prototyping board support

…and now it sits straight!


With the support in place, I soldered the screen module in line with the wires to complete the hardware side of this project:

Screen soldered to ProtoPal

With the soldered wires under the screen, the whole thing looks nice and tidy

Fire It Up!
 
With the prototyping board ready, I attached it to my A+ Raspberry Pi and plugged in the power. Initially the screen will be lit but nothing will be displayed – that will be driven by the code in the next section.
5110 Nokia Screen Backlight

The text is added by the Python code in the next step

 
Prepare Your Pi


Setup and installation was as easy as a few commands in terminal. First, make sure you have the GPIO library installed:

 sudo apt-get install python-pip  
 sudo pip install RPi.GPIO  

Then install git and download the packages required:

 sudo apt-get install git  
 git clone https://github.com/adafruit/Adafruit_Nokia_LCD.git  

Next we install the Python Imaging Library:

 sudo apt-get install python-imaging  


Lastly, run the install file:

 cd Adafruit_Nokia_LCD  
 sudo python setup.py install  


Now before we go any further, and as per the Adafruit instructions, make sure you enable spi on your Raspberry Pi first (or check that it is enabled):

Run the following command to edit the blacklist file:

 sudo nano /etc/modprobe.d/raspi-blacklist.conf  

Then make sure the bcm2708 line has a ‘#’ at the start, to stop it being blacklisted:

 #blacklist spi-bcm2708  


Test Code Examples

With the screen and Pi ready for action, it was time to use some example code to test that everything was working.

A quick look in the directory showed the ‘examples’ folder with some test scripts. Here’s a funny one that uses an image of a quirky little cat:
I can haz LCD preview image on 5110 screen

There’s a whole site dedicated to these kind of images!

 
Do Your Own Thang’
 

What’s the point of all this if we don’t learn a bit of code eh?

After trying out the various examples, I went ahead and dipped my ‘average’ toe into the example scripts, to try and figure out how they worked and the various options.

I ended up downloading the ProtoPal font from Fontzone.net, adding it to the supporting directories, then adding my own text to the display as a bit of a show piece.

It was reasonably easy (find how it references to the existing font > change it to direct the code to your font) and I think I’ve only really touched the surface with this screen as I’ve seen lots of different usage examples on the internet:

Nokia 5110 home made Raspberry Pi add on board

Just the start – a quick example using a downloaded font file

Summary

This was an enjoyable, simple and easy project but with a very useful outcome. A little soldering, a little code – but nothing too stressful!

I can now grab my home-made Nokia add-on board and push it on to my Pi whenever I want – without the mess and time-consumption that comes with breadboards and jumper cables. Prototyping boards are great for this kind of thing.

If you would like to do something similar, the good chaps at Pimoroni will do you the Nokia module for £10.50 and also now sell my ProtoPal boards at a great price.

Average Man

6 Comments on "Make Your Own Nokia 5110 Raspberry Pi Add-on Board"

  1. Nice work way beyond my capabilities but I and definitely keep to mess around with something like this

  2. Ed Brunelle | 01/08/2015 at 08:16 | Reply

    Know nothing about python, trying to learn. When I try to execute the “sudo python setup,py install” it dumps a screen full of messages, grabs a package called “spidev.3.1.tar.gz” starts processing it and punts out in spidev.c with an “unable to find file Python.h”. That file exists in /usr/lib/pypy_upstrean/includes. I have no idea who is calling gcc to generate this error. Can anyone help me? These are in essence the adafruit instructions so that should fail also.

    • Well Ed, I’m with you, that all sounds quite confusing! Not had that before myself.

      Did you follow the other steps in exactly the same way? Did you start with a fresh Raspbian image that hasn’t been touched before?

      Failing that – I always suggest the official Raspberry Pi forums – that place is full of brain boxes that will no doubt know what your problem is.

      Sorry I can’t be much help.

  3. Steve Fox | 20/03/2016 at 22:11 | Reply

    I have been trying to find a decent font for the 5110, most TTFs look ragged on the display. Your ProtoPal font looks better but I cannot find on Fontzone.net.
    Is there anywhere else I can download it from?

    Thanks,
    Steve

  4. Steve Fox | 21/03/2016 at 22:45 | Reply

    Sorry for answering my own question but I eventually found a built-in font that was suitable.

    For reference I added these lines which gave large and small fonts:
    fontL = ImageFont.truetype(‘/usr/share/fonts/truetype/freefont/FreeSans.ttf’, 24)
    fontS = ImageFont.truetype(‘/usr/share/fonts/truetype/freefont/FreeSans.ttf’, 12)

    Thanks for the clear instructions which enabled me to get the display running in the first place.

    Steve

Leave a comment

Your email address will not be published.


*


This website uses cookies. Please visit our privacy policy page for more information. Privacy policy

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close