KY-028 Digital Temperature Sensor Module with Arduino


The KY-028 Digital Temperature Sensor measures the atmosphere temperature changes, it is based on thermistor resistance. This module contains both the digital and the analog outputs, there is a potentiometer to modify the detection threshold on the digital interface.

This module is compatible with popular electronic platforms like Arduino, ESP32, Raspberry Pi, and other microcontrollers. To interface with them and detects the input temperature from the atmosphere and display results on the monitor.

Hardware Required

You will require the following Hardware Components for the Interfacing of the KY-028 Digital Temperature Sensor Module with arduino.

Components#Buy From Amazon
Arduino UNO1Buy Now
KY-028 Digital Temperature Sensor Module1Buy Now
37 in 1 Sensors kitBuy Now
Jumper WiresBuy Now
Breadboard1Buy Now

What is KY-028 Digital Temperature Sensor Module?

The KY-028 Digital Temperature Sensor module is a low-cost sensor module that measures the temperature using a thermistor. It is based on the LM35 temperature sensor. The KY-028 module is a digital temperature sensor that measures temperature from -55°C to 150°C with an accuracy of ±0.5°C. It has three pins for connecting with external devices: VCC, GND, and OUT. The output is in analog form and needs to be converted into digital form for reading by a microcontroller.



This module contains an NTC thermistor, a dual differential comparator LM393, a trimmer potentiometer 3296W, 2 LEDs, 6 resistors, and 4 male header pins. The module features in digital and analog outputs.

Operating Voltage3.3V ~ 5.5V
Temperature Measurement Range-55°C to 125°C [-67°F to 257°F]
Measurement Accuracy±0.5°C
Board Dimensions15mm x 36mm [0.6in x 1.4in]



Pin Configuration

Pin NamePin Type
D0Digital Signal
A0Analog Signal

Circuit Diagram

The following circuit shows you the connection of the KY-028 Digital Temperature Sensor Module with Arduino Please make the connection carefully


Circuit Connections

Connect the analog output (A0) of the module to the A0 pin of the Arduino and the digital output (D0) to pin 3. Then connect the power line (+) and ground (G) to the 5V and GND of arduino respectively.

Pin 2D0
Pin A0A0

Installing Arduino IDE Software

First, you will require to Download the updated version of Arduino IDE Software and Install it on your PC or laptop. if you Learn How to install the Arduino step-by-step guide then click on how to install Arduino Button given Blow


//For more Projects:
int led = 13; // define the LED pin
int digitalPin = 2; // KY-028 digital interface
int analogPin = A0; // KY-028 analog interface
int digitalVal; // digital readings
int analogVal; //analog readings
void setup()
  pinMode(led, OUTPUT);
  pinMode(digitalPin, INPUT);
  //pinMode(analogPin, OUTPUT);
void loop()
  // Read the digital interface
  digitalVal = digitalRead(digitalPin); 
  if(digitalVal == HIGH) // if temperature threshold reached
    digitalWrite(led, HIGH); // turn ON Arduino's LED
    digitalWrite(led, LOW); // turn OFF Arduino's LED
  // Read the analog interface
  analogVal = analogRead(analogPin); 
  Serial.println(analogVal); // print analog value to serial


When the temperature threshold is reached, the digital interface will transmit a HIGH signal switching on the LED on the Arduino (pin 13). Then increase the detection threshold by turning the potentiometer clockwise and decrease the detection of a threshold by turning the potentiometer counter-clockwise.

The analog interface gives back a numerical value that depends on the temperature and the potentiometer’s position.

As the analog output pin is instantly attached to the potentiometer it isn’t likely to use the Steinhart-Hart equation to compute the temperature as we did with the KY-013, we can only utilize this value to calculate relative changes in temperature.


  1. Temperature Monitoring: The KY-028 module can be used for monitoring the temperature in various environments, such as in a room, a greenhouse, or a refrigerator. The temperature data can be used to control heaters or coolers or to alert users if the temperature exceeds a certain range.
  2. Weather Station: The module can be used in a weather station to measure and record the temperature. The data can be collected by a microcontroller and transmitted wirelessly to a base station for further analysis and display.
  3. Medical Applications: The KY-028 module can be used in medical applications to monitor body temperature. It can be integrated into wearable devices like smartwatches and fitness trackers to track the user’s body temperature in real-time.
  4. HVAC Control: The KY-028 module can be used to control the heating, ventilation, and air conditioning (HVAC) system in a building. By monitoring the temperature, the HVAC system can be adjusted to maintain a comfortable temperature for occupants.
  5. Food Industry: The module can be used in the food industry to monitor the temperature of food during storage, transportation, and cooking. It can be integrated into refrigerators, ovens, and other appliances to ensure that food is stored or cooked at the appropriate temperature.

Downloads Files

  • LM393 comparator Datasheet.
  • 3296W-104 trimmer Datasheet.

Leave a Comment