Close Menu
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
Facebook X (Twitter) Instagram
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn
How To Electronics
  • Articles
    • Learn Electronics
    • Product Review
    • Tech Articles
  • Electronics Circuits
    • 555 Timer Projects
    • Op-Amp Circuits
    • Power Electronics
  • Microcontrollers
    • Arduino Projects
    • STM32 Projects
    • AMB82-Mini IoT AI Camera
    • BLE Projects
  • IoT Projects
    • ESP8266 Projects
    • ESP32 Projects
    • ESP32 MicroPython
    • ESP32-CAM Projects
    • LoRa/LoRaWAN Projects
  • Raspberry Pi
    • Raspberry Pi Projects
    • Raspberry Pi Pico Projects
    • Raspberry Pi Pico W Projects
  • Electronics Calculator
How To Electronics
Home » Interfacing DWIN HMI TFT LCD Display with Arduino
Arduino Projects

Interfacing DWIN HMI TFT LCD Display with Arduino

Mamtaz AlamBy Mamtaz AlamUpdated:February 27, 20244 Comments6 Mins Read
Share Facebook Twitter LinkedIn Telegram Reddit WhatsApp
DWIN HMI LCD Display Arduino
Share
Facebook Twitter LinkedIn Pinterest Email Reddit Telegram WhatsApp

Overview

In this tutorial, we will be Interfacing a 7-inch DWIN HMI TFT LCD Display with Arduino Nano Board. Using this DWIN Display we can control various modules like Relay, Servo Motor, and RGB LED. We will also learn how to create the UI using the DGUS Software.

Before moving ahead, go through the DWIN Getting Started Guide to learn more about the DWIN Display and the method to upload the firmware. Since the DWIN Display has UART Interface, we can communicate with Arduino through Serial Communication. Let’s see how we can build this System.


Bill of Materials

For this project, we need the following components. All these components can be purchased through the given link.

DWIN LCD Arduino Relay Servo LED

S.N.ComponentsQuantityPurchase Links
1Arduino Nano Board1Amazon | AliExpress
2DWIN LCD Display Kit1dwin-global.com
3Servo Motor SG901Amazon | AliExpress
4RGB LED 1Amazon | AliExpress
5Relay 5V Single Channel1Amazon | AliExpress
6Breadboard1Amazon | AliExpress
7Jumper Wires1Amazon | AliExpress
85V DC Power Supply1Amazon | AliExpress




Creating UI using the DGUS Software

DGUS(DWIN Graphic Utilized Software) is a cost-effective GUI software platform developed by DWIN Technology. Based on the K600+ Kernel hardware platform, GUI design, combined with a simple command interface, can be achieved quickly, eliminating the need for complicated programming and expensive development environments.

Download: DGUS Software

Download the DGUS Software from the above link and then extract the folder. Open the extracted folder and run the executable file called ‘DGUS_V7.642.exe‘. A DGUS Window will open. Initially, you need to change to the English language as the Chinese language is set by default.

Now follow the video below to design the UI that we will need in this project.

DWIN LCD Display Tutorial || Create beautiful GUI without programming with DGUS Software
Watch this video on YouTube.

The link for all the files including the DWIN_Set folder, images, ICL files, etc are inside the folder below. You can extract them and use them in your project.

Download: Project File

The Homepage of the final UI looks something like this.

Note:

  • All the images should have a dimension the same as Screen Resolution (Example: 800×480).
  • The images should be named 00, 01, 02, 03, 04 & so on.
  • All the images should be in .bmp format (Use Paint to Convert).
  • The converted images in the DGUS Software should be saved as 32.icl
  • The converted icons in the DGUS Software should be saved as 42.icl
  • Each and every module/units have a different Memory Address (assigned as VP). For example in the above UI, the memory address for Servo=5100, Red LED=5200, Green LED=5300, Blue LED=5400 & Relay=5500.
  • All the firmware files that need to be uploaded or copied to SD Card should be inside the DWIN_SET Folder.

 



Interfacing DWIN HMI TFT LCD Display with Arduino

After creating the UI using the DGUS Software, download the firmware to DWIN LCD Display either using the T5L Download tool or using the SD Card. Follow the previous guide.

Before interfacing please check on the back of the DWIN Module whether the TTL Module is enabled or not. In case its not enabled, solder the terminals to enable the TTL Communication.

Now it’s time to interface the DWIN HMI TFT LCD Display with Arduino Nano Board. Follow the following schematic.

Interfacing DWIN HMI LCD Display with Arduino

Connect the Servo Motor and Relay VCC & GND Pin to Arduino 5V & GND Pin. Also connect the Servo Motor to D3 of Arduino as Servo requires PWM Signal for operation. Connect the Relay output pin to D2 of Arduino. The RGB LED Module is connected to Pin D4, D5, and D6 of Arduino.

Coming to the DWIN LCD Display and Arduino part, UART Serial Communication is required. Therefore connect the TX2, and RX2 of DWIN Display to Arduino RX & TX Pin respectively. Supply the 5V to both Arduino and Display using their respective USB Cable. The GND connection should be common for both Arduino & Display.


