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

22187 posts

Uber Geek
+1 received by user: 4756

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

 
 
 
 


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

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


22187 posts

Uber Geek
+1 received by user: 4756

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

 
 
 
 


22187 posts

Uber Geek
+1 received by user: 4756

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 and LinkedIn »



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 »

Xero announces new smarter tools, push into the North American market
Posted 19-Jun-2019 17:20


New report by Unisys shows New Zealanders want action by social platform companies and police to monitor social media sites
Posted 19-Jun-2019 17:09


ASB adds Google Pay option to contactless payments
Posted 19-Jun-2019 17:05


New Zealand PC Market declines on the back of high channel inventory, IDC reports
Posted 18-Jun-2019 17:35


Air New Zealand uses drones to inspect aircraft
Posted 17-Jun-2019 15:39


TCL Electronics launches its first-ever 8K TV
Posted 17-Jun-2019 15:18


E-scooter share scheme launches in Wellington
Posted 17-Jun-2019 12:34


Anyone can broadcast with Kordia Pop Up TV
Posted 13-Jun-2019 10:51


Volvo and Uber present production vehicle ready for self-driving
Posted 13-Jun-2019 10:47


100,000 customers connected to fibre broadband network through Enable
Posted 13-Jun-2019 10:35


5G uptake even faster than expected
Posted 12-Jun-2019 10:01


Xbox showcases 60 anticipated games
Posted 10-Jun-2019 20:24


Trend Micro Turns Public Hotspots into Secure Networks with WiFi Protection for Mobile Devices
Posted 5-Jun-2019 13:24


Bold UK spinoff for beauty software company Flossie
Posted 2-Jun-2019 14:10


Amazon Introduces Echo Show 5
Posted 1-Jun-2019 15:32



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.