Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Temperature Sensor KY-028: Examples, Pinouts, and Specs

Image of Temperature Sensor KY-028
Cirkit Designer LogoDesign with Temperature Sensor KY-028 in Cirkit Designer

Introduction

The KY-028 is a temperature sensor module designed for measuring ambient temperature. It features the LM35 temperature sensor, which provides an analog output proportional to the temperature in degrees Celsius. The module also includes a digital output that can be triggered when the temperature exceeds a user-defined threshold, adjustable via an onboard potentiometer.

Explore Projects Built with Temperature Sensor KY-028

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-Based Smart Environment Controller with Relay and Sensor Integration
Image of thesis: A project utilizing Temperature Sensor KY-028 in a practical application
This circuit features an ESP32 microcontroller interfaced with various sensors and modules, including an MLX90614 infrared temperature sensor, an HC-SR04 ultrasonic distance sensor, and an LCD display for output. A KY-019 relay module is controlled by the ESP32 to switch an AC source, with a PTC for circuit protection. Additionally, an AC-to-DC converter powers the ESP32 and a fan, indicating the circuit may be used for temperature-based control applications with visual feedback and actuation capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Health Monitoring System with Nucleo WB55RG and OLED Display
Image of Pulsefex: A project utilizing Temperature Sensor KY-028 in a practical application
This circuit is a multi-sensor data acquisition system that uses a Nucleo WB55RG microcontroller to interface with a digital temperature sensor (TMP102), a pulse oximeter and heart-rate sensor (MAX30102), and a 0.96" OLED display via I2C. Additionally, it includes a Sim800l module for GSM communication, powered by a 3.7V LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Based Smart Home Climate Control System with OLED Display and RTC
Image of Temp control: A project utilizing Temperature Sensor KY-028 in a practical application
This circuit is a smart environmental control system using an Arduino UNO. It monitors temperature and humidity with a DHT11 sensor, displays data on an OLED screen, and controls an exhaust fan and air heater via a relay module based on sensor readings. The system also includes a real-time clock for time-based operations.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP8266 NodeMCU with MAX6675 Thermocouple Interface for Temperature Monitoring
Image of UAS Metrin: A project utilizing Temperature Sensor KY-028 in a practical application
This circuit is designed to measure temperature using a Type K thermocouple connected to a MAX6675 module, which digitizes the temperature reading. The MAX6675 module interfaces with an ESP8266 NodeMCU microcontroller over a SPI connection, using D5 (SCK), D6 (SO), and D8 (CS) for clock, data output, and chip select, respectively. The ESP8266 is responsible for processing the temperature data, which can then be used for monitoring, control, or communication purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Temperature Sensor KY-028

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 thesis: A project utilizing Temperature Sensor KY-028 in a practical application
ESP32-Based Smart Environment Controller with Relay and Sensor Integration
This circuit features an ESP32 microcontroller interfaced with various sensors and modules, including an MLX90614 infrared temperature sensor, an HC-SR04 ultrasonic distance sensor, and an LCD display for output. A KY-019 relay module is controlled by the ESP32 to switch an AC source, with a PTC for circuit protection. Additionally, an AC-to-DC converter powers the ESP32 and a fan, indicating the circuit may be used for temperature-based control applications with visual feedback and actuation capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Pulsefex: A project utilizing Temperature Sensor KY-028 in a practical application
Battery-Powered Health Monitoring System with Nucleo WB55RG and OLED Display
This circuit is a multi-sensor data acquisition system that uses a Nucleo WB55RG microcontroller to interface with a digital temperature sensor (TMP102), a pulse oximeter and heart-rate sensor (MAX30102), and a 0.96" OLED display via I2C. Additionally, it includes a Sim800l module for GSM communication, powered by a 3.7V LiPo battery.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Temp control: A project utilizing Temperature Sensor KY-028 in a practical application
Arduino-Based Smart Home Climate Control System with OLED Display and RTC
This circuit is a smart environmental control system using an Arduino UNO. It monitors temperature and humidity with a DHT11 sensor, displays data on an OLED screen, and controls an exhaust fan and air heater via a relay module based on sensor readings. The system also includes a real-time clock for time-based operations.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of UAS Metrin: A project utilizing Temperature Sensor KY-028 in a practical application
ESP8266 NodeMCU with MAX6675 Thermocouple Interface for Temperature Monitoring
This circuit is designed to measure temperature using a Type K thermocouple connected to a MAX6675 module, which digitizes the temperature reading. The MAX6675 module interfaces with an ESP8266 NodeMCU microcontroller over a SPI connection, using D5 (SCK), D6 (SO), and D8 (CS) for clock, data output, and chip select, respectively. The ESP8266 is responsible for processing the temperature data, which can then be used for monitoring, control, or communication purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Environmental temperature monitoring
  • Home automation systems
  • Industrial temperature control
  • Educational projects and prototyping
  • Arduino and microcontroller-based projects

