Tag Archives: Nokia 5110 LCD

Arduino UV Meter using the UV30A Ultraviolet Sensor

Ultraviolet rays, also known as UV for short are rays emitted by sun. Due to the depletion of the ozone layer, these rays tend to get to extreme levels that could lead to sunburns etc for those under it, that’s why daily and hourly forecast of the UV index is always available to help people keep track and stay safe. For monitoring purposes, why not own a personal UV meter?

Today, we will build a UV meter using the Arduino and the ultraviolet sensor (UVM30A) with a Nokia 5110 LCD display as the display for the meter. The Nokia 5110 is used to display the UV index which is an international standard unit for the intensity of ultraviolet rays from the sun being experienced in a particular place and at a particular time.

Arduino UV Meter using the UV30A Ultraviolet Sensor – [Link]

DS18B20 Sensor Based Thermometer with Nokia 5110 LCD display

Hi guys welcome to this tutorial. Today we will be building a simple temperature monitor using the DS18B20 sensor with a Nokia 5110 LCD Display and an Arduino mega.

The DS18B20 digital temperature sensor gives a 9-bit to 12-bit Celsius temperature readings and also has an alarm function with nonvolatile user-programmable upper and lower trigger points. The sensor communicates via the 1-Wire communication protocol and thus by definition requires only one data line (and ground) for communication with a central microprocessor. Among the special features of this sensor, is an operational mode in which it can derive power directly from the data line (“parasite power”), eliminating the need for an external power supply line.

DS18B20 Sensor Based Thermometer with Nokia 5110 LCD display – [Link]

Rotary Encoder with Arduino and Nokia 5110 LCD Tutorial

Today we will take a look at using a rotary encoder with Arduino and displaying rotation data on the Nokia 5110 LCD display.

A rotary encoder is an Electro-mechanical device that converts angular position or the rotation of a shaft into analog or digital values. By turning the shaft to the right or left, we either get an increase or decrease in value. One of the major advantage of rotary encoders is the fact that rotation is limitless. If the maximum position, (which is 20 for the particular rotary encoder used in this tutorial) is reached, the device starts the position counting all over again while the Value attached to the position continues to increase/decrease with every turn of the knob in the same direction. This means we could still keep increasing the value associated with turning the rotary encoder so far we keep rotating in the same direction.

Rotary Encoder with Arduino and Nokia 5110 LCD Tutorial – [Link]

Choose The Best Display For Your Arduino Project

Have you ever been unsure which display you should be using in your next project? This tutorial from educ8s.tv will come in handy for choosing the best display for your each and every Arduino project!

There are lots of choices, so let’s talk about each one of them. Basically, you have three types of displays: LCD displays, OLED displays, and E-paper displays.

LCD displays: LCD (liquid crystal display) is the technology used for displays in notebook and other smaller computers. Like light-emitting diode (LED) and gas-plasma technologies, LCDs allow displays to be much thinner than cathode ray tube (CRT) technology. LCD display is a flat-panel display or other electronic visual display that uses the light-modulating properties of liquid crystals.

One of the famous LCD displays is Nokia 5110 LCD display, a basic graphic LCD screen for lots of applications. It was originally intended for as a cell phone screen.


Its controller is a low power CMOS LCD controller which makes it a good choice for low-consumption projects. It uses only 0.4mA when it is on and less than 0.06mA when in sleep mode. You have to use this library and you don’t need more than 8 wires to start using this display. This tutorial video will show you with details how to use Nokia 5110 LCD with Arduino:

A second choice is the OLED displays. OLED is an organic light emitting diode in which the emissive electroluminescent layer is a film of organic compound that emits light in response to an electric current. An OLED display works without a backlight; it can display deep black levels and can be thinner and lighter than a liquid crystal display. Thus, it is provides better contrast than the LCD choice but it becomes a bit more expensive.


One of the newest OLED displays is the color SSD1331 display that can display 65.000 colors. Just download its library from Adafruit and start using it. A video explaining how to use it is available here.

The last type is E-paper displays, that mimic the appearance of ordinary ink on paper.


Unlike LCD or OLED displays, these displays reflect light instead of emitting it. Such displays are great for low power projects since they have the ability to keep the text or the image you had set before for a really long time and without electricity. One of these displays disadvantages that they are absolutely costly compared with other choices, some displays can reach $60!

Color TFT Display ST7735, White OLED Display SSD1306 and 3.5″ Color TFT Display are all mentioned in the tutorial. You should check it out for more details, information, and some hardware offers.

The tutorial concludes with this interactive table based on different criteria, this is ordered progressively by price. You can compare between displays here.


DIY Spectrum Analyser

Alan X has been working on a spectrum analyser project that can show the spectrum visually! He started working with ATTiny85 and kept on updating the project over time.


