The KY-028 Sensor de Temperatura Digital is a versatile temperature sensor module designed for accurate temperature monitoring. Manufactured by Arduino (Part ID: jhj), this module typically uses LM35 or similar sensor technology to provide reliable temperature readings. It outputs data in both analog and digital formats, making it easy to interface with microcontrollers such as the Arduino UNO.
The KY-028 Sensor de Temperatura Digital is equipped with both analog and digital outputs, allowing for flexible integration into various projects. Below are the key technical details:
The KY-028 module has a 3-pin interface. Below is the pinout description:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply pin. Connect to 3.3V or 5V DC. |
2 | GND | Ground pin. Connect to the ground of the power supply or microcontroller. |
3 | OUT | Output pin. Provides digital or analog temperature data based on the connection. |
The KY-028 Sensor de Temperatura Digital is simple to use and can be connected directly to a microcontroller like the Arduino UNO. Below are the steps to use the sensor effectively:
Below is an example of how to read both digital and analog outputs from the KY-028 sensor using an Arduino UNO:
// KY-028 Temperature Sensor Example Code
// Reads both digital and analog outputs from the sensor
// Define pin connections
const int digitalPin = 2; // Digital output pin from KY-028
const int analogPin = A0; // Analog output pin from KY-028
void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);
// Set the digital pin as input
pinMode(digitalPin, INPUT);
}
void loop() {
// Read the digital output (HIGH or LOW)
int digitalValue = digitalRead(digitalPin);
// Read the analog output (temperature as a voltage)
int analogValue = analogRead(analogPin);
// Convert the analog value to a temperature (assuming LM35 sensor)
float temperature = (analogValue * 5.0 / 1023.0) * 100.0;
// Print the results to the Serial Monitor
Serial.print("Digital Output: ");
Serial.println(digitalValue);
Serial.print("Analog Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
// Wait 1 second before the next reading
delay(1000);
}
No Output from the Sensor
Inaccurate Temperature Readings
Digital Output Always HIGH or LOW
Analog Output Not Changing
Q: Can the KY-028 measure negative temperatures?
A: Yes, the sensor can measure temperatures as low as -55°C, but ensure the microcontroller and code support negative values.
Q: How do I know if the digital output is working?
A: The onboard LED will light up when the temperature exceeds the set threshold.
Q: Can I use the KY-028 with a 3.3V microcontroller?
A: Yes, the sensor is compatible with both 3.3V and 5V systems.
Q: Is the sensor waterproof?
A: No, the KY-028 is not waterproof. Use a waterproof casing if necessary for your application.