The Internet of Things ( IoT) aims towards making life simpler by automating every small task around us. Alerts play an important role in IoT developments to notify the user about something important. It can be either in the form of LCD Display messages, Gmail notifications, LED indication / SMS alerts, or any other form.
In this article, we will learn the interfacing of 20 X 4 LCD Display with NodeMCU using the I2C communication module to display messages regarding the task performed by our IoT projects.
Hardware Components :
The hardware components required for the interfacing are as follows -
They are basically a construction base used for prototyping electronic circuits. #Breadboards allow us to make quick connections between hardware components, without soldering.
Buy Breadboard from here.
Let us understand what is NodeMCU?
NodeMCU ( Node MicrocontrollerUnit ) is an open-source development board for creating IoT project prototypes. It is having integrated support for WiFi connection. Also, it is very cost-efficient as well as consumes less power. It allows us to use it as a micro-controller and manipulate input and output.
Buy Esp8266 from here.
I2C Module :
Let us understand What is the I2C Module?
It has an inbuilt chip that converts I2C serial data to parallel data for an #LCD. Directly interfacing LCD takes a lot of pins on the NodeMCU development board which makes the circuit more complicated. That is why interfacing is done via the I2C module. I2C module consists of four pins - VCC ( Power Supply ), GND ( Ground ), SDA ( Serial Data pin), SCL ( Serial Clock pin ).
Buy I2C Module with LCD from here.
#LCD ( Liquid Crystal Display ) are mainly preferred for multi-segment light-emitting diodes and seven segments.
Buy LCD from here.
Jumper Wires :
Jumper wires are the connecting wires that have connector pins at each end, allowing them to be used to connect the two points without soldering. They typically come in three versions - male-to-male, male-to-female, and female-to-female.
Buy Jumper Wires from here.
USB Cable :
#USB ( Universal Serial Bus ) Cable is used to connect the development boards ( ESP8266 in this case ) to the system ( For eg: Laptops ).
Buy USB Cable from here.
Arduino IDE :
Let us understand What is the Arduino IDE?
Arduino Integrated Development Environment is open-source software that facilitates the development and uploading of codes to the microcontroller. Program written in Arduino #IDE is called Sketch. These Sketch files are saved with the file extension ino.
Click on the link to download the software.
Circuit Connections :
The circuit connections for this interfacing are as follows -
Vin pin of NodeMCU is connected to the VCC of LCD.
GND of NodeMCU is connected to GND of LCD.
D1 pin is connected to the SCL pin of the LCD.
D2 is connected to the SDA pin of the LCD.
Once the hardware connections are completed and the code is written, connect the ESP8266 board to the system via USB cable. Now, upload the code to the board and then run the program.
A message will be displayed on the LCD screen as shown in the above image. This indicates the successful interfacing of LCD with NodeMCU.
Do watch the video given below to get a better idea through practical implementation.
Check the Project working video here - Interfacing 20*4 LCD Display with NodeMCU
Video By - Harshit Gupta
This article gives an overview of #interfacing LCD with NodeMCU to get important messages displayed on the LCD screen. It is the basic interfacing that is used in almost all #IoT projects and developments to track information with just a single glance.
See more projects on NodeMCU :