Alan X used Goertzel’s algorithm with a Hamming window, this algorithm can be used to detect a frequency from sampled data. Here is the preliminary code for a spectrum analyzer:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
// Uses Daniil Guitelson's BGI library
#include "graphics.h" // -lBGI -lgdi32

#define SampleFreq 125000

int main(void)
  int N=250;
  double data[N];
  double samples[N];
  double freq;
  double s;
  double s_prev;
  double s_prev2;
  double coeff;
  double magn;
  int i;

  int gd=CUSTOM, gm=CUSTOM_MODE(700,700);
  initgraph(&gd, &gm, "");

  int X1,Y1,X2,Y2;
  double scale,xmin,ymin,xmax,ymax;

  // Find the maximum and minimum data range

  // Generate samples
  for (i=0;i<N;i++) {
    // Window the data
    // data[i]=samples[i]; // Straight Goertzel - not great
    // data[i]=samples[i]*(0.5-0.25*cos(2*M_PI*i/N)); // Hanning Window
    data[i]=samples[i]*(0.54-0.46*cos(2*M_PI*i/N)); // Hamming Window
    // data[i]=samples[i]*(0.426551-0.496561*cos(2*M_PI*i/N)+0.076848*cos(4*M_PI*i/N)); // Exact Blackman Window

  // Scan frequencies
  for (freq=100;freq<=50000;freq+=100) {
    for (i=0;i<N;i++) {
      // Goertzel


    // Get magnitude
    printf("Freq: %6f Mag: %6.4f\n",freq,magn);

    // Plot data


  return 0;

Daniil Guitelson’s BGI library was also used for the graphics.


Here is the output showing the DC, 3300 Hz, 5700 Hz and 25700 Hz signals:



The next step is to port the code to a suitable Arduino board and to show the results physically. Thus, he used a MicroView OLED display and here it is listening to a 3v 1kHz square wave:



#include <MicroView.h>

// Audio Spectrum Analyser
#define SampleInput A0   // Name the sample input pin
#define BandWidth  500   // BandWidth
#define MaxFreq   4000   // Max analysis frequency
#define Trigger     10   // Trigger to synchronise the sampler 2vpp at 1kHz = 32

// Define various ADC prescaler
const unsigned char PS_16=(1<<ADPS2);
const unsigned char PS_32=(1<<ADPS2)|(1<<ADPS0);
const unsigned char PS_64=(1<<ADPS2)|(1<<ADPS1);
const unsigned char PS_128=(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0);

// Setup the serial port and pin 2
void setup() {
// Setup the ADC
ADCSRA&=~PS_128; // Remove bits set by Arduino library
// Set prescaler
// ADCSRA|=PS_64; // 64 prescaler (250 kHz assuming a 16MHz clock)
// ADCSRA|=PS_32; // 32 prescaler (500 kHz assuming a 16MHz clock)
ADCSRA|=PS_16; // 16 prescaler (1 MHz assuming a 16MHz clock)

uView.begin();// Start MicroView
uView.clear(PAGE); // Clear page
uView.println("Spectrum  Analyser"); // Project
uView.println("0-20 kHz"); // Range
uView.println("agp.cooper@gmail.com"); // Author
uView.display(); // Display
uView.clear(PAGE); // Clear page
delay(2000);// Wait

void loop() {
static byte *samples; // Sample array pointer
static byte *window; // Window array pointer
static int N=0; // Number of samples for BandWidth
static long sampleFreq; // Sample frequency
long freq; // Frequency of interest
float s; // Goertzel variables
float s_prev;
float s_prev2;
float coeff;
float magn;
int i;

if (N==0) {
// Check sample frequency and set number of samples
samples=(byte *)malloc(100);
unsigned long ts=micros();
for (i=0;i<100;i++) samples[i]=(byte)(analogRead(SampleInput)>>2);
unsigned long tf=micros();

uView.setCursor(0,0); // Set cursor to beginning
uView.print("SI: A"); // Sample input pin
uView.print("SF: "); // Sample frequency
uView.print("MF: "); // Max frequency
uView.print("BW: ");// andWidth
uView.print("SN: ");// Number of samples
uView.display(); // Display
uView.clear(PAGE);// Clear page

// Create arrays
samples=(byte *)malloc(N);
window=(byte *)malloc(N);

// Modified Hamming Window
for (i=0;i<N;i++) window[i]=(byte)((0.54-0.46*cos(2*M_PI*i/(N-1)))*255);

// Generate test samples
for (i=0;i<N;i++) {

if (true) {
// Sychronise the start of sampling with data slicer
int a0,a1;
for (i=0;i<N;i+=2) {
if (a1>a0+3) break;
for (i=0;i<N;i++) samples[i]=(byte)(analogRead(SampleInput)>>2);

// Scan frequencies
for (freq=0;freq<=MaxFreq;freq+=(MaxFreq/40)) {
// Goertzel (https://en.wikipedia.org/wiki/Goertzel_algorithm)
for (i=0;i<N;i++) {
// Get magnitude
// Display on MicroView
// Frequency graduations
// Voltage graduations
uView.print("  0");

He then updated the project to work with Nokia LCD, here it is showing the 0-3v 1 kHz square wave signal:


Amazing ideas and projects can be inspired by this project. You can download these files to start your own spectrum analyser!

The full project and detailed information are available at the project page on Hackaday. You can follow it to keep updates with the latest versions.

Weather Station Based On ChipKIT

ChipKIT Uno32 by Digilent is an easy-to-use platform for developing microcontroller-based applications. It uses chipKIT-core development environment and Arduino IDE for compatibility with existing code examples, tutorials and resources. Pin-compatible with many Arduino shields that can operate at 3.3V.
It contains:

  • PIC32MX320F128H processor
  • 128K Flash, 16K RAM
  • Up to 80 MHz operating speed
  • 42 available I/O lines
  • USB or externally powered
  • USB cable required for programming (not included)


This kit is now discontinued and replaced by chipKIT uC32.

By following this tutorial you will be able to build a weather station based on chipKIT and using Bosch BME280 module, a fully integrated environmental unit that combines sensors for pressure, humidity, and temperature in a tiny 8-pin metal-lid LGA package of size 2.5 x 2.5 x 0.93 mm³. This module seems popular due to many features such as its support for standard I2C and SPI interfaces and availability of supporting open-source Arduino libraries.

R-B, the maker behind this project, uses BME280 to read barometric pressure, relative humidity, and temperature measurements then the readings will be sent via I2C bus and finally displayed on a Nokia 5110 LCD.


Hardware Setup:

You will need these parts in order to build this project:

  • ChipKIT Uno32
  • BME 280
  • Nokia 5110 LCD:  It is a 48×84 pixels matrix LCD driven by the low-power PCD8544 controller chip. It is powered by 3.3V and includes on-chip generation of LCD supply and bias voltages, thus requiring minimum external components for its operation. The PCD8544 receives display data and commands from a microcontroller through a serial bus interface.

The complete hardware setup for this project is shown in the following figure:

Connections between chipKIT Uno32, BME280 and Nokia 5110 LCD
Connections between chipKIT Uno32, BME280 and Nokia 5110 LCD

You will need to install the following libraries prior to develop the firmware for this project.


The program displays ambient temperature in Centigrade, humidity in %, and atmospheric pressure in hectopascal (hPa) units.

Weather station displaying temperature, humidity, and pressure shown in hPa unit.
Weather station displaying temperature, humidity, and pressure shown in hPa unit.

Full description of how to connect the modules together, how to set the I2C connection and more detailed information are available at the project page.
Just download the complete program, get the needed parts and you are ready to build your own weather station! You can check other tutorials by R-B here.

Arduino Geiger–Müller counter with LCD display


Bob tipped us with his latest project. It’s a custom Arduino shield able to communicate with a Geiger-Muller counter and display data on a LCD display. The data are displayed in two layouts: bar graph of the pulses in one minute interval and histogram of the gathered data.

In the previous posts I’ve described a simple Geiger–Müller counter and various experiments with this device. Today I would like to present Arduino project to communicate with a Geiger-Muller counter, gather data and present it to the user. The device is based on Arduino Uno, Nokia 5110 LCD and homemade shield.

Arduino Geiger–Müller counter with LCD display – [Link]

Arduino + Thermocouple + Nokia 5110 LCD


abhyu1112 @ instructables.com provides code for thermocouple interface to Arduino and Nokia 5110 LCD display.

This is a connection between arduino mega thermocouple and Nokia 5110 screen to display temperature which ranges till 1000*C. It can be used to measure temperature of engine.

Arduino + Thermocouple + Nokia 5110 LCD – [Link]

Weather Station Project with ATMEGA328P, DHT22, BMP180, BH1750 and a Nokia 5110 LCD

This is an Arduino powered Weather Station Project that can run on batteries for almost a year! In order to achieve that we use a bare ATMEGA328 chip along with some accurate sensors. We use the DHT22 temperature and humidity sensor, a BMP180 barometric pressure sensor, a BH1750 light intensity sensor and a Nokia 5110 LCD display. We use the low power library in order to greatly reduce the power consumption of the project and we disable the lcd display when it is night.

Weather Station Project with ATMEGA328P, DHT22, BMP180, BH1750 and a Nokia 5110 LCD – [Link]