Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

How to display sensor values on a TFT LCD using Arduino: Part II

By Ashutosh Bhatt September 6, 2022

In Part I of this series, we demonstrated how to display analog sensor data (value), such as POT or LM35, on a TFT LCD. A TFT is a thin-film transistor display (typically, a television screen or computer monitor) that’s of much higher quality than a regular LCD display.

In this article, we’ll explain how to display the temperature, humidity, and soil moisture on a TFT LCD. We’ll use a digital humidity and temperature (DHT) sensor for measurement. It’s a smart sensor that detects room temperature and humidity and provides digital readings and value outputs. Arduino will then attain these digital values from the sensor and displays them on the TFT LCD.

The soil moisture sensor we’ve chosen is also an analog sensor. It provides an analog voltage output from 0 to 5V as moisture changes in the soil. Arduino will read the analog voltage and convert it into a digital value to display.

Ultimately, the three parameters — temperature, humidity, and soil moisture — are displayed simultaneously on the TFT LCD.

The circuit diagram of the sensor value (data) display on a TFT LCD using Arduino. The circuit consists of four components including the soil moisture sensor, DHT11, an Arduino NANO board, and a TFT LCD.

Circuit connections
The soil moisture sensor has three interfacing pins: VCC, GND, and A0. Arduino provides the VCC pin with 5V. The GND pin connects to the common ground. The A0 pin is the sensor output pin’s analog voltage. It connects to Arduino’s A0 pin.

The DHT11 also has three interfacing pins: VCC, GND, and OP. Arduino provides the VCC pin with 5V. The GND pin connects to the common ground.  The OP pin connects to Arduino’s D2 pin. The 10K pull-up resistor connects with the VCC and OP pins (as shown).

The TFT LCD has eight pins in total and works on the SPI protocol. Its pins connect with Arduino’s SPI pins.

The circuit is fully powered by Arduino 5V supply output. Arduino receives power from a computer’s USB port, so no additional power supply is needed.

Circuit operation
The soil moisture sensor’s probe detects the soil moisture content. If there’s an increase in moisture content, its resistance decreases. The sensor module provides an analog voltage output corresponding to any change in this resistance (which reflects a change in soil moisture). 

This analog voltage output is read by Arduino and converted into a digital value from 0 to 1023, and then into a percentage between 0 to 100% and an integer number. Next, it’s converted into a string and then an array of characters because the TFT LCD can only display characters.

The DHT sensor provides direct digital values of the room’s humidity and temperature. Both values are also converted into a string and then an array of characters. 

All three values are displayed on the TFT LCD as: 

  • Temperature in oC
  • Humidity in % RH (relative humidity)
  • Moisture in %. 

Again, the values are displayed as characters on the TFT LCD. 

Arduino has a TFT library (“TFT.h”), which is used along with two other libraries (“SPI.h” and “wire.h”).

The Arduino TFT library has direct functions to display the TEXT, graphics, images, etc. It can also display various colors on the TFT LCD. As the TFT LCD works on an SPI, an SPI and wire library are also required.

Software program

An overview of the circuit…

A prototype display showcasing the temperature, humidity, and soil moisture using the DHT11 and soil moisture sensor.

A YouTube video link for this article is available here.

In the next article of this tutorial series, we’ll learn how to measure and display the distance on a TFT LCD using the UDM sensor, HC SR04.

 

You may also like:

  • low power design
    How to optimize Arduino for low power design

  • Sensor value (data) display on TFT LCD using Arduino –…

  • Sensor value display on TFT LCD using Arduino: Part I

  • What is a low power design?

  • How to use a DHT sensor to show humidity and…

  • How to Execute Simple Networking Commands on Windows Operating System…

Filed Under: Electronic Projects, Sensors
Tagged With: lcd, sensors, soilmoisturesensor, tft, thinfilmtransistor, transistor
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Voltage mode pushpull is a nonsense SMPS?
  • Input impedance matching network
  • High Side current sensing
  • The comparison of different Tcl script checkers
  • Reducing "shoot-through" in offline Full Bridge SMPS?

RSS Electro-Tech-Online.com Discussions

  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe