The nokia 5110 is a marvelous device, atleast when it comes to electronics enthusiasts.Mainly because it’s display can be operated by the arduino boards fairly easily.
In this post,I will show you how I made and oscilloscope with one such display…Enjoy..
INTERFACING THE LCD WITH ARDUINO
For this project I made use of the arduino nano board,the first step was to connect the LCD display to the arduino board and install suitable libraries on arduino so as to control it properly.
This is the part I found it difficult,when making an oscilloscope you need to have good refresh times of the display.Many of the libraries I tested gave me poor refresh rates,but nonetheless I did manage to find suitable libraries for this project, which are listed below
- Adafruit Pcd8544.h
- Adafruit Gfx.h
after making suitable connections and installing libraries you can run an example code bundled with the library to see if everything is working correctly
For controlling the x and y axis I made use of 3 potentiometers connected to 3 analog pins of the arduino forming a potential divider.The arduino samples the analog Input and it is mapped between 0 and 1000 and used the scale the axes.
X-axis(Time per division)
- The x axis was controlled with 2 potentiometers,
- One is used to set the range of time/division and the other is used to fine tun the range of time/division.
Y-axis(Volt per division)
- I used a double potentiometer for volts per division
- One of the potentiometer divides the Input voltage and feeds the divided input into an analog pin of arduino.I am dividing the Input to measure voltages above 5 volts as analog pins of arduino can measure only upto 5 volts
- The other potentiometer gives position of the above potentiometer nd hence we can calculate max voltage it can measure
download code: https://github.com/anuragmd/oscilloscope
- Adafruit Pcd8544.h https://github.com/anuragmd/libraries/tree/master/Adafruit-PCD8544-Nokia-5110-LCD/Adafruit-PCD8544-Nokia-5110-LCD-library-master
- Adafruit Gfx.h https://github.com/anuragmd/libraries/tree/master/Adafruit-GFX-Library-master
- Code https://github.com/anuragmd/oscilloscope