Home Top Ad

KY-001 Temperature Sensor Module Circuit Working Explanation

Share:
kY-001 Temperature Sensor Module Circuit Board

The KY-001 Module is a semiconductor-based DS18B20 Digital Temperature Sensor for Arduino, Raspberry Pi, and ESP32. It can be use as environmental monitoring in smart homes and temperature control in industrial processes.

KY-001 Module Specifications

The quick specifications of the KY-001 temperature sensor module is given below:

  • Chipset: DS18B20
  • Operating Voltage: 3.3V to 5.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 Dimantions: 18.5mm x 15mm

KY-001 Module Pinout

Pinout of KY-001 Temperature Sensor Module

The module has 3 male header pins those are -

Pins Type
- GND
Middle VCC: DC +3V3 to +5V
S Signal

KY-001 Module Circuit Diagram

Schematic of the ky-001 temperature sensor module circuit is shown below.

Schematic of KY-001 Temperature Sensor Module Circuit

The hardware components are used in the circuit are - DS18B20 TO-92 (U1), Red LED (D1), and 4k7 resistor (R1)

The working principle of the ky-001 module circuit is based on the main component DS18B20 which can draw power from the data line itself thus eliminating the need for an external power supply. This 'parasitic power' mode simplifies the circuitry, making it ideal for low-power applications.

When the temperature changes, the sensor's electrical resistance also changes. The sensor then transforms this resistance variation into a digital signal using an analog-to-digital converter (ADC) built into the sensor. The sensor uses the 1-Wire protocol, a system where multiple devices or microcontrollers communicate through a single data line. Each DS18B20 has a distinct 64-bit address, enabling individual device identification on the bus.

The module has high accuracy, with a margin of ±0.5°C in temperatures ranging from -55°C to +125°C. It also provides detailed measurements with a resolution of up to 12 bits, enabling 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.

KY-001 Temperature Sensor Module Interfacing with Arduino

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:

  1. Open the Arduino IDE
  2. Go to Sketch > Include Library > Manage Libraries
  3. In the Library Manager, search for each library by typing "DallasTemperature".
  4. Click on the Library, select the latest version, and then click on the "Install" button.
  5. Wait for the Library to be installed, then close the Library Manager.
  6. 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