Stufin
Home Quick Cart Profile

XH-W3001 Intelligent Led Digital Microcomputer Temperature Controller Mini Thermostat Switch with Water-Resistant Sensor Probe 10A (Max) Multipurpose Controller

Buy Now on Stufin

Temperature Measurement Range

-50C to 120C (-58F to 248F)

Temperature Accuracy

0.5C

Load Capacity

10A (Maximum)

Power Supply

12V DC

Operating Temperature

0C to 50C (32F to 122F)

Storage Temperature

-20C to 60C (-4F to 140F)

Dimensions

70 x 47 x 24 mm (2.76 x 1.85 x 0.94 in)

Weight

60g (2.12 oz)

Applications

Industrial Automation

Home Automation

Fermentation Temperature Control

Greenhouse Temperature Control

Heating and Cooling Systems

Temperature Monitoring and Control

Pin Configuration

  • XH-W3001 Intelligent Led Digital Microcomputer Temperature Controller Mini Thermostat Switch
  • Pinout Explanation:
  • The XH-W3001 temperature controller has a total of 7 pins, which are used to connect the device to various components and sensors. Here's a detailed explanation of each pin:
  • Pin 1: VCC (Power Supply)
  • Function: Power supply input for the controller
  • Input Voltage: 5V-12V DC
  • Recommended Voltage: 5V DC
  • Connect a power source (e.g., a battery or a regulated power supply) to this pin.
  • Pin 2: GND (Ground)
  • Function: Ground connection for the controller
  • Connect the ground wire from the power source to this pin.
  • Pin 3: OUT (Output)
  • Function: Control output for the connected load (e.g., a relay or a transistor)
  • Output Type: Open-drain output (requires an external pull-up resistor)
  • Output Rating: 10A (max)
  • Connect the output wire from the load (e.g., a relay or a transistor) to this pin.
  • Pin 4: IN (Input for Temperature Sensor)
  • Function: Input for the temperature sensor probe
  • Sensor Type: NTC thermistor (included with the controller)
  • Connect the temperature sensor probe to this pin.
  • Pin 5: SET (Setting Button)
  • Function: Button input for setting the temperature setpoint
  • debounced input (logic high when pressed, logic low when released)
  • Connect a momentary push-button switch between this pin and GND (Pin 2).
  • Pin 6: LED+ (LED Positive)
  • Function: Positive connection for the onboard LED indicator
  • Connect an LED anode (positive leg) to this pin.
  • Pin 7: LED- (LED Negative)
  • Function: Negative connection for the onboard LED indicator
  • Connect an LED cathode (negative leg) to this pin.
  • Connecting the Pins:
  • Here's a step-by-step guide to connect the pins:
  • 1. Power Supply Connection:
  • Connect VCC (Pin 1) to the positive terminal of the power source (e.g., a battery or a regulated power supply).
  • Connect GND (Pin 2) to the negative terminal of the power source and the ground wire of the connected load.
  • 2. Temperature Sensor Connection:
  • Connect the temperature sensor probe to IN (Pin 4).
  • 3. Output Connection:
  • Connect the output wire from the load (e.g., a relay or a transistor) to OUT (Pin 3).
  • Add an external pull-up resistor (e.g., 1 k) to the output wire for the open-drain output.
  • 4. Setting Button Connection:
  • Connect a momentary push-button switch between SET (Pin 5) and GND (Pin 2).
  • 5. LED Indicator Connection:
  • Connect an LED anode (positive leg) to LED+ (Pin 6).
  • Connect an LED cathode (negative leg) to LED- (Pin 7).
  • Important Notes:
  • Ensure the power supply voltage is within the recommended range (5V-12V DC) to avoid damage to the controller.
  • Use a suitable current rating for the connected load, as the output is rated for up to 10A.
  • The temperature sensor probe is included with the controller and should be connected as described.
  • The setting button is debounced internally, but you can add an external debouncing circuit if required.
  • The onboard LED indicator is optional; you can choose not to connect it if not needed.
  • By following these instructions, you should be able to connect the XH-W3001 Intelligent Led Digital Microcomputer Temperature Controller correctly and utilize its features for your IoT project.

Code Examples

