10A 220V Mini Digital Air Humidity Controller Documentation
The 10A 220V Mini Digital Air Humidity Controller is a compact and versatile device designed to control and monitor relative humidity levels in various applications. This controller features a digital display, adjustable humidity setpoint, and a relay output to control connected devices.
Input Voltage: 220V AC
Relay Output: 10A, 220V AC
Humidity Measurement Range: 20-90% RH
Accuracy: 5% RH
Display: 3-Digit LED Display
Setpoint Adjustment: Button Control
Operating Temperature: 0-40C (32-104F)
Connecting the Controller
Connect the controller to a power source (220V AC) and a device to be controlled (e.g., a humidifier or dehumidifier) to the relay output. Ensure proper wiring and considerations are taken.
### Example 1: Basic Humidity Control with Arduino
In this example, we'll demonstrate how to use the 10A 220V Mini Digital Air Humidity Controller with an Arduino board to control a humidifier.
Arduino Board (e.g., Arduino Uno)
10A 220V Mini Digital Air Humidity Controller
Humidifier
Breadboard and jumper wires
Code
```c
#include <Wire.h>
#define HUMIDITY_CONTROLLER_ADDRESS 0x27 // I2C address of the controller
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication
// Initialize the humidifier relay pin as an output
pinMode(2, OUTPUT);
}
void loop() {
// Read humidity value from the controller
int humidity = readHumidityFromController();
// Check if humidity is below the setpoint (e.g., 60% RH)
if (humidity < 60) {
// Turn on the humidifier
digitalWrite(2, HIGH);
Serial.println("Humidifier ON");
} else {
// Turn off the humidifier
digitalWrite(2, LOW);
Serial.println("Humidifier OFF");
}
delay(1000); // Wait 1 second before taking the next reading
}
int readHumidityFromController() {
Wire.beginTransmission(HUMIDITY_CONTROLLER_ADDRESS);
Wire.write(0x00); // Command to read humidity value
Wire.endTransmission();
Wire.requestFrom(HUMIDITY_CONTROLLER_ADDRESS, 1);
int humidity = Wire.read();
return humidity;
}
```
### Example 2: Raspberry Pi Python Script for Automating Humidity Control
In this example, we'll demonstrate how to use the 10A 220V Mini Digital Air Humidity Controller with a Raspberry Pi to automate humidity control using Python.
Raspberry Pi (e.g., Raspberry Pi 4)
10A 220V Mini Digital Air Humidity Controller
Humidifier
Breadboard and jumper wires
Code
```python
import RPi.GPIO as GPIO
import time
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Set up relay output pin
relay_pin = 17
GPIO.setup(relay_pin, GPIO.OUT)
# Set up I2C communication
import smbus
bus = smbus.SMBus(1) # For Raspberry Pi 4
# I2C address of the controller
controller_address = 0x27
def read_humidity_from_controller():
bus.write_byte(controller_address, 0x00) # Command to read humidity value
humidity = bus.read_byte(controller_address)
return humidity
while True:
# Read humidity value from the controller
humidity = read_humidity_from_controller()
# Check if humidity is below the setpoint (e.g., 60% RH)
if humidity < 60:
# Turn on the humidifier
GPIO.output(relay_pin, GPIO.HIGH)
print("Humidifier ON")
else:
# Turn off the humidifier
GPIO.output(relay_pin, GPIO.LOW)
print("Humidifier OFF")
time.sleep(1) # Wait 1 second before taking the next reading
```
These examples demonstrate how to use the 10A 220V Mini Digital Air Humidity Controller with microcontrollers (Arduino) and single-board computers (Raspberry Pi) to automate humidity control in various applications.