

The KY-017 is a temperature sensor module that utilizes the LM35 temperature sensor. It provides an analog output that is directly 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 integration into electronic circuits.








The KY-017 module is based on the LM35 temperature sensor, which is known for its linear output and high accuracy. Below are the key technical details:
| Parameter | Value |
|---|---|
| Operating Voltage | 4V to 30V |
| Output Voltage Range | 0V to 1.5V (for 0°C to 150°C) |
| Temperature Range | 0°C to 100°C (module-specific) |
| Accuracy | ±0.5°C (at 25°C) |
| Output Type | Analog |
| Dimensions | 18.5mm x 15mm x 10mm |
The KY-017 module has three pins, as described in the table below:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply pin (4V to 30V) |
| 2 | GND | Ground pin |
| 3 | OUT | Analog output pin, provides voltage proportional to |
| the temperature in degrees Celsius |
VCC pin to a 5V power supply and the GND pin to the ground of your circuit.OUT pin to an analog input pin of a microcontroller (e.g., Arduino UNO) to read the temperature as an analog voltage.The following code demonstrates how to use the KY-017 module with an Arduino UNO to read and display the temperature:
// Define the analog pin connected to the KY-017 OUT pin
const int sensorPin = A0;
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
float 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
}
analogRead() function reads the sensor's output voltage as a 10-bit ADC value (0-1023).No Output or Incorrect Readings
VCC, GND, and OUT are properly connected.Fluctuating Temperature Readings
VCC and GND to stabilize the power supply.Output Voltage Does Not Match Expected Temperature
Sensor Overheating
Q: Can the KY-017 measure negative temperatures?
A: No, the KY-017 module is designed to measure temperatures in the range of 0°C to 100°C. For negative temperatures, additional circuitry or a different sensor is required.
Q: Can I use the KY-017 with a 3.3V microcontroller?
A: Yes, the KY-017 can operate at 3.3V, but the output voltage range will be lower, which may reduce resolution. Ensure the microcontroller's ADC can handle the reduced range.
Q: How accurate is the KY-017 module?
A: The LM35 sensor provides an accuracy of ±0.5°C at 25°C. However, external factors like noise and power supply stability can affect the overall accuracy.
Q: Is the KY-017 suitable for outdoor use?
A: The KY-017 is not weatherproof. For outdoor applications, additional protection (e.g., an enclosure) is required to shield the module from moisture and extreme conditions.