Controlling Fans, Heaters, Pumps & Lights

Use 433MHz wireless outlets or direct relay control to automate your garden environment.

Two ways to control appliances.

433MHz Wireless

Use a 433MHz RF transmitter to control commercial wireless AC outlets. No wiring changes needed - just pair with existing outlets.

  • Pros: No wiring, plug-and-play outlets
  • Cons: Limited range (~30ft), potential interference

Hardware

  • 433MHz RF Transmitter Module
  • 3-5 pack wireless AC outlets
  • Arduino Nano D12 for data pin

Direct Relay Control

Connect relays or MOSFETs directly to your Arduino for precise, high-current control.

  • Pros: Direct control, higher current capacity
  • Cons: Requires wiring, enclosure modifications

Hardware

  • 5V Single-channel Relay Module
  • or IRLZ44N MOSFET + 10kΩ resistor
  • Arduino D2-D13 for control pins

Setting up appliance rules.

In the Arduino code, appliances are defined with their trigger conditions and relationships to other appliances:

Example: Exhaust Fan Logic

The exhaust fan turns on when temperature exceeds 80°F AND the light is on. It stays on until temperature drops below 75°F.

Appliance Definitions
// Appliance definitions - pin, channel, type, duration, conditional, inverted, state, next
Appliance Appliance_Light_1 = {11, 1, APPLIANCE_LIGHT, 43200UL, true, false, OFF, NULL};
Appliance Appliance_IntakeFan = {10, 1, APPLIANCE_INTAKE_FAN, 1800UL, true, false, OFF, &Appliance_Light_1};
Appliance Appliance_ExhaustFan = {9, 1, APPLIANCE_EXHAUST_FAN, 1800UL, true, false, OFF, &Appliance_IntakeFan};
Appliance Appliance_Heater = {8, 1, APPLIANCE_HEATER, 3600UL, false, false, OFF, NULL};
Appliance Appliance_WaterPump = {7, 1, APPLIANCE_WATER_PUMP, 600UL, false, false, OFF, NULL};
Appliance* Appliance_List[] = { &Appliance_Light_1, &Appliance_IntakeFan, &Appliance_ExhaustFan, &Appliance_Heater, &Appliance_WaterPump, NULL };

Capture 433MHz remote codes.

To control existing wireless outlets, first capture their code using the RCswitchReader sketch from the RCSwitch library:

RCswitchReader.ino
// Load RCswitchReader sketch from library
// Press button on your wireless remote
// Watch Serial Monitor for the output:

Received 433MHz Code: 1011010100010010
Protocol: 1, Bits: 24, Pulse: 183

// Use this code in your appliance definition
appliance_setCode(1011010100010010, 1, 24);

Once you have the codes, update your appliance definitions with the actual codes for your outlets. You can control up to 5 outlets per Arduino with separate on/off codes.