Raspberry Pi and a SSR

Thread Starter

Gregws

Joined Dec 20, 2013
12
Hi there,

I'm working on a project turning a fridge on and off with a Raspberry Pi.
The GPIO is 3.3v and is enough to trigger a SSR I have.
But I'm not sure whether I need to use Diodes or resistors.



If you could please help me out it would be great.
Thanks,
Greg
 

Thread Starter

Gregws

Joined Dec 20, 2013
12
Thanks, I'm terrible with circuitry. I appreciate any help you can give me
So I have to use the 5V on the pi?
I cant use the GPIO to send HIGH LOW? to switch the relay?
 

#12

Joined Nov 30, 2010
18,224
No, the drawings show the Pi containing 0 volts and 3.3 volts. The 5V is supplied separately because we've been seeing troubles getting available SSR's to work with 3.3 volts. The purpose of these circuits is to enable you to use the GPIO to send HIGH and LOW to switch the relay.
 

Attachments

Thread Starter

Gregws

Joined Dec 20, 2013
12
So if I didnt need to use the 5v I could just go GPIO straight into SSR then out to earth without the use of resistors or diodes?
Or does the SSR need a constant 3.3v from the PI and then have the GPIO high low it?

I'm taking your circuit into the electronics store and getting the bits required.
 
Last edited:

#12

Joined Nov 30, 2010
18,224
What you just described is 2 ways to do exactly the same thing, but the logic is reversed.

Could somebody else please take this? I'm just working off that thread I reference in post #2. I don't have personal knowledge.
 

Thread Starter

Gregws

Joined Dec 20, 2013
12
Well I appreciate all the help you have given me.
I will wire it up the way your diagram shows and let you know how I get on
 

Alec_t

Joined Sep 17, 2013
14,313
I've no practical experience of SSRs, but am aware they have different output ratings. Presumably the one you have is rated for inductive loads (at the voltage your fridge requires) with high initial current surges (assuming your fridge is a motorised unit rather than a Peltier type)?
 

Thread Starter

Gregws

Joined Dec 20, 2013
12
Yes I have made sure that it can withstand the AC power. The fridge uses a compressor.
I checked my wire diagram on the fridge.
rated V = 230-240
50hz
rated input 150w

W/V=A
150w/240v=0.6A
The SSR output is rated at 3A 240V
 

Thread Starter

Gregws

Joined Dec 20, 2013
12
Ok, just got this working with a few modifications.

GPIO 3.3v as source.
gate and dump as grounds.

Works toggled off the GPIO pin

Rich (BB code):
while ( True ): 
		print str(wortTemp.getCurrentTemp()) 
		temperature = wortTemp.getCurrentTemp()
		if temperature > 18:
			GPIO.output(17, GPIO.HIGH)
			time.sleep(1)
		elif temperature < 18:
			GPIO.output(17, GPIO.LOW)
			time.sleep(1)
 

Alec_t

Joined Sep 17, 2013
14,313
?? I don't see how that can work, since the 2N7000 is permanently turned off by having its gate grounded.
If the SSR input current requirement is well below the output drive capability of the GPIO pin and the SSR will trigger reliably from 3.3V then you don't need the FET or the resistor.
 
Last edited:

Thread Starter

Gregws

Joined Dec 20, 2013
12
Yeah, since the resistor is soldered in, I left it there.
Well the 2N7000 was completing the circuit when I was using the constant supply from the 5v pin.
The fridge stayed on all the time. Even if gate was set to LOW or HIGH output from the GPIO.

With the 3.3v GPIO as source and earth for both gate and dump it works fine.
 

Thread Starter

Gregws

Joined Dec 20, 2013
12
So the diode gate has blown?

I just read your post again
If the SSR input current requirement is well below the output drive capability of the GPIO pin and the SSR will trigger reliably from 3.3V then you don't need the FET or the resistor.
If that is the case. Would my initial suggestion be correct?

3.3v GPIO -> SSR 3v Input -> SSR Output -> Earth
Or should I always use a diode between SSR Output and Earth?
 
Last edited:

Thread Starter

Gregws

Joined Dec 20, 2013
12
Great, so because the FET has shorted closed, I can still use the diode function of the 2N7000 as it will only allow current one way?

Or would it be worth removing the components and rewire it
 
Top