Use Arduino to directly control appliances
Safety Concerns and Highest level of reliability
The Arduino Uno, and variants, should only be used for directly powering peripheral modules and not devices. Consider the maximum current consumption when determining what is a device and what is a module. A string of lights is more of a device as opposed to a panel indicator light, motor controller boards are modules, not the motors they drive, MOSFET boards, not the valves or solenoids that they control.
AC powered lights, fans, pumps, etc. and DC powered lights, fans, pumps, solenoid valves can be controlled using relays, transistors and MOSFETs. Relays operate by charging a coil, causing an electromagnetic field which mechanically triggers the switch. Transistors (low-power), and MOSFET offer a non-mechanical or “solid-state” control.
Wirelessly ~ Remote-Controlled Outlets
Several years ago, I shared the initial hydroMazing project on Instructables where I demonstrate capturing the remote control codes from household remote-controlled AC outlets available at local stores. The project has won a few awards and been reworked a few times since. Now you are able to read the codes using an Arduino Nano or Arduino Uno and the transmitter/receiver set. You will need the Arduino IDE installed and the RCSwitch library. Download my source-code for the RCswitchReader.ino. Make any necessary pin changes, compile, upload, and load-up your serial monitor to watch the codes come-in. I also included a piezo to let you know the Arduino received the signal from the remote control. Additionally, this project can be used to listen to other 433Mhz codes being transmitted.
- Power Supply or battery pack
- 433Mhz Transmitter/Receiver
- ( optional ) MOSFET module or Relay module
- ( optional ) Voltage regulator
Read your codes and enter them into your hydroMazing Smart Garden System