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

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

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

Introduction

The KY-028 is a temperature sensor module designed for accurate temperature measurement. It features the LM35 temperature sensor, which outputs an analog voltage directly proportional to the temperature in degrees Celsius. This module is widely used in temperature monitoring systems, home automation, weather stations, and other projects requiring precise temperature readings.

The KY-028 is manufactured by ESP32 with the part ID 15. Its compact design and ease of use make it a popular choice for hobbyists and professionals alike.

Explore Projects Built with 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 Security System with RFID and Laser Tripwire
Image of CPE doorlock system: A project utilizing KY-028 in a practical application
This circuit is designed for a comprehensive security and access control system with motion detection, access via RFID, and a break-beam sensor. It includes a solenoid lock controlled by a relay, visual and audible alerts, and a robust power management system with solar and battery backup to ensure uninterrupted operation.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Security System with RFID and Laser Intrusion Detection
Image of CPE doorlock system upgrade: A project utilizing KY-028 in a practical application
This circuit is a security and access control system featuring motion detection, laser beam-break sensing, and RFID scanning, interfaced with a keypad and visual/audible indicators, powered by a solar-charged battery, and capable of controlling an electric lock via a relay.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Mega 2560 Bluetooth-Controlled Flame Detection System with Servo Actuation
Image of apv circuit 1: A project utilizing KY-028 in a practical application
This circuit uses an Arduino Mega 2560 to monitor four KY-026 flame sensors and control four micro servo motors. The HC-05 Bluetooth module allows for wireless communication, enabling remote monitoring and control of the system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano Joystick-Controlled Bluetooth Module with Battery Power
Image of padelpro transmitter: A project utilizing KY-028 in a practical application
This circuit is a wireless joystick controller that uses an Arduino Nano to read analog signals from a KY-023 Dual Axis Joystick Module and transmits the data via an HC-05 Bluetooth Module. The system is powered by a 18650 Li-Ion battery with a rocker switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with 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 CPE doorlock system: A project utilizing KY-028 in a practical application
ESP32-Based Security System with RFID and Laser Tripwire
This circuit is designed for a comprehensive security and access control system with motion detection, access via RFID, and a break-beam sensor. It includes a solenoid lock controlled by a relay, visual and audible alerts, and a robust power management system with solar and battery backup to ensure uninterrupted operation.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of CPE doorlock system upgrade: A project utilizing KY-028 in a practical application
ESP32-Based Security System with RFID and Laser Intrusion Detection
This circuit is a security and access control system featuring motion detection, laser beam-break sensing, and RFID scanning, interfaced with a keypad and visual/audible indicators, powered by a solar-charged battery, and capable of controlling an electric lock via a relay.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of apv circuit 1: A project utilizing KY-028 in a practical application
Arduino Mega 2560 Bluetooth-Controlled Flame Detection System with Servo Actuation
This circuit uses an Arduino Mega 2560 to monitor four KY-026 flame sensors and control four micro servo motors. The HC-05 Bluetooth module allows for wireless communication, enabling remote monitoring and control of the system.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of padelpro transmitter: A project utilizing KY-028 in a practical application
Arduino Nano Joystick-Controlled Bluetooth Module with Battery Power
This circuit is a wireless joystick controller that uses an Arduino Nano to read analog signals from a KY-023 Dual Axis Joystick Module and transmits the data via an HC-05 Bluetooth Module. The system is powered by a 18650 Li-Ion battery with a rocker switch for power control.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications:

  • Environmental monitoring systems
  • Home automation and HVAC systems
  • Weather stations
  • Industrial temperature monitoring
  • Educational projects and prototyping

Technical Specifications

The KY-028 module is built around the LM35 temperature sensor and includes additional circuitry for signal conditioning. Below are the key technical details:

Key Specifications:

  • Operating Voltage: 3.3V to 5V DC
  • Temperature Range: -55°C to +150°C
  • Output Type: Analog voltage (10mV/°C)
  • Accuracy: ±0.5°C (at 25°C)
  • Dimensions: 32mm x 14mm x 8mm
  • Power Consumption: Low power consumption, suitable for battery-powered applications

Pin Configuration:

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 A0 (Analog Out) Analog output voltage proportional to the temperature (10mV/°C)
4 D0 (Digital Out) Digital output (high/low signal based on a user-defined temperature threshold)

Usage Instructions

The KY-028 module is simple to use and can be integrated into a variety of circuits. Below are the steps and best practices for using the module:

Connecting the KY-028 to an Arduino UNO:

  1. Power the Module: Connect the VCC pin to the 5V pin on the Arduino UNO and the GND pin to the Arduino's GND.
  2. Read Analog Output: Connect the A0 pin of the KY-028 to an analog input pin on the Arduino (e.g., A0).
  3. Optional Digital Output: If you want to use the digital output, connect the D0 pin to a digital input pin on the Arduino (e.g., D2). Adjust the onboard potentiometer to set the desired temperature threshold.

Sample Arduino Code:

The following code demonstrates how to read the analog output of the KY-028 and display the temperature in Celsius on the serial monitor.

// KY-028 Temperature Sensor Example
// Reads the analog output and calculates the temperature in Celsius

const int analogPin = A0; // KY-028 analog output connected to Arduino A0
float voltage;            // Variable to store the sensor's output voltage
float temperature;        // Variable to store the calculated temperature

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
}

void loop() {
  int sensorValue = analogRead(analogPin); // Read the analog value (0-1023)
  
  // Convert the analog value to voltage (assuming 5V reference)
  voltage = sensorValue * (5.0 / 1023.0);
  
  // Calculate temperature in Celsius (10mV per degree Celsius)
  temperature = voltage * 100.0;
  
  // Print the temperature to the serial monitor
  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.println(" °C");
  
  delay(1000); // Wait for 1 second before the next reading
}

Best Practices:

  • Ensure the module is powered within its operating voltage range (3.3V to 5V).
  • Avoid exposing the sensor to extreme temperatures beyond its specified range (-55°C to +150°C).
  • Use proper decoupling capacitors near the power supply pins to reduce noise.
  • Calibrate the sensor if higher accuracy is required for your application.

Troubleshooting and FAQs

Common Issues and Solutions:

  1. No Output or Incorrect Readings:

    • Ensure the module is properly powered (check VCC and GND connections).
    • Verify that the analog pin is correctly connected to the Arduino.
    • Check for loose or faulty wiring.
  2. Temperature Readings Are Inaccurate:

    • Confirm that the sensor is not exposed to sudden temperature changes or airflow.
    • Adjust the onboard potentiometer if using the digital output.
    • Use a multimeter to verify the analog output voltage and compare it with the expected value.
  3. Digital Output Not Triggering:

    • Ensure the threshold is correctly set using the potentiometer.
    • Verify that the D0 pin is connected to a digital input pin on the Arduino.

FAQs:

Q: Can the KY-028 be used with a 3.3V microcontroller?
A: Yes, the KY-028 can operate at 3.3V. However, ensure that the analog output voltage is within the input range of your microcontroller's ADC.

Q: How do I calibrate the KY-028 for better accuracy?
A: You can calibrate the sensor by comparing its readings with a known accurate thermometer and applying a correction factor in your code.

Q: Is the KY-028 suitable for outdoor use?
A: The KY-028 is not weatherproof. If used outdoors, it should be enclosed in a protective housing to prevent damage from moisture and dust.

Q: Can I use the KY-028 with a Raspberry Pi?
A: Yes, the KY-028 can be used with a Raspberry Pi. However, since the Raspberry Pi does not have an onboard ADC, you will need an external ADC module to read the analog output.