Monday, April 12, 2021
Home Electrical Upgrade Understanding NodeMCU ESP8266 Nokia 5110 LCD Show Interface

Understanding NodeMCU ESP8266 Nokia 5110 LCD Show Interface

On this tutorial, we are going to learn to interface Nokia 5110 LCD with ESP8266. We can be utilizing the NodeMCU Growth Board to grasp how ESP8266 Nokia 5110 LCD Show interface works, what are the required connections between ESP8266 and Nokia 5110 LCD and likewise show some textual content on the LCD.

Moreover, I’ll present you the right way to regulate the distinction of Nokia 5110 LCD Show utilizing a potentiometer.

ESP8266-Nokia-5110-LCD-Image

If you wish to learn to interface Nokia 5110 LCD Display with ESP32 DevKit Growth Board, then I made a separate tutorial for that. Test it out.

A Transient Word on Nokia 5110 LCD

The PCD8544 LCD Controller primarily based Nokia 5110 LCD Show is a really helpful graphical show with a decision of 84 x 48 pixels. It runs on 3.3V, so, connecting it with ESP8266 received’t be an issue.

It is without doubt one of the easiest show gadgets you’ll be able to interface with ESP8266 and requires a really minimal setup.

Nokia-5110-LCD-Display

To speak with a microcontroller, the PCD8544 Controller makes use of SPI like serial interface. The next picture reveals the pinout of Nokia 5110 LCD Show.

Interfacing-Nokia-5110-LCD-with-Arduino-2

Nokia 5110 LCD with Pinout

Desk beneath accommodates the Pin description of all of the pins of Nokia 5110 LCD. The naming could also be totally different however the interface is similar to SPI. Actually, we can be utilizing SPI peripheral of ESP8266 to attach with Nokia 5110.

Pin Identify Description
RST Reset
CE Chip Allow
DC Information / Command Choice
DIN Information Enter
CLK Clock
VCC Provide Voltage (3.3V)
BL Backlight Provide
GND Floor

NodeMCU ESP8266 Nokia 5110 LCD Interface

As talked about earlier than, the Nokia 5110 LCD has a serial communication interface which has similarities to SPI. Therefore, we have now to determine the SPI Pins of ESP8266 NodeMCU Board. ESP8266 SoC has two SPI Interfaces:

SPI is already used for interfacing SPI Flash on ESP-12E Module. So, we’re left with HSPI. For those who check out the pinout of NodeMCU ESP8266, then GPIO Pins 12 to fifteen are related to HSPI.

NodeMCU-Pinout-Image

HSPI Pin GPIO Pin NodeMCU Pin
HSPI_SCK GPIO 14 D5
HSPI_MISO GPIO 12 D6
HSPI_MOSI GPIO 13 D7
HSPI_CS GPIO 15 D8

On this, we can be utilizing the MOSI, SCK and CS pins. Moreover, there are two pins on Nokia 5110 LCD referred to as RST and D/C. These pins aren’t related to SPI {hardware} and therefore we will use any GPIO pins that are free.

So, the ultimate connections between NodeMCU ESP8266 and Nokia 5110 LCD look one thing like this:

Nokia 5110 LCD NodeMCU ESP8266
RST D2 (GPIO 4)
CE (CS) D8 (GPIO 15)
DC D1 (GPIO 5)
DIN (MOSI) D7 (GPIO 13)
CLK (SCK) D5 (GPIO 14)
VCC 3.3V
BL 3.3V (by way of 220Ω resistor)
GND GND

For those who discover the desk, I additionally talked about that the ‘BL’ Pin of Nokia 5110 LCD, which allows the backlight, is related to three.3V by way of a 220Ω present limiting resistor (simply to be on the secure aspect).

Elements Required

  • NodeMCU ESP8266 Growth Board
  • Nokia 5110 LCD Show
  • 220Ω Resistor
  • Breadboard
  • Connecting Wires
  • 10 KΩ Potentiometer (for setting distinction)

Circuit Diagram

The next picture reveals all the required connections for ESP8266 Nokia 5110 LCD interface.

ESP8266-Nokia-5110-LCD-Circuit

Displaying Textual content on Nokia 5110

Allow us to now see how simple it’s to show textual content on the Nokia 5110 LCD. The ‘Adafruit_PCD8544’ library considerably reduces the complexity of the PCD8544 LCD Controller IC and exposes easy capabilities to the person.

A number of the vital capabilities are:

  • start: To setup SPI interface and initialize the show.
  • show: Replace the show.
  • print: Print / Show textual content on display screen.
  • clearDisplay: Clears total show.
  • setContrast: Set the Distinction degree of the show.
  • setCursor: Set the textual content cursor location

NOTE: Go to github web page of ‘Adafruit_PCD8544’ library for extra data.

Utilizing these and plenty of different capabilities, we will show textual content, ASCII Characters, Customized Characters, Set the scale of Font, Change the Font and so forth.

Moreover, the ‘Adafruit_GFX’ library lets you show primary graphics like particular person pixels, line, circle, rectangle, tringle and so forth.

Code

The next is a straightforward code to show textual content on Nokia 5110 LCD utilizing ESP8266 NodeMCU Board.

ESP8266-Nokia-5110-LCD-Text

Alter Distinction of Nokia 5110

Subsequent, we are going to see the right way to regulate the distinction of Nokia 5110 LCD. We are going to use a ten KΩ potentiometer to set the distinction. First, we are going to show some textual content on the LCD, then we are going to join the POT to ADC Pin of ESP8266.

In this system, we are going to learn the Analog Enter from the potentiometer, convert it to digital worth (utilizing ADC) and map the results of ADC to acceptable distinction worth. It is vitally easy.

It’s one approach to regulate the distinction of the show. You can too use different strategies like push buttons, serial communication and so forth.

NOTE: ESP8266 has solely ADC Channel and its decision is 10 bits i.e., the output of ADC of ESP8266 can be within the vary of 0 to 1023. So, utilizing the Arduino’s ‘map’ perform, we will convert this vary to a extra appropriate vary for distinction (which is 0 to 100).

Circuit Diagram

Connections for adjusting distinction of Nokia 5110 LCD Show utilizing ESP8266 and potentiometer are proven within the following circuit diagram.

Nokia-5110-LCD-Contrast-NodeMCU

Code

The next picture present a decrease distinction setting on Nokia 5110 LCD.

Low-Contrast-Nokia-5110-LCD-NodeMCU

Equally, we will even improve the distinction simply by turning the potentiometer. The next picture reveals a better distinction setting.

High-Contrast-Nokia-5110-LCD-NodeMCU

Conclusion

A easy mission to grasp the right way to interface Nokia 5110 LCD with ESP8266 NodeMCU Board. You discovered the pinout of Nokia 5110 LCD, the connections between ESP8266 NodeMCU and Nokia 5110, how NodeMCU ESP8266 Nokia 5110 LCD Show interface works, the right way to show some textual content on the LCD and likewise the right way to regulate the distinction of Nokia 5110 utilizing a POT.

Leave A Reply

Please enter your comment!
Please enter your name here

Most Popular

Assessing the Benefits of Extremely-wideband Methods By way of Impulse Radios – Technical Articles

Ultra-wideband (UWB) is a short-range wireless communication technology—like Wi-Fi or Bluetooth— that makes use of a really massive relative and/or absolute frequency band to...

High 9 Finest Electrical Garden Mowers in 2021 – Cordless and Battery-Powered

“Right here You Can Discover Finest Electrical Garden Mowers for Each Funds”With electrical garden mowers, sustaining your yard/garden is now not a tiresome chore.They're...

Recent Comments