Project PCB Gerber File & PCB Ordering Online

If you don’t want to assemble the circuit on a breadboard and you want PCB for the project, then here is the PCB for you. I used EasyEDA to design the Schematic & PCB. The Schematic & PCB Board for DWIN LCD Arduino Interfacing looks something like the below.

The Gerber File for the PCB is given below. You can simply download the Gerber File and order the PCB from ALLPCB at 1$ only.

Download Gerber File: DWIN LCD Arduino

You can use this Gerber file to order high quality PCB for this project. To do that visit the ALLPCB official website by clicking here: https://www.allpcb.com/.

You can now upload the Gerber File by choosing the Quote Now option. From these options, you can choose the Material Type, Dimensions, Quantity, Thickness, Solder Mask Color and other required parameters.

After filling all details, select your country and shipping method. Finally you can place the order.

You can assemble the components on the PCB Board.


Source Code/Program

The code for Interfacing DWIN HMI TFT LCD Display with Arduino is very simple and doesn’t require any library.

Just copy the following code and upload it to the Arduino Board.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
unsigned char Buffer[9];
int red = 4;
int green = 5;
int blue = 6;
int servo = 3;
int relay = 2;
 
void setup()
{
  Serial.begin(115200);
 
  pinMode(servo, OUTPUT);
  digitalWrite(servo, LOW);
  pinMode(red, OUTPUT);
  digitalWrite(red, LOW);
  pinMode(green, OUTPUT);
  digitalWrite(green, LOW);
  pinMode(blue, OUTPUT);
  digitalWrite(blue, LOW);
  pinMode(relay, OUTPUT);
  digitalWrite(relay, LOW);
}
 
void loop()
{
  if (Serial.available())
  {
    for (int i = 0; i <= 8; i++) //this loop will store whole frame in buffer array.
    {
      Buffer[i] = Serial.read();
    }
 
    if (Buffer[0] == 0X5A)
    {
      switch (Buffer[4])
      {
        case 0x51:   //for servo
          Serial.println(Buffer[8]);
          analogWrite(servo, Buffer[8]);
          break;
 
        case 0x52:   //for red
          Serial.println(Buffer[8]);
          analogWrite(red, Buffer[8]);
          break;
 
        case 0x53:   //for green
          Serial.println(Buffer[8]);
          analogWrite(green, Buffer[8]);
          break;
 
 
        case 0x54:   //for blue
          Serial.println(Buffer[8]);
          analogWrite(blue, Buffer[8]);
          break;
 
        case 0x55:  //for relay
          if (Buffer[8] == 1)
          { digitalWrite(relay, HIGH);
            Serial.println("relay on");
          }
          else
          { digitalWrite(relay, LOW);
            Serial.println("relay off");
          }
          break;
 
 
        default:
          Serial.println("Nothing");
          break;
      }
    }
  }
  delay(10);
}

Note: While uploading the code to Arduino Board, disconnect the TX/RX connection. You can connect back again after the code is uploaded.


1
Frame[8]={0x5a, 0xa5, 0x05, 0x82, sensor_H, sensor_L, 0x00, 0x00 }

This is the frame that display sends whenever any button is touched in the display UI. You can check this using by connecting USB-to-TTL Module to DWIN Display pins.

The value sensor_L & sensor_H is the address for any particular command.

For Servo the address is assigned as 5100. Therefore sensor_H=0x51 and sensor_L=0x00. The same command is used for RGB LED Module and Relay Module.


Demo of the Project

After the code is uploaded, you can start testing the entire system. The created UI looks like this and has the option to go into next page by clicking on Servo, LED and Relay.

Click on Servo first. You can slide the Servo Slider to control the Servo Rotation.

Go back to the homepage and click on RGB LED to enter into the next page. You can slide the Red, Green, Blue Slider to control the brightness and intensity of RGB Light. You can also mix colors to generate different color lights.

Go back to the homepage again. Click on Servo Control option from the display. In this mode you can select ON/OFF option to turn on or off the Relay Module.


Video Tutorial & Guide

Using DWIN 7-inch TFT LCD Display with Arduino to Control Relay, Servo & RGB LED
Watch this video on YouTube.

You you want to display the sensor data on DWIN LCD Display and control Home Appliances you can follow the tutorial below.

The project is titled as DWIN Smart Home Controller and you can make it using ESP32.

Similary, using the DWIN HMI LCD Display, we can also build an AC Energy Meter project, which looks like this.

IoT AC Energy Meter with ESP32 & HDMI Display Blynk

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email Reddit Telegram WhatsApp
Previous ArticleGetting started with DWIN HMI TFT LCD Display
Next Article SX1272 Based LoRa USB Dongle Gateway 868/915MHz

Related Posts

DC Energy Meter using Arduino

Build a DC Energy Meter using Arduino – 32V/5A

Updated:August 26, 20252K
Interfacing ADXL375 Accelerometer with Arduino

Interfacing ADXL375 Accelerometer with Arduino (±200g)

Updated:June 28, 2025
PZEM-004T Arduino Energy Meter

DIY AC Energy Meter using PZEM-004T & Arduino

