KY-028 Temperature Sensor: Fire Alarm

By: Yuxi Chen

I received two sensors: the Infrared Distance Sensor and Temperature Sensor. I played with infrared distance sensor first but to make the infrared distance sensor work, a capacitor is required. However, I do not have a capacitor, so after an hour’s play, I changed my focus to the Temperature Sensor.

The KY-028 Temperature Sensor

The KY-028 Digital Temperature Sensor measures temperature changes based on thermistor resistance.

KY-028

This module has:

GND(G) / Vcc(+)

a potentiometer to adjust the detection threshold on the digital interface: Turn the potentiometer clockwise to increase the detection threshold and counterclockwise to decrease it.

Analog outputs (A0): Direct measured value of the sensor unit

Digital outputs (D0): If a temperature is measured above a limit value, this is output here – the limit value can be set using the potentiometer

KY-028 has Negative Temperature Coefficient, which means its resistance decreases with increasing temperature. As a result, the analog output decreased as the temperature increases.

To notice: because of the existence of the potentiometer, the analog output can be influenced by the resistance of a potentiometer. As a result, the KY-028 Temperature Sensor is usually used to detects the changes of temperature in an environment. To get the exact temperature of an environment, Serial Temperature Sensor is used in Arduino.

Goal

As the KY-028 Temperature Sensor is used to detect the temperature change, I used the sensor as a part of a Fire Alarm. When the temperature decreases by 8 celsius degree in three seconds, the alarm (I use passive buzzer here) will beep.

Example Set Up

Test
Wiring Up

Code

The analog outputs of the Temperature Sensor is either voltage nor temperature. To achieve my goal of “if temperature increases by 8 celsius in 3 seconds”, I read the analog outputs by an interval of 3s, then applied several formulas to convert the analog output into voltage and finally to temperature.

Video Of Example

I use my hand to mock the temperature changes here!

Resources

Here are the main resources I used to understand KY-028 Temperature sensor

https://sensorkit.joy-it.net/en/sensors/ky-028

https://www.phippselectronics.com/using-the-digital-temperature-sensor-module-ky-028-with-arduino/


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *