The KY-001 Module uses the DS18B20 digital thermometer sensor to measure temperature in Celsius with a resolution of 9-bit to 12-bit. It features an alarm that allows for setting upper and lower temperature limits. This module uses the 1-Wire bus protocol and works with microcontrollers like Arduino, Raspberry Pi, and ESP32. The KY-001 Module is suitable for monitoring temperature in smart homes and controlling temperature in industrial settings.
KY-001 Temperature Sensor Module Specifications
The quick specifications of the KY-001 temperature sensor module is given below:
- Chipset: DS18B20
- Operating Voltage: DC +3.3V to +5V
- Communication: One-Wire Bus
- Temprature Measurement Range: -55°C to 125°C [-57°F to 257°F]
- Measurement Accuracy Range: ±0.5C (between the range -10°C to 85°C)
- Board Dimensions (L x W x H): 28 X 12 x 10 mm
- PCB Color: Black
- Weight: 2gm
Pinout of KY-001 Temperature Sensor Module
![]() |
The module has 3 male header pins those are -
|
Working Explanation of KY-001 Temperature Sensor Module Circuit
Schematic of the ky-001 temperature sensor module circuit is shown below.
Components are used in the circuit - U1: DS18B20 TO-92, D1: Red LED, R1: 4k7Ω Resistor, and P1: 3 pin Male header.
The main component of the circuit is the DS18B20 sensor, which can operate with a DC supply voltage of +3.3V to +5V. It can draw power from the data line itself, eliminating the need for an external power supply. This "parasitic power" mode makes the setup easier and is great for low-power uses.
When the temperature changes, the sensor's electrical resistance varies. The sensor converts this change in resistance into a digital signal using a built-in analog-to-digital converter (ADC). It uses the 1-Wire protocol, allowing multiple devices or microcontrollers to communicate over a single data line. Each DS18B20 has a unique 64-bit address, enabling individual device identification on the bus.
The module is very accurate, with a margin of ±0.5°C for temperatures from -55°C to +125°C. It can also measure temperature with a resolution of up to 12 bits, allowing for precise temperature readings in small increments.
KY-001 Module Interfacing with Arduino
Connection diagram of the KY-001 temperature sensor module with an Arduino is shown below.
Connect the power pin (middle) and ground pin (-) of the ky-001 module to +5V and GND on the Arduino, respectively. The module signal pin (s) connect to pin 2 on the Arduino.
Arduino Source Code for KY-001 Module
The following Arduino sketch will use DallasTemperature Library by Miles Burton to communicate serially with the ky-001 module, it'll output the temperature read by the device.
To install the library in your Arduino IDE, follow these steps:
- Open the Arduino IDE
- Go to Sketch > Include Library > Manage Libraries
- In the Library Manager, search for each library by typing "DallasTemperature".
- Click on the Library, select the latest version, and then click on the "Install" button.
- Wait for the Library to be installed, then close the Library Manager.
- You can now use the library in the sketch for the ky-001 module.
// Both Libraries will be imported
#include <OneWire.h>
#include <DallasTemperature.h>
// KY-001 Module signal pin is plugged into pin 2 on the Arduino board
#define KY001_ONE_WIRE_BUS 2 //
// Libraries are configured to communicate with the Module
OneWire oneWire(KY001_ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
void setup(void)
{
// Initialize serial output
Serial.begin(9600);
Serial.println("KY-001 temperature sensor measurement");
// Sensor is initialized
sensors.begin();
}
// Start the main program loop
void loop(void)
{
// Send the request command to get temperatures
sensors.requestTemperatures();
// Output measured temperature
Serial.print("Temperature: ");
// You can have multiple ICs on the same bus, where 0 refers to the first IC on the wire.
Serial.print(sensors.getTempCByIndex(0));
// Temperature in Celsius
Serial.println(" °C");
// 1s pause until next temperature measurement
delay(1000);
}
No comments
If you have any doubts or questions, please let me know. Don't add links as it goes to spam. Share your valuable feedback. Thanks