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

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
1699 posts

Uber Geek

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.

22519 posts

Uber Geek

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

 
 
 
 


1699 posts

Uber Geek

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

596 posts

Ultimate Geek


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

1699 posts

Uber Geek

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.


22519 posts

Uber Geek

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

596 posts

Ultimate Geek


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

 
 
 
 


22519 posts

Uber Geek

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 »

Logitech introduces new Made for Google keyboard and mouse devices
Posted 16-Oct-2019 13:36


MATTR launches to accelerate decentralised identity
Posted 16-Oct-2019 10:28


Vodafone X-Squad powers up for customers
Posted 16-Oct-2019 08:15


D Link ANZ launches EXO Smart Mesh Wi Fi Routers with McAfee protection
Posted 15-Oct-2019 11:31


Major Japanese retailer partners with smart New Zealand technology IMAGR
Posted 14-Oct-2019 10:29


Ola pioneers one-time passcode feature to fight rideshare fraud
Posted 14-Oct-2019 10:24


Spark Sport new home of NZC matches from 2020
Posted 10-Oct-2019 09:59


Meet Nola, Noel Leeming's new digital employee
Posted 4-Oct-2019 08:07


Registrations for Sprout Accelerator open for 2020 season
Posted 4-Oct-2019 08:02


Teletrac Navman welcomes AI tech leader Jens Meggers as new President
Posted 4-Oct-2019 07:41


Vodafone makes voice of 4G (VoLTE) official
Posted 4-Oct-2019 07:36


2degrees Reaches Milestone of 100,000 Broadband Customers
Posted 1-Oct-2019 09:17


Nokia 1 Plus available in New Zealand from 2nd October
Posted 30-Sep-2019 17:46


Ola integrates Apple Pay as payment method in New Zealand
Posted 25-Sep-2019 09:51


Facebook Portal to land in New Zealand
Posted 19-Sep-2019 18:35



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.