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.
– ProtoPal Prototyping Board
– Insulated Wire
– Soldering Iron
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:
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!
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:
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:
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:
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:
With the support in place, I soldered the screen module in line with the wires to complete the hardware side of this project:
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:
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:
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.
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:
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.