Homemade Irrigation Rain Weather Sensor or Relay Sensor Using An Electromagnet

The easiest way to make your own sensors, or monitoring devices is to use an electromagnet. In this example I’ve made a rain sensor.

The process is very easy and you can use any and multipurpose sensor, so if your a zigbee fan or zwave the process is the same.

Using double sided tape stick a 5kg or 10kg holding weight electromagnet to the switching face of the sensor.

As all irrigation rain switches are normally closed and shut off the circuit when they are wet. I’ve elected to use a PNP Transistor instead of a Relay. So the negitive from the 5v power pack is solder to th centre leg of the PNP Transistor, with one wire from the rain switch solded to right leg and a wire from the electromagnet soldered to the other. The other wires are conected to the positive.

If you are using a relay, then the rain sensor would turn off the relay, thus turning of the electromagnet.

What the PNP Transistor does is swap the negitive over to the electromagnet whenever the rain sensor is off (wet).

The materials are cheap, readily available and no rooting of any products. This is also way cheaper then buying a wireless rain sensor.

You could use this method for monitoring any powered or battery device.

1 Like

I’m sorry, I’m confused.

Most sensors intended for outdoor wet conditions are expensive because of the weatherproofing required. This doesn’t change any of that.

And I’m not sure why this would be

way cheaper then buying a wireless rain sensor.

Since you still have to have a multi sensor or some other sensor to provide the radio to communicate with SmartThings.

And I don’t know what this means:

and no routing of any product.

So I’m just confused about what you are going to deploy where and where the cost savings are going to be. And also what parts are going to be exposed to weather.

Can you give a more specific deployment example?

Currently to my knowledge zigbee and zwave rain sensors are not available and there are no rain sensor that connect to smartthings.

Placing the components in a waterproof box is easy and while this example uses a 5v power pack, which in the completed solution also powers the sensor. You could change things around and run it from a 9v battery.

At the controller end, you just use a smart plug, 12v power pack and a 5 pin car relay. Points 30 and 87a are connected to your irrigation system and 85 86 to the power pack.

Your smartthings or ifttt program is if multi sensor is closed (raining), turn on smart plug to tell irrigation system.

Any existing product that has an led that turns on and off to indicate a process or some other way of triggering a relay could be used wiith this method.

Just need to be careful of high voltages and to match the relay voltage to the circuit.

Spruce is an irrigation system with zigbee rain sensors which have had smartthings integration from the beginning:


There are also several Z wave leak sensors which can be attached to a probe and used for a number of different applications.

And for those in the EU, popp has a zwave rain gauge

Aside from those, zigbee is used in many agricultural and petrochemical outdoor sensornet applications, including a number of rain sensors, but I’d have to look at individual devices to see which ones would work with SmartThings.