Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


ianboag

103 posts

Master Geek
+1 received by user: 3

Trusted

#173580 28-May-2015 10:56
Send private message

To drive a relay from the Pi, one needs to cobble up a fairly simple circuit where the 3.3V GPIO pin turns on a transistor that drives the relay. This is such a common requirement that I figured someone somewhere must sell a PCB for it. Or even a relay with the transistor driver on the same board?

In my case I only want to run a little reed relay to manage a contact closure .... but I still need to do the transistor thing. I have made one already on some generic Vero but like the idea of a "proper" PCB.  I need some more and don't feel any urge to acquire PCB layout/manufacturing skills.

Any ideas?

Create new topic
SumnerBoy
2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1313361 28-May-2015 11:35
Send private message

Just connect the GPIOs directly to one of these;

http://www.hobbyist.co.nz/?q=4-channel-relay-module

They have the necessary transistors and isolation/buffer circuitry to protect the GPIO pins. 

I am using one of these boards with a RPi to control my irrigation solenoids. Been up and running for a couple of years with zero issues.



richms
29098 posts

Uber Geek
+1 received by user: 10207

Trusted
Lifetime subscriber

  #1313376 28-May-2015 11:48
Send private message

I have seen a relay hat for the pi around somewhere before, so it already exists.




Richard rich.ms

SumnerBoy
2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1313380 28-May-2015 11:52
Send private message

I actually have a PiFace sitting around somewhere I could be talked into flicking on, if you are interested. It has two on-board relays and screw terminals for the other GPIO pins. Quite a handy board for dev/testing/prototyping. PM me if you are keen.




k14

k14
631 posts

Ultimate Geek
+1 received by user: 94


  #1313391 28-May-2015 12:00
Send private message

SumnerBoy: Just connect the GPIOs directly to one of these;

http://www.hobbyist.co.nz/?q=4-channel-relay-module

They have the necessary transistors and isolation/buffer circuitry to protect the GPIO pins. 

I am using one of these boards with a RPi to control my irrigation solenoids. Been up and running for a couple of years with zero issues.

How do you set the schedule for turning them on/off? I was thinking of doing this for my home irrigation too, the hunter controller I have at the moment is pretty restrictive as to the schedule you can program into it.

SumnerBoy
2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1313395 28-May-2015 12:04
Send private message

I wrote a little Python script which runs on the RPi (found here: https://github.com/sumnerboy12/mqtt-gpio-monitor) and then *speak* to it using MQTT publishes from my openHAB home automation system.

Once you have the RPi setup with mqtt-gpio-monitor it is pretty easy to get openHAB sending commands - and then you have full control. I would be happy to share my openHAB irrigation config if you are interested - it has some rules to scale back irrigation based on the current and historical (last 1-2 days) temp, humidity and rainfall.


richms
29098 posts

Uber Geek
+1 received by user: 10207

Trusted
Lifetime subscriber

  #1313435 28-May-2015 12:54
Send private message

I was looking into doing all that for irrigation, but in the end just bought this

http://www.ebay.com/itm/IrrigationCaddy-S1-Refurbished-/231312073736?pt=LH_DefaultDomain_0&hash=item35db462408

Only got one valve on it at the moment, they can do a AU plug PSU and its ready to go. Not sure what you could do to enable/disable it etc but till I zone my drippers I need to run them all regardless of weather since some are under cover and dont get rain on them.




Richard rich.ms

 
 
 

Support Geekzone with one-off or recurring donations Donate via PressPatron.

k14

k14
631 posts

Ultimate Geek
+1 received by user: 94


  #1313478 28-May-2015 13:50
Send private message

richms: I was looking into doing all that for irrigation, but in the end just bought this

http://www.ebay.com/itm/IrrigationCaddy-S1-Refurbished-/231312073736?pt=LH_DefaultDomain_0&hash=item35db462408

Only got one valve on it at the moment, they can do a AU plug PSU and its ready to go. Not sure what you could do to enable/disable it etc but till I zone my drippers I need to run them all regardless of weather since some are under cover and dont get rain on them.

Wow that looks much easier. Will have to look into that. Now just got to work out how to get cat 5 to under my kitchen bench (where irrigation controller is).

richms
29098 posts

Uber Geek
+1 received by user: 10207

Trusted
Lifetime subscriber

  #1313492 28-May-2015 14:02
Send private message

They have a wifi model, or just add a wifi bridge to that one.




Richard rich.ms

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.