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

How to Use ky018: Examples, Pinouts, and Specs

Image of ky018
Cirkit Designer LogoDesign with ky018 in Cirkit Designer

Introduction

The KY-018 is a temperature sensor module manufactured by ESP32 with the part ID 18. It is based on the LM35 temperature sensor, which provides a linear analog output proportional to the temperature in degrees Celsius. This module is widely used in temperature monitoring and control applications due to its simplicity, accuracy, and ease of interfacing with microcontrollers.

Explore Projects Built with ky018

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Battery-Powered Emergency Alert System with NUCLEO-F072RB, SIM800L, and GPS NEO 6M
Image of women safety: A project utilizing ky018 in a practical application
This circuit is an emergency alert system that uses a NUCLEO-F072RB microcontroller to send SMS alerts and make calls via a SIM800L GSM module, while obtaining location data from a GPS NEO 6M module. The system is powered by a Li-ion battery and includes a TP4056 module for battery charging and protection, with a rocker switch to control power to the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Nano Joystick-Controlled Bluetooth Module with Battery Power
Image of padelpro transmitter: A project utilizing ky018 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
ESP32-Based Smart Soil Monitoring System with Wi-Fi Connectivity
Image of Copy of AgriArena project#2K24: A project utilizing ky018 in a practical application
This circuit is a smart agricultural monitoring system that uses an ESP32 microcontroller to collect data from various sensors, including a DHT22 for temperature and humidity, a pH sensor, an NPK soil sensor, and a capacitive soil moisture sensor. The collected data is displayed on a 0.96" OLED screen, and the RS485 module facilitates communication with the NPK soil sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Wireless Joystick-Controlled Interface with Arduino Nano and NRF24L01
Image of Transmitter 11: A project utilizing ky018 in a practical application
This circuit features an Arduino Nano interfaced with a KY-023 Dual Axis Joystick Module for analog input, and an NRF24L01 module for wireless communication. The joystick provides x and y-axis control signals to the Arduino's analog inputs and a switch signal to a digital input, while the NRF24L01 enables the Arduino to communicate with other devices wirelessly. The 2x 18650 batteries supply power to the Arduino, which in turn powers the joystick and the NRF24L01 module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with ky018

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 women safety: A project utilizing ky018 in a practical application
Battery-Powered Emergency Alert System with NUCLEO-F072RB, SIM800L, and GPS NEO 6M
This circuit is an emergency alert system that uses a NUCLEO-F072RB microcontroller to send SMS alerts and make calls via a SIM800L GSM module, while obtaining location data from a GPS NEO 6M module. The system is powered by a Li-ion battery and includes a TP4056 module for battery charging and protection, with a rocker switch to control power to the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of padelpro transmitter: A project utilizing ky018 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
Image of Copy of AgriArena project#2K24: A project utilizing ky018 in a practical application
ESP32-Based Smart Soil Monitoring System with Wi-Fi Connectivity
This circuit is a smart agricultural monitoring system that uses an ESP32 microcontroller to collect data from various sensors, including a DHT22 for temperature and humidity, a pH sensor, an NPK soil sensor, and a capacitive soil moisture sensor. The collected data is displayed on a 0.96" OLED screen, and the RS485 module facilitates communication with the NPK soil sensor.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Transmitter 11: A project utilizing ky018 in a practical application
Wireless Joystick-Controlled Interface with Arduino Nano and NRF24L01
This circuit features an Arduino Nano interfaced with a KY-023 Dual Axis Joystick Module for analog input, and an NRF24L01 module for wireless communication. The joystick provides x and y-axis control signals to the Arduino's analog inputs and a switch signal to a digital input, while the NRF24L01 enables the Arduino to communicate with other devices wirelessly. The 2x 18650 batteries supply power to the Arduino, which in turn powers the joystick and the NRF24L01 module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Environmental temperature monitoring
  • HVAC (Heating, Ventilation, and Air Conditioning) systems
  • Industrial temperature control systems
  • Weather stations
  • Home automation projects
  • Educational and prototyping purposes

Technical Specifications

The KY-018 module is designed for accurate and reliable temperature sensing. Below are its key technical details:

