Nokia screen on Arduino
I bought a cheap Nokia 5110 screen off eBay with the intention of playing around with it on the Arduino. There are loads of instructions on how to get this thing working, so I figured it should be pretty trivial. I like to test stuff before I give eBay feedback, so wanted it up and running quickly.
Of course, I then discovered that it’s a 3.3v device, not the ‘normal’ Arduino 5v. Some people seem to be using it at 5v, but the perceived wisdom is that it is not designed for it, and so better not to.
There are a number of ways to get signals from 5v down to 3.3v. The simplest is probably a voltage divider with a couple of resistors; the neatest a buffer IC or level shifter. The best would be to run the Arduino at 3.3v instead. I haven’t got any buffer ICs in my box of bits, but I do have a number of 3v zener diodes that I added on to an order a while back to make up for free shipping.
The Ardiono digital pins can source up to 40mA. I’m no electronics expert, but I’m sure that I will need to limit the current here, so a resistor is required – but what value? Ohms law makes this one easy. There will be 3v drop over the zener diode, so as we started with 5v, there will be 2v over the resistor (the resistor connects to the Arduino pin, then there’s the zener to ground – the output signal is taken between them). Checking the maximum of 40mA, R=V/A, so we need a 2/0.040 = 50Ω resistor minimum to make sure we don’t overload the Ardino. I played safe and went with 100Ω, but I guess you could go quite a lot higher. Measuring the voltage with a multimeter gave just over 3v, and the current was 12mA. Multiplying 100Ω by 12mA gives 1.2v drop over the resistor, which allowing for tolerances is probably correct.
So just to wire it all up, then test. I found a great scrolling message example by Stuart Lewis with wiring instructions and code, although he wired his screen directly with 5v. It looks something like this:
Note the cunning use of jumper cables to stop the zener diode legs from shorting. Uploading the code, it worked first time, which is always good. I can now go and leave some eBay feedback, and try not to spend any more pennies while I’m there! I wonder about a 74HC244 line driver chip…