略過產品資訊
1 / 1

HK STEM CLUB

KY-028 數碼訊號溫度模組 Digital Temperature Sensor Module

KY-028 數碼訊號溫度模組 Digital Temperature Sensor Module

定價 HK$15.00
定價 售價 HK$15.00
特價 售罄
查看完整資訊

KY-028 數碼訊號溫度模組 DIGITAL TEMPERATURE SENSOR MODULE

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.

  • Arduino KY-028 Digital temperature sensor module

  • KY-208 digital temperature sensor module fritzing part

KY-028 Specifications

The KY-028 consist of a of a NTC thermistor, a LM393 dual differential comparator a 3296W trimmer potentiometer, six resistors and two indicator LEDs. The board features an analog and a digital output.

Operating Voltage 3.3V to 5.5V
Temperature measurement range -55°C to 125°C
Measurement Accuracy ±0.5°C
Board Dimensions 15mm x 36mm

KY-028 Connection Diagram

Connect the board's analog output (A0) to pin A0 on the Arduino and the digital output (D0) to pin 3. Connect the power line (+) and ground (G) to 5V and GND respectively.

KY-028 Arduino
A0 A0
G GND
+ 5V
D0 2
Arduino KY-028 connection diagramclick to enlarge

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);
}