Parameter Value
Manufacturer ESP32
Part ID 18
Sensor Type LM35 (Analog Temperature Sensor)
Operating Voltage 4V to 30V
Output Voltage Range 0V to 1.5V (for -55°C to 150°C)
Temperature Range -55°C to +150°C
Accuracy ±0.5°C (at 25°C)
Output Sensitivity 10mV/°C
Power Consumption Low
Dimensions 18mm x 10mm x 8mm

Pin Configuration and Descriptions

The KY-018 module has three pins for easy interfacing:

Pin Name Description
1 VCC Power supply pin (4V to 30V)
2 GND Ground pin
3 OUT Analog output pin that provides a voltage proportional to the temperature

Usage Instructions

The KY-018 module is straightforward to use in a circuit. Follow the steps below to integrate it into your project:

Connecting the KY-018 to a Microcontroller

  1. Power the Module: Connect the VCC pin to a 5V power supply (or 3.3V if supported by your microcontroller) and the GND pin to the ground.
  2. Read the Output: Connect the OUT pin to an analog input pin on your microcontroller to read the temperature as an analog voltage.
  3. Convert Voltage to Temperature: Use the formula below to calculate the temperature in degrees Celsius: [ \text{Temperature (°C)} = \frac{\text{Analog Voltage (mV)}}{10} ]

Example: Using KY-018 with Arduino UNO

Below is an example code snippet to read temperature data from the KY-018 module using an Arduino UNO:

// KY-018 Temperature Sensor Example with Arduino UNO
// Reads the analog output from the KY-018 and converts it to temperature in °C

const int sensorPin = A0; // KY-018 OUT pin connected to Arduino analog pin A0
float temperature;        // Variable to store the calculated temperature

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

void loop() {
  int sensorValue = analogRead(sensorPin); // Read the analog value from the sensor
  float voltage = sensorValue * (5.0 / 1023.0); // Convert ADC value to voltage
  temperature = voltage * 100.0; // Convert voltage to temperature (10mV/°C)

  // 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
}

Important Considerations and Best Practices

  • Power Supply: Ensure the module is powered within its operating voltage range (4V to 30V). Exceeding this range may damage the sensor.
  • Analog Pin Resolution: For accurate readings, use a microcontroller with a high-resolution ADC (e.g., 10-bit or higher).
  • Noise Reduction: Use decoupling capacitors near the power pins to reduce noise and improve stability.
  • Temperature Range: Avoid exposing the sensor to temperatures beyond its specified range (-55°C to +150°C) to prevent damage or inaccurate readings.

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Output or Incorrect Readings

    • Cause: Incorrect wiring or loose connections.
    • Solution: Double-check the wiring and ensure all connections are secure.
  2. Fluctuating or Noisy Readings

    • Cause: Electrical noise or insufficient power supply filtering.
    • Solution: Add a 0.1µF decoupling capacitor between VCC and GND pins.
  3. Output Voltage Does Not Change with Temperature

    • Cause: Faulty sensor or incorrect analog pin configuration.
    • Solution: Test the sensor with a multimeter and verify the microcontroller's analog pin setup.
  4. Temperature Readings Are Inaccurate

    • Cause: Calibration error or incorrect voltage-to-temperature conversion.
    • Solution: Verify the conversion formula and ensure the power supply voltage is stable.

FAQs

Q1: Can the KY-018 module be used with a 3.3V microcontroller like ESP32?
A1: Yes, the KY-018 can operate at 3.3V. However, ensure the output voltage range is compatible with the ADC input range of your microcontroller.

Q2: How do I measure negative temperatures with the KY-018?
A2: The LM35 sensor outputs a negative voltage for temperatures below 0°C. Use a microcontroller or circuit capable of reading negative voltages, or add a level-shifting circuit.

Q3: Can I use the KY-018 for long-term temperature monitoring?
A3: Yes, the KY-018 is suitable for long-term use. Ensure proper environmental protection if used in harsh conditions.

Q4: What is the maximum cable length for connecting the KY-018 to a microcontroller?
A4: The maximum cable length depends on the quality of the cable and the environment. For best results, keep the cable length under 1 meter and use shielded cables in noisy environments.