This is a project to create an automatic plant watering system and an AC receptacles Outlet that you can controlled using any microcontroller. In my example a Ruggeduino is used but this is essentially an Arduino Uno.
The circuit I used is not uncommon, many examples in the internet will show you how to wire a relay circuit.

The basic of the project is use a microcontroller digital output to supply 5V into the coil of an AC relay.
A relay for those who are not familiar is a device that has contact that can close or open based on the current flowing in a coil in the relay.
A picture of a relay is included.

This custom AC Outlet will be used to drive a water pump that will be turn on or off based on the soil moisture level.

Materials you need for the relay shields and moisture sensor:

1. Typical household AC outlet. I use a single outlet, you can use double outlet.
2. A box that this outlet usually go to. I am not sure exactly what they are called but your hardware store electrical section will sell this about 25 cents.
3. The cover for the single/double outlet.
4. A SPDT relay. Mine is a general purpose with p/n Z2560-ND G5LA-14 DC5 Omron. I bought it from Digikey.
Pay attention to make sure your relay contacts are rated for A120VAC operation and can carry high enough current (amps) to operate whatever you will plug into this customized outlet.
5. A diode. Part number 1N4148. Again from Digikey.
6. A used AC power cord cable from old device/equipment that you don't need anymore.
7. A couple small terminal blocks, not required but nice to have it.
8. Some heat shrink tubing.
9. A couple transistors (NPN 2N3904)
10. 2 metallic screw drivers
11. Some wires
12. Old milk or juice plastic container.
13. A water pump. I use an old indoor water pump.
14. Some plastic tubing and converter if the plastic tube does not go into the pump outlet just right.
Total cost ($5.00-$10.00).

Tools you need :
1. Soldering iron
2. Wire snipper
3. Helping hands

Let's start.

Step 1: Cut your AC cord

The wiring is fairly simple in the AC outlet side.

Basically you take the the cables from your unused equipment. There will be 2 wires. It does not matter which one you cut but pick one. You will make it so that the path on that one wire is broken and insert the relay normally open contacts in the middle of the path so that no current can open under normal condition.

You will need to verify with your own relay to find out which pin is the normally open contact.

In the picture I am showing you, I have used the normally open contact which means it will close when current is applied to the coil from the Arduino/microcontroller circuitry.

I will show you another schematic in the next step on how to get the microcontroller circuit ready but you may want to wire this first.

You should end up with 2 wires going out from this custom AC outlet to your microcontroller circuit. Wiring it this way will keep the AC custom outlet simple and can be driven by anything according to your circuit design.

<p>very nice nataku. why not add a plant arm to the pot, so it has lights too ! check it out, i'm in the process of combining the two technologies...</p><p><a href="http://www.instructables.com/id/USB-powered-LED-plant-light-20/" rel="nofollow">http://www.instructables.com/id/USB-powered-LED-pl...</a></p>
<p>UK IS 250V</p>
<p>A SPDT relay. Mine is a general purpose with p/n Z2560-ND G5LA-14 DC5 Omron. I bought it from Digikey.</p>

About This Instructable


76 favorites


More by nataku: Programming ESP8266- ESP-201 stand alone with Arduino IDE Arduino controlled plant watering system and custom AC Receptacles outlets How to hack old cell phone to power up your wireless bluetooth keyboard
Add instructable to: