User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Controlling Relay Switch using GPIO

Mon Jun 02, 2014 2:51 pm

I see a couple of potential problems with the board. The relay is a 6 volt one. It might work at 5 volts, but it may not be reliable. If the transistor is a 2n3904 or equivalent I would be concerned that the load to the GPIO may be a bit high. a resistor in series with the base would seem to be in order.

If the transistor is a 2n7000, then all is well.

Other than that, it looks to be OK. Hard to tell without a schematic.

$4 for a pair of relays on a board is darn cheap.

For mains switching a Solid State Relay is still tops.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

SteveSpencer
Posts: 351
Joined: Thu Mar 28, 2013 9:19 am
Location: Nottingham, UK

Re: Controlling Relay Switch using GPIO

Mon Jun 02, 2014 3:02 pm

Richard,

do you mean something like this?

http://www.ebay.co.uk/itm/Module-SSR-25 ... 43c8650f6f

(No, I am not the seller, but I'm in the UK, and it was on the first page after I searched... :) )
Steve S
No, I can't think of anything funny that won't offend someone if they want it to...

klricks
Posts: 6441
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Controlling Relay Switch using GPIO

Mon Jun 02, 2014 5:47 pm

Richard-TX wrote:I see a couple of potential problems with the board. The relay is a 6 volt one. It might work at 5 volts, but it may not be reliable. If the transistor is a 2n3904 or equivalent I would be concerned that the load to the GPIO may be a bit high. a resistor in series with the base would seem to be in order.

If the transistor is a 2n7000, then all is well.

Other than that, it looks to be OK. Hard to tell without a schematic.

$4 for a pair of relays on a board is darn cheap.

For mains switching a Solid State Relay is still tops.
The schematic shows part BC548. Don't know how that cross references to the devices you mentioned?
http://s3.amazonaws.com/emimg/Products/ ... MANUAL.PDF
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

johndough
Posts: 254
Joined: Sun Jan 13, 2013 2:00 pm

Re: Controlling Relay Switch using GPIO

Wed Jun 04, 2014 9:38 am

klricks wrote:
johndough wrote: Pull in requires upto 8 times the hold in, so to pull in and hold I would think that the power needed would be 3.6 watts or 600 milli-amps.

####

So.....................
Where did those numbers come from?
From the data sheet the coil power is 0.36W @ 6V.
6V on the 100 Ohm coil would be 60mA (0.36W)
So....
5V on the 100 Ohm coil would draw 50mA (0.25W)
Pull in is 80% of 6V or 4.8V which would draw 48mA (0.23W)
Drop out is 5% of 6V or 0.3V
Hi

The needed amount is tiny.

One relay coil in and holding is 60 ma
Energise next one 60 ma * 8 = 480ma

Total 540 ma, then to hold both in you drop to 120 ma.
Rounding figures to 600 ma.

I read the spec sheet and in over 40 years of working with relays I found the drop out voltage to be about 60%.

The opinion is mine, it is what I would use for comfort. I would not be happy subjecting the Pi to that current pull.

Any way from what I see of the wiring there could be problems.

To make the relay board work you would want to connect 3 wires to the Pi (possibly 4) Common GND and the RL1 and RL2 wires from the relay board.
The 4th wire could be the 5 volt supply to the relay board from the Pi.
Or you could have another pair of wires to the relay board from it's own PSU.

##########################

There appears to be a BrowN and GreeN between the relay board and the Pi, presumably taking 5v to the Vcc and GND on the relay board.

Then an OrangE from Vcc to RL1 on the relay board. This pushes 5v up the transistor line.

################

Therefore I would expect the error is in the wiring.

Return to “Interfacing (DSI, CSI, I2C, etc.)”