What does the datasheet say about the relay?

Thread Starter

Wilmer Kluever

Joined Dec 1, 2020
9
I'm busy with a project that uses a Raspberry Pi zero and a relay. I've tried 2 relays and neither worked. I'd like some help to understand how to choose the correct relay, as well as which one will work.
First, I used this one: SSR-100DA. I connected the input to the Pi, and the output to my gate motor. The relay is supposed to allow a 2V current run through it, so the circuit to the gate motor is complete and the gate will trigger. This did not work. I tested the resistance, and it was extremely high, so the 2V current could not pass through. I went to the store and bought another relay: HRS4H-S-DC3V. The guy at the store said it will trigger at 3V, and since the Raspberry Pi outputs 3.3V it should be fine right? I swapped the old relay for the new one and it still didn't work. I used a multimeter to see how much power is passed to the relay, and it turned out to be only 1V, so I'm assuming the relay just lets 2V go to waste. I don't know enough about how these things work to know why this is. I looked up the datasheet, but that's all greek to me.
What I'd like to know is: How much current does the Raspberry Pi output?(I blew my multimeter trying to measure it), why does the relay just throw away 2V, how do I determine what relay will work by reading the datasheet, and a recommended datasheet.
It's a lot, but I need help desperately!
Thanks.
 

ericgibbs

Joined Jan 29, 2010
11,551
hi WM,
Welcome to AAC.
Check the Rasp Pi datasheet to see what is the maximum output current available on a Output pin.
Post back what you see.
E
 

AlbertHall

Joined Jun 4, 2014
10,769
You need a transistor between the Rpi and the relay, like the circuit below. Where it says +9V, that voltage should be whatever voltage the relay coil needs. The diode doesn't need to be a zener, an ordinary diode will do the job. It is there to prevent the large back emf from the relay coil damaging the transistor. The transistor could be a 2N2222.
1606824974924.png
 

MaxHeadRoom

Joined Jul 18, 2013
21,962
First, I used this one: SSR-100DA. I connected the input to the Pi, and the output to my gate motor. The relay is supposed to allow a 2V current run through it, so the circuit to the gate motor is complete and the gate will trigger. This did not work. I tested the resistance, and it was extremely high, so the 2V current could not pass through..
That is a SSR and only requires 3-32vdc to trigger at 3ma - 25ma.
2v is not a 'current' value!
Max.
 

Thread Starter

Wilmer Kluever

Joined Dec 1, 2020
9
You need a transistor between the Rpi and the relay, like the circuit below. Where it says +9V, that voltage should be whatever voltage the relay coil needs. The diode doesn't need to be a zener, an ordinary diode will do the job. It is there to prevent the large back emf from the relay coil damaging the transistor. The transistor could be a 2N2222.
View attachment 223816
Thank you for all the replies. I have a much better understanding now. Just need to understand the diagram better so I know how to wire it. So one 9V terminal goes to the relay(where exactly) and another to the diode? What are the three lines under the transistor? Also why should there be a 1KOhm resistor?
 

AlbertHall

Joined Jun 4, 2014
10,769
So one 9V terminal goes to the relay(where exactly) and another to the diode?
Which relay (part number/datasheet) are you going to use?
The one coil terminal of the relay goes to the supply for the relay coil (whatever voltage the coil of the relay you use needs)
The other relay coil terminal connects to the collector of the transistor.
The diode is connected across the relay coil, anode (the end marked with a stripe) to the collector of the transistor.

What are the three lines under the transistor?
That is an earth symbol. Here it means the negative of the power supply.

Also why should there be a 1KOhm resistor?
The base of the transistor needs enough current to allow the emitter-collector to pass enough current for the relay coil.
The Rpi will output about 3V. The base of the transistor needs only about 0.7V. The resistor serves to drop that 'spare' 2.3V while still providing sufficient current to the transistor base.
 

Thread Starter

Wilmer Kluever

