Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Nextion Touch LCD 2.4": Examples, Pinouts, and Specs

Image of Nextion Touch LCD 2.4"Design with Nextion Touch LCD 2.4" in Cirkit Designer

Introduction

The Nextion Touch LCD 2.4" is an intelligent Human Machine Interface (HMI) solution that provides a control and visualization interface between a human and a process, machine, application, or appliance. It is a standalone device that includes an onboard processor and memory for the creation of custom user interfaces. Common applications include IoT devices, DIY electronics projects, industrial controls, and consumer electronics.

Explore Projects Built with Nextion Touch LCD 2.4"

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Arduino Nano Controlled TFT Display with Multiple Pushbuttons: A project utilizing Nextion Touch LCD 2.4" in a practical application
Arduino Nano Controlled TFT Display with Multiple Pushbuttons

This circuit features an Arduino Nano microcontroller connected to a ST7735 128x128 1.44 TFT I2C Color display and multiple pushbuttons. The display is interfaced with the Arduino via digital pins for control signals and SPI pins for data transfer. The pushbuttons are connected to various digital and analog input pins on the Arduino, likely intended for user input to control the display or other functions within the code.

Open Project in Cirkit Designer
Image of Arduino Mega 2560 Controlled Automation System with 8-Channel Relay and Nextion Touch LCD Interface: A project utilizing Nextion Touch LCD 2.4" in a practical application
Arduino Mega 2560 Controlled Automation System with 8-Channel Relay and Nextion Touch LCD Interface

This circuit is centered around an Arduino Mega 2560, which controls a Nextion Touch LCD for user interface and a series of relays for switching various loads. The Arduino is powered by a 9V SMPS, and it drives an 8-channel 5V relay module to control devices like pumps, a loudspeaker, actuators, a heating plate, and a plucker. The relays are interfaced with solid-state relays (SSRs) and a thermistor for temperature sensing, enabling controlled power distribution to the connected devices based on programmed logic and user input.

Open Project in Cirkit Designer

Technical Specifications

General Features

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 +5V Power supply (4.75V to 7V)
2 TX Transmit pin for UART communication
3 RX Receive pin for UART communication
4 GND Ground

Usage Instructions

Integration with a Circuit

  1. Power Supply: Connect the +5V and GND pins to a stable 5V power source.
  2. Serial Communication: Connect the TX and RX pins to a microcontroller or other UART interface. Ensure that the TX pin of the Nextion is connected to the RX pin of the microcontroller and vice versa.
  3. Programming: Use the Nextion Editor to design the user interface and upload it to the Nextion LCD via a micro USB cable.

Best Practices

Example Code for Arduino UNO

#include <SoftwareSerial.h>

// Define the Nextion RX and TX pins
#define NEXTION_RX 10
#define NEXTION_TX 11

// Initialize the Nextion display
SoftwareSerial nextion(NEXTION_RX, NEXTION_TX);

void setup() {
  // Set the baud rate for the Nextion display and the Arduino serial monitor
  nextion.begin(9600);
  Serial.begin(9600);
}

void loop() {
  // Check if data is available to read from the Nextion display
  if (nextion.available()) {
    String message = nextion.readString();
    Serial.print("Message from Nextion: ");
    Serial.println(message);
  }

  // Check if data is available to read from the serial monitor
  if (Serial.available()) {
    String command = Serial.readString();
    nextion.print(command);
  }
}

Troubleshooting and FAQs

Common Issues

FAQs

Q: Can I use the Nextion display with a 3.3V microcontroller? A: Yes, but a logic level converter is recommended to match the voltage levels for reliable communication.

Q: How do I update the user interface on the Nextion display? A: Use the Nextion Editor to create or modify the user interface and upload it to the display via a micro USB cable.

Q: What is the maximum length for serial communication cables? A: It is recommended to keep the cable length as short as possible, ideally less than 2 meters, to prevent signal degradation.

For further assistance, consult the Nextion community forums or contact technical support.