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.




102 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
1664 posts

Uber Geek
+1 received by user: 188

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.

22051 posts

Uber Geek
+1 received by user: 4680

Trusted
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

 
 
 
 


1664 posts

Uber Geek
+1 received by user: 188

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

587 posts

Ultimate Geek
+1 received by user: 76


  # 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.

1664 posts

Uber Geek
+1 received by user: 188

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.


22051 posts

Uber Geek
+1 received by user: 4680

Trusted
Subscriber

  # 1313435 28-May-2015 12:54
One person supports this post
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

k14

587 posts

Ultimate Geek
+1 received by user: 76


  # 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).

22051 posts

Uber Geek
+1 received by user: 4680

Trusted
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



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

HPE to acquire supercomputing leader Cray
Posted 20-May-2019 11:07


Techweek starting around NZ today
Posted 20-May-2019 09:52


Porirua City Council first to adopt new council software solution Datascape
Posted 15-May-2019 12:00


New survey provides insight into schools' technology challenges and plans
Posted 15-May-2019 09:30


Apple Music now available on Alexa devices in Australia and New Zealand
Posted 15-May-2019 09:11


Make a stand against cyberbullying this Pink Shirt Day
Posted 14-May-2019 20:23


Samsung first TV manufacturer to launch the Apple TV App and Airplay 2
Posted 14-May-2019 20:11


Vodafone New Zealand sold
Posted 14-May-2019 07:25


Kordia boosts cloud performance with locally-hosted Microsoft Azure ExpressRoute
Posted 8-May-2019 10:25


Microsoft Azure ExpressRoute in New Zealand opens up faster, more secure internet for Kiwi businesses
Posted 8-May-2019 09:39


Vocus Communications to deliver Microsoft Azure Cloud Solutions through Azure ExpressRoute
Posted 8-May-2019 09:25


Independent NZ feature film #statusPending to premiere during WLG-X
Posted 6-May-2019 22:13


The ultimate dog photoshoot with Nokia 9 PureView #ForgottenDogsofInstagram
Posted 6-May-2019 09:41


Nokia 9 PureView available in New Zealand
Posted 6-May-2019 09:06


Motorola Solutions joins local partners to deliver advanced communications network in New Zealand
Posted 30-Apr-2019 21:50



Geekzone Live »

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


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



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.

Alternatively, you can receive a daily email with Geekzone updates.