Joined Dec 1, 2020
9
Which relay (part number/datasheet) are you going to use?
The one coil terminal of the relay goes to the supply for the relay coil (whatever voltage the coil of the relay you use needs)
The other relay coil terminal connects to the collector of the transistor.
The diode is connected across the relay coil, anode (the end marked with a stripe) to the collector of the transistor.


That is an earth symbol. Here it means the negative of the power supply.


The base of the transistor needs enough current to allow the emitter-collector to pass enough current for the relay coil.
The Rpi will output about 3V. The base of the transistor needs only about 0.7V. The resistor serves to drop that 'spare' 2.3V while still providing sufficient current to the transistor base.
I appreciate the help, but if I need all those extra components it kind of defeats the purpose of making it easy to implement. Everywhere on the internet where raspberry Pi's are used with relays, they recommend a 5V relay like this one: I was confused at first because it's a 5V?? Correct me if I'm wrong, but I think this is a relay that combines all the necessary components so I can connect it directly to the Pi? Is this all I really need?
 

ericgibbs

Joined Jan 29, 2010
11,551
Hi WK.
Those modules require a separate +5V supply for the relay drive circuit.
The relay drive logic is switched with simple GPIO logic pin.
Note:
on some of those modules, the logic drive pin must at 5V not 3.3V, check which version you need.
also some require a logic Low [ 0v] to operate the relay/

Post which which module you are thinking of buying.

E
 

Thread Starter

Wilmer Kluever

Joined Dec 1, 2020
9
The SSR-100DA. I looked up just requires 3v to trigger?
Max.
That is correct, and the light on it showed that it does trigger correctly, however there is 2V that needs to pass through the output and back into the gate motor terminals, which didn't work. I hooked up a multimeter to the output terminals, and measured a very high resistance, which is why I think the gate motor didn't trigger. It maybe has some kind of way to determine the voltage passing through, and if it is not the entire 2V, it doesn't open.
 

Thread Starter

Wilmer Kluever

Joined Dec 1, 2020
9
hi WM.
What is the operating voltage for the motor you are trying to control with that SSR.?
E
It doesn't connect to the main circuit that drives the motor. There is a sub-circuit that just detects 2V going from one to another terminal. You can short the terminals with just a piece of wire and the gate will trigger, so its a low voltage.
 

BobTPH

Joined Jun 5, 2013
2,721
Please explain what you are trying to turn on via the relay. You said "gate motor". If you are talking about a motor that opens / closes a gate (like one in a fence, not a logic gate,) it is not likely it works at 2V.

Bob
 

ericgibbs

Joined Jan 29, 2010
11,551
There is a sub-circuit that just detects 2V going from one to another terminal

Hi Bob,
It seems he has another unit in series with MCU and the Motor.???
Which requires a 2V operating signal.

E
 

Thread Starter

Wilmer Kluever

Joined Dec 1, 2020
9
Please explain what you are trying to turn on via the relay. You said "gate motor". If you are talking about a motor that opens / closes a gate (like one in a fence, not a logic gate,) it is not likely it works at 2V.

Bob
On the gate motor electronic controller there are multiple terminals which will do different things if shorted. There is a COM and TRIG(trigger) terminal that if I short it with a small piece of wire, the gate opens. I don't have to keep the wire there. I connected a multimeter to the terminals, and that is the 2V I measured. That's why I need a relay to just short the COM and TRIG terminals for a fraction of a second when I supply power to the relay from the RPi.
 

Daniel Sala

Joined May 28, 2015
65
Hi,

For a short power-up pulse that goes high immediately at switch-on and low very quickly, you could use a PNP or PMOS with an RC network from V+ to the base/gate. Look for POR circuits. The below link shows one, you could just use Q1, R2, R1 and C1and take the pulse you need from the collector-R2 junction, use R4 for current limiting if needed.

Power On Pulse Circuit

Or, you could also use a 555 monostable that will trigger at power-up.
 
Last edited:
Top