Popis
| Teplotný senzorový modul KY-028 |
 |
| Popis: |
Teplotný senzorový modul KY-028 je digitálny teplotný senzor, ktorý používa čip teplotného senzora DS18B20. Dokáže merať teploty v rozsahu od -55°C do +125°C s presnosťou 0,5°C. Modul poskytuje digitálny výstupný signál, čo umožňuje jednoduché rozhranie s mikrokontrolérmi ako Arduino. |
| Funkcie: |
- Čip teplotného senzora DS18B20
- Široký merací teplotný rozsah
- Digitálny výstup pre jednoduché rozhranie
- Vysoká presnosť a rozlíšenie
|
| Technické údaje: |
| Prevádzkové napätie: |
3,3V – 5V DC |
| Rozsah teplôt: |
-55°C až +125°C |
| Presnosť: |
±0,5°C |
| Rozlíšenie: |
9 až 12 bitov (programovateľné) |
| Rozmery: |
Približne 15 mm x 20 mm x 5 mm |
|
| Aplikácie: |
- Monitorovanie a riadenie teploty
- Meteorologické stanice
- Domáca automatizácia
- Monitorovanie priemyselných procesov
|
| Príkladový kód: |
// Príkladový kód pre použitie teplotného senzoru KY-028
#include
#include
#define ONE_WIRE_BUS 2 // Digitálny pin 2 pre teplotný senzor
OneWire oneWire(ONE_WIRE_BUS); // Inicializácia oneWire inštancie
DallasTemperature sensors(&oneWire); // Prenesenie oneWire inštancie do senzora teploty Dallas
void setup() {
Serial.begin(9600); // Inicializácia sériovej komunikácie
sensors.begin(); // Spustenie knižnice
}
void loop() {
sensors.requestTemperatures(); // Požiadanie o teplotné údaje
float teplotaC = sensors.getTempCByIndex(0); // Získanie teploty v stupňoch Celsia
float teplotaF = sensors.toFahrenheit(teplotaC); // Konverzia stupňov Celsia na Fahrenheit
Serial.print("Teplota: ");
Serial.print(teplotaC);
Serial.print("°C / ");
Serial.print(teplotaF);
Serial.println("°F");
delay(1000); // Oneskorovanie pre čitateľnosť
}
|
| Temperature Sensor Module KY-028 |
 |
| Description: |
The KY-028 Temperature Sensor Module is a digital temperature sensor that uses the DS18B20 temperature sensor chip. It can measure temperatures ranging from -55°C to +125°C with a 0.5°C accuracy. The module provides a digital output signal, making it easy to interface with microcontrollers like Arduino. |
| Features: |
- DS18B20 temperature sensor chip
- Wide temperature measurement range
- Digital output for easy interfacing
- High accuracy and resolution
|
| Specifications: |
| Operating Voltage: |
3.3V – 5V DC |
| Temperature Range: |
-55°C to +125°C |
| Accuracy: |
±0.5°C |
| Resolution: |
9 to 12 bits (programmable) |
| Dimensions: |
Approximately 15mm x 20mm x 5mm |
|
| Applications: |
- Temperature monitoring and control systems
- Weather stations
- Home automation
- Industrial process monitoring
|
| Sample Code: |
// Sample code for using the KY-028 Temperature Sensor Module
#include
#include
#define ONE_WIRE_BUS 2 // Digital pin 2 for the temperature sensor
OneWire oneWire(ONE_WIRE_BUS); // Setup a oneWire instance
DallasTemperature sensors(&oneWire); // Pass our oneWire instance to Dallas Temperature sensor
void setup() {
Serial.begin(9600); // Initialize serial communication
sensors.begin(); // Start up the library
}
void loop() {
sensors.requestTemperatures(); // Request temperature readings
float temperatureC = sensors.getTempCByIndex(0); // Get temperature in Celsius
float temperatureF = sensors.toFahrenheit(temperatureC); // Convert Celsius to Fahrenheit
Serial.print("Temperature: ");
Serial.print(temperatureC);
Serial.print("°C / ");
Serial.print(temperatureF);
Serial.println("°F");
delay(1000); // Delay for readability
}
|
Modul snímača teploty KY-028
Popis:
Jednoduchý obvod digitálneho teplotného modulu a integrovanej LED pripájajúcej sa k digitálnemu rozhraniu 13, aby sa rozsvietil indikátor teploty.
Použite rozhranie číslo 13 na pripojenie integrovanej LED, pripojte digitálny snímač teploty k rozhraniu číslo 3. Keď digitálny snímač teploty zaznamená kľúčový signál, LED dióda svieti, inak je zhasnutá.
Vzorový kód:
Int Led = 13;/ / define LED interface
Int buttonpin = 3;/ / define the digital temperature sensor interface
Int val./ / define digital variable val
Void setup ()
{
PinMode (Led, the OUTPUT);/ / define the LED for the output interface
PinMode (buttonpin, INPUT);/ / define the digital temperature sensor for the output interface
}
Void loop ()
{
Val = digitalRead (buttonpin);/ / to assign the value of digital interface 3 read val
If (val = = HIGH) / / when digital temperature sensor detection signal, LED flashing
{
DigitalWrite (Led, HIGH);
}
The else
{
DigitalWrite (Led, LOW);
}
}