Updated:March 6, 20258K
Interfacing BMI160 Accelerometer & Gyroscope with Arduino

Interfacing BMI160 Accelerometer & Gyroscope with Arduino

Updated:February 2, 20259K
Password Based Door Lock Security System Using Arduino & Keypad

Password Based Door Lock Security System Using Arduino & Keypad

Updated:February 2, 20252436K
Earthquake Detector Alarm with with Accelerometer & Arduino

Earthquake Detector Alarm with Accelerometer & Arduino

Updated:February 2, 2025661K
View 4 Comments

4 Comments

  1. Vlastik on June 24, 2023 8:41 AM

    Hi,
    I had a problem connecting the display to the same serial port as the default serial port. I had to create a new software serial port to make it work. Does anyone know why?

    Reply
  2. Vlastik on June 24, 2023 8:42 AM

    Hey. Hey,
    I had a problem connecting the display to the same serial port as the default serial port. I had to create a new software serial port to make it work. Does anyone know why?

    Reply
  3. Marcio Mello on March 20, 2024 4:41 PM

    I love DWIN displays, they are amazing!
    we work with them for years in our distribution in Brazil (https://victorvision.com.br/)

    Reply
  4. gls on October 8, 2024 3:56 AM

    Try https://github.com/pervu/DWIN2_Display/tree/v1.0.2

    Reply

CommentsCancel reply

Latest Posts
ESP32 Fingerprint Attendance System with Live Web Dashboard

ESP32 Fingerprint Attendance System with Live Web Dashboard

June 21, 2026
IoT Based PM & Air Quality Monitoring System using ESP32

IoT Based PM & Air Quality Monitoring System using ESP32

June 14, 2026
DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

DIY ESP32 MLX90640 IR Thermal Camera with Live Web Display

May 10, 2026
IoT Activity Tracker with ESP32 & Accelerometer Gyroscope

IoT Activity Tracker with ESP32 & Accelerometer/Gyroscope

May 2, 2026
A Guide to Sourcing Obsolete ICs for Vintage Projects

Beyond AliExpress: A Guide to Sourcing Obsolete ICs for Vintage Projects

April 21, 2026

ESP32 IoT Vehicle Motion Analyzer with MPU6050 & LIS3MDL

April 27, 2026
Building a Smart Sensor Node with a BLE Microcontroller

Building a Smart Sensor Node with a BLE Microcontroller

February 26, 2026
High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

High-Accuracy Pitch, Roll, Yaw with ESP32 & BNO08x IMU

April 27, 2026
Top Posts & Pages
  • ESP32 Fingerprint Attendance System with Live Web Dashboard
    ESP32 Fingerprint Attendance System with Live Web Dashboard
  • ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
    ESP32 CAN Bus Tutorial | Interfacing MCP2515 CAN Module with ESP32
  • LD2410 Sensor with ESP32 - Human Presence Detection
    LD2410 Sensor with ESP32 - Human Presence Detection
  • 12V DC to 220V AC Inverter Circuit & PCB
    12V DC to 220V AC Inverter Circuit & PCB
  • IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
    IoT AC Energy Meter with PZEM-004T & ESP32 WebServer
  • Silicon Controlled Rectifier (SCR): Construction, Working & Applications
    Silicon Controlled Rectifier (SCR): Construction, Working & Applications
  • How to use ADS1115 16-Bit ADC Module with Arduino
    How to use ADS1115 16-Bit ADC Module with Arduino
  • IoT Based Patient Health Monitoring on ESP32 Web Server
    IoT Based Patient Health Monitoring on ESP32 Web Server
Categories
  • Arduino Projects (197)
  • Articles (60)
    • Learn Electronics (19)
    • Product Review (15)
    • Tech Articles (28)
  • Electronics Circuits (46)
    • 555 Timer Projects (21)
    • Op-Amp Circuits (7)
    • Power Electronics (13)
  • IoT Projects (205)
    • ESP32 MicroPython (7)
    • ESP32 Projects (82)
    • ESP32-CAM Projects (15)
    • ESP8266 Projects (76)
    • LoRa/LoRaWAN Projects (22)
  • Microcontrollers (38)
    • AMB82-Mini IoT AI Camera (4)
    • BLE Projects (18)
    • STM32 Projects (19)
  • Raspberry Pi (93)
    • Raspberry Pi Pico Projects (57)
    • Raspberry Pi Pico W Projects (12)
    • Raspberry Pi Projects (24)
Follow Us
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
About Us

“‘How to Electronics’ is a vibrant community for electronics enthusiasts and professionals. We deliver latest insights in areas such as Embedded Systems, Power Electronics, AI, IoT, and Robotics. Our goal is to stimulate innovation and provide practical solutions for students, organizations, and industries. Join us to transform learning into a joyful journey of discovery and innovation.

Copyright © How To Electronics. All rights reserved.
  • About Us
  • Disclaimer
  • Privacy Policy
  • Contact Us
  • Advertise With Us

Type above and press Enter to search. Press Esc to cancel.

Ad Blocker Enabled!
Ad Blocker Enabled!
Looks like you're using an ad blocker. Please allow ads on our site. We rely on advertising to help fund our site.