Technical Specifications

Key Details

  • Sensor Type: LM35 Temperature Sensor
  • Operating Voltage: 3.3V to 5V DC
  • Temperature Range: -55°C to +150°C
  • Analog Output Voltage: 10mV per °C
  • Digital Output: High/Low signal based on threshold
  • Dimensions: 32mm x 14mm x 8mm

Pin Configuration and Descriptions

The KY-028 module has four pins, as described in the table below:

Pin Name Description
1 VCC Power supply input (3.3V to 5V DC)
2 GND Ground connection
3 DO (Digital) Digital output pin; HIGH when temperature exceeds the threshold, LOW otherwise
4 AO (Analog) Analog output pin; provides a voltage proportional to the measured temperature

Usage Instructions

Connecting the KY-028 to a Circuit

  1. Power the Module: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. Read Analog Output: Connect the AO pin to an analog input pin on your microcontroller to measure the temperature.
  3. Use Digital Output: Connect the DO pin to a digital input pin on your microcontroller to detect when the temperature exceeds the threshold.
  4. Adjust Threshold: Use the onboard potentiometer to set the temperature threshold for the digital output.

Important Considerations

  • Ensure the power supply voltage matches the module's operating range (3.3V to 5V).
  • Avoid exposing the sensor to temperatures beyond its specified range (-55°C to +150°C).
  • For accurate readings, place the sensor in a stable environment and avoid sudden temperature changes.

Example: Using KY-028 with Arduino UNO

Below is an example code to read both the analog and digital outputs of the KY-028 module using an Arduino UNO:

// Define pin connections
const int analogPin = A0;  // Connect AO pin to A0 on Arduino
const int digitalPin = 2; // Connect DO pin to digital pin 2 on Arduino

void setup() {
  Serial.begin(9600);       // Initialize serial communication
  pinMode(digitalPin, INPUT); // Set digital pin as input
}

void loop() {
  // Read analog value from AO pin
  int analogValue = analogRead(analogPin);
  float temperature = (analogValue * 5.0 / 1023.0) * 100.0; 
  // Convert analog value to temperature in °C
  
  // Read digital value from DO pin
  int digitalValue = digitalRead(digitalPin);

  // Print results to Serial Monitor
  Serial.print("Temperature (°C): ");
  Serial.println(temperature);
  Serial.print("Digital Output: ");
  Serial.println(digitalValue);

  delay(1000); // Wait 1 second before next reading
}

Notes on the Code

  • The analog value is converted to temperature using the formula:
    Temperature (°C) = (Analog Value * Vcc / 1023) * 100
    where Vcc is the operating voltage (5V in this case).
  • The digital output is HIGH when the temperature exceeds the threshold set by the potentiometer.

Troubleshooting and FAQs

Common Issues

  1. No Output from the Module

    • Ensure the module is powered correctly (3.3V to 5V).
    • Check all connections for loose wires or incorrect pin assignments.
  2. Inaccurate Temperature Readings

    • Verify that the sensor is not exposed to sudden temperature changes or heat sources.
    • Ensure the analog-to-digital conversion formula matches the operating voltage.
  3. Digital Output Always HIGH or LOW

    • Adjust the potentiometer to set an appropriate temperature threshold.
    • Confirm that the temperature is within the sensor's measurable range.

FAQs

Q: Can the KY-028 measure negative temperatures?
A: Yes, the LM35 sensor can measure temperatures as low as -55°C. However, the analog output may require additional calibration for negative values.

Q: How do I calibrate the sensor for more accurate readings?
A: Use a known temperature source (e.g., an ice bath or boiling water) to compare the sensor's output and adjust the formula or scaling factor in your code.

Q: Can I use the KY-028 with a 3.3V microcontroller?
A: Yes, the module operates at 3.3V. Ensure the analog-to-digital conversion formula in your code reflects the 3.3V reference voltage.

Q: What is the purpose of the potentiometer on the module?
A: The potentiometer adjusts the temperature threshold for the digital output (DO pin). Rotate it to increase or decrease the threshold.

By following this documentation, you can effectively integrate the KY-028 temperature sensor module into your projects for reliable temperature monitoring and control.