Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • 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
  • 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.

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Power Efficiency
Discover proven strategies for power conversion, wide bandgap devices, and motor control — balancing performance, cost, and sustainability across industrial, automotive, and IoT systems.

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.

  • Lighting bus needed: 2kW at 40Vdc
  • Interfacing Flash chip to FPGA
  • Current sense transformer with Phase Shift Full Bridge
  • Regarding the element values for the cascode current mirror used in the DAC.
  • What to study as a Mechanical Engineer getting into RF?

RSS Electro-Tech-Online.com Discussions

  • strange laptop problem
  • JLCPBC are using a different shipping company = less $$$$$$$$
  • Manually actuate fuel tank selector solenoid
  • Help please! BLDC driver circuit using the IR2136s and the STP80NF06 MOSFETS
  • need two ICs

Featured – Real Time Hardware Filter Design

  • Practical implementation of bandpass and band reject filters
  • Practical application of hardware filters with real-life examples
  • A filter design example
  • Types of filter responses
  • What are the two types of hardware filters?
  • What are hardware filters and their types?

Recent Articles

  • GigaDevices introduces 32-bit MCUs with integrated DSP and FPU support
  • Grinn introduces 8-core SBC supporting AI-ready embedded development
  • EPC’s 100 kHz BLDC inverter supports high-efficiency motion control
  • Melexis announces 5 W smart driver to supports sensorless FOC operation
  • STMicroelectronics’ motion sensor simplifies industrial IoT system design

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • 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
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • 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
  • Guest Post Guidelines
  • Advertise
  • Subscribe