Digital Temperature Sensor KY-028 for Arduino, it measures temperature changes based on the thermistor resistance. This module has both digital and analog outputs, there’s a potentiometer to adjusts the detection threshold on the digital interface.
Features:
Using the NTC thermistor sensor , good sensitivity.
The comparator output signal is clean, good waveform , driving ability , more than 15mA.
Adjust the temperature distribution position detection threshold.
The working voltage: DC 3.3V-5V.
The output format : digital switching outputs ( 0 and 1 ).
A fixed bolt holes for easy installation.
Using a wide voltage LM393 comparator
Details:
The sensor has 3 main components on its circuit board. First, the sensor unit at the front of the module which measures the area physically and sends an analog signal to the second unit, the amplifier. The amplifier amplifies the signal, according to the resistant value of the potentiometer, and sends the signal to the analog output of the module. The third component is a comparator which switches the digital out and the LED if the signal falls under a specific value. You can control the sensitivity by adjusting the potentiometer.
Pinout:
AO: Analog Output
G: 0V Ground
+3.3V – 5V Supply
Digital Output
KY-028 Arduino Code
When the temperature threshold is reached, the digital interface will send a HIGH signal turning on the LED on the Arduino (pin 13). Turn the potentiometer clock-wise to increase the detection threshold and counter-clockwise to decrease it.
The analog interface returns a numeric value that depends on the temperature and the potentiometer’s position. Since analog output pin is directly connected to the potentiometer it isn’t possible to use the Steinhart-Hart equation to calculate the temperature as as we did with the KY-013, we can only use this value to measure relative changes in temperature.
int led = 13; // define the LED pin
int digitalPin = 2; // KY-028 digital interface
int analogPin = A0; // KY-028 analog interface
int digitalVal; // digital readings
int analogVal; //analog readings
void setup()
{
pinMode(led, OUTPUT);
pinMode(digitalPin, INPUT);
//pinMode(analogPin, OUTPUT);
Serial.begin(9600);
}
void loop()
{
// Read the digital interface
digitalVal = digitalRead(digitalPin);
if(digitalVal == HIGH) // if temperature threshold reached
{
digitalWrite(led, HIGH); // turn ON Arduino’s LED
}
else
{
digitalWrite(led, LOW); // turn OFF Arduino’s LED
}
// Read the analog interface
analogVal = analogRead(analogPin);
Serial.println(analogVal); // print analog value to serial
delay(100);
}
Downloads
Fritzing Part: KY-028 Digital Temperature Sensor Module.
LM393 comparator datasheet.
3296W-104 trimmer datasheet.








Reviews
There are no reviews yet.