XH-W3001 Intelligent Led Digital Microcomputer Temperature Controller Mini Thermostat Switch Documentation
Overview
The XH-W3001 is a microcomputer-based temperature controller featuring a built-in LED display, water-resistant sensor probe, and a 10A max relay output. This device is designed for a wide range of applications, including temperature control, thermostat, and automation systems.
Technical Specifications
Operating Temperature: -20C to 60C
 Temperature Measurement Range: -50C to 120C
 Accuracy: 1C
 Relay Output: 10A max, 250VAC
 LED Display: 3-digit, 7-segment
 Sensor Probe: Water-resistant, 1m long
 Power Supply: 12VDC, 5VDC (optional)
 Dimensions: 60mm x 40mm x 25mm
Pinout
| Pin | Function |
| --- | --- |
| VCC | Power supply (12VDC or 5VDC) |
| GND | Ground |
| IN | Temperature sensor probe input |
| OUT | Relay output |
| SET | Configuration button |
| UP/DOWN | Increment/decrement buttons |
Programming and Control
The XH-W3001 can be controlled and programmed using a microcontroller or a computer via serial communication (UART or TTL). The device uses a simple ASCII-based command protocol.
Example 1: Basic Temperature Control using Arduino
This example demonstrates how to use the XH-W3001 with an Arduino board to control a relay based on temperature readings.
```cpp
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup() {
  mySerial.begin(9600);
}
void loop() {
  // Read temperature from sensor probe
  int temp = readTemp();
// Set relay output based on temperature
  if (temp > 25) {
    mySerial.println(" relay on");
  } else {
    mySerial.println(" relay off");
  }
delay(500);
}
int readTemp() {
  mySerial.println(" temp");
  delay(50);
  String tempStr = mySerial.readStringUntil('
');
  int temp = tempStr.toInt();
  return temp;
}
```
Example 2: Thermostat Mode using Python
This example demonstrates how to use the XH-W3001 in thermostat mode with a Python script running on a Raspberry Pi or similar device.
```python
import serial
ser = serial.Serial('/dev/ttyUSB0', 9600)
def set_thermostat_mode():
  ser.write(b'thermostat on
')
def set_temperature(temp):
  ser.write(f'set {temp}
'.encode())
def main():
  set_thermostat_mode()
  while True:
    temp = int(ser.readline().decode().strip())
    if temp > 25:
      print("Turning on fan...")
      ser.write(b'relay on
')
    else:
      print("Turning off fan...")
      ser.write(b'relay off
')
    time.sleep(1)
if __name__ == '__main__':
  main()
```
Example 3: Automatic Temperature Control using ESP32
This example demonstrates how to use the XH-W3001 with an ESP32 board to create an automatic temperature control system with Wi-Fi connectivity.
```cpp
#include <WiFi.h>
#include <AsyncTCP.h>
// Wi-Fi credentials
const char ssid = "your_ssid";
const char password = "your_password";
WiFiServer server(80);
void setup() {
  Serial.begin(9600);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to Wi-Fi...");
  }
  Serial.println("Connected to Wi-Fi");
  server.begin();
}
void loop() {
  WiFiClient client = server.available();
  if (client) {
    while (client.available() > 0) {
      String request = client.readStringUntil('
');
      if (request.indexOf("get_temp") != -1) {
        int temp = readTemp();
        client.println("HTTP/1.1 200 OK");
        client.println("Content-Type: text/plain");
        client.println();
        client.println(String(temp));
      }
      if (request.indexOf("set_temp") != -1) {
        int temp = request.toInt();
        setTemperature(temp);
        client.println("HTTP/1.1 200 OK");
        client.println("Content-Type: text/plain");
        client.println();
        client.println("Temperature set to " + String(temp));
      }
    }
  }
  delay(50);
}
```
Notes and Precautions
Make sure to follow proper wiring and electrical safety guidelines when using the XH-W3001.
 The device may require calibration before use.
 Ensure the sensor probe is properly connected and protected from moisture.
 Use a suitable power supply and ensure the device is operated within its specified temperature range.
By following these examples and guidelines, you can effectively integrate the XH-W3001 Intelligent Led Digital Microcomputer Temperature Controller into your IoT projects and applications.