12V DC
12V DC
-50C to 300C (depending on the temperature sensor used)
0.1C (in the range of 0C to 100C)
LCD display with 3-digit temperature display and 1-digit relay status display
10A at 12V
73 x 55 x 28 mm
Wiring Diagram
| The XH-W1219 12V Digital Temperature Controller has the following wiring diagram |
12V DC power supply
Ground
| T+ | Thermocouple or thermistor signal input |
| T- | Thermocouple or thermistor signal input |
Relay output (COM, NO, and NC terminals)
Please note that proper wiring and installation are crucial for safe and reliable operation of the XH-W1219 temperature controller. Consult the user manual or manufacturer's instructions for detailed wiring and installation guidelines.
XH-W1219 12V Digital Temperature Controller DocumentationOverviewThe XH-W1219 is a 12V digital temperature controller module designed for precise temperature control and monitoring in various IoT applications. This module features a high-accuracy temperature sensor, relay output, and an LCD display for real-time temperature monitoring.Key FeaturesHigh-accuracy temperature measurement range: -50C to 100C
Relay output for controlling heaters, fans, or other devices
LCD display for real-time temperature monitoring
12V operating voltage
Simple wiring and easy integration with microcontrollers and other devicesPinout| Pin | Function |
| --- | --- |
| VCC | 12V Power Input |
| GND | Ground |
| S | Signal (Temperature Sensor) |
| R1 | Relay Output 1 (Normally Open) |
| R2 | Relay Output 2 (Normally Closed) |
| LCD_VCC | LCD Display Power Input |
| LCD_GND | LCD Display Ground |
| SCL | I2C Clock (for optional I2C communication) |
| SDA | I2C Data (for optional I2C communication) |Example Code 1: Basic Temperature Monitoring with ArduinoIn this example, we'll use an Arduino Uno board to read the temperature from the XH-W1219 module and display it on the serial monitor.```cpp
#include <Arduino.h>#define TEMPERATURE_PIN A0 // Pin for temperature sensor signalvoid setup() {
Serial.begin(9600);
}void loop() {
int sensorValue = analogRead(TEMPERATURE_PIN);
float temperature = sensorValue 0.488; // Convert analog value to temperature (approximate formula)
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" C");
delay(1000);
}
```Example Code 2: Temperature Control with Relay Output using Raspberry PiIn this example, we'll use a Raspberry Pi to control a heater connected to the relay output of the XH-W1219 module. The Python script will read the temperature from the module and turn the heater on or off based on a setpoint temperature.```python
import RPi.GPIO as GPIO
import time# Set up GPIO pins
GPIO.setmode(GPIO.BCM)
relay_pin = 17
GPIO.setup(relay_pin, GPIO.OUT)# Setpoint temperature (e.g., 25C)
setpoint = 25while True:
# Read temperature from XH-W1219 module (assuming I2C communication is not used)
temperature = read_temperature_from_module() # Implement your own function to read temperatureif temperature < setpoint:
# Turn heater on
GPIO.output(relay_pin, GPIO.HIGH)
else:
# Turn heater off
GPIO.output(relay_pin, GPIO.LOW)time.sleep(1)
```Example Code 3: I2C Communication with ESP32In this example, we'll use an ESP32 board to communicate with the XH-W1219 module over I2C and read the temperature.```cpp
#include <WiFi.h>
#include <Wire.h>#define I2C_ADDRESS 0x20 // Default I2C address of XH-W1219 modulevoid setup() {
Serial.begin(115200);
Wire.begin();
}void loop() {
byte temperature_high, temperature_low;
Wire.beginTransmission(I2C_ADDRESS);
Wire.write(0x00); // Write to temperature register
Wire.endTransmission();
Wire.requestFrom(I2C_ADDRESS, 2);
temperature_high = Wire.read();
temperature_low = Wire.read();
float temperature = (temperature_high << 8) | temperature_low;
temperature = temperature 0.01 - 50; // Convert raw temperature value to Celsius
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" C");
delay(1000);
}
```Note: These examples are for illustrative purposes only and may require modifications to work with your specific device and setup. Make sure to consult the datasheet and user manual for the XH-W1219 module and your microcontroller or board for detailed instructions and pinouts.