EZKernel
Posts: 19
Joined: Sat May 25, 2019 4:39 pm

solid state relay

Fri Aug 16, 2019 8:07 am

Hi all, I purchased some fotek SSR25DA relays to switch an A/C load because my electromechanical ones get fried.

I connected the GPIO pin via a 330 resistor to the relay + and - to pi ground. The relay was on a heatsink I made.

It ran for about 15 minutes as I monitored the temp of the heatsink which never went above 38 C. Keep in mind it was running around 1000w; then it started flickering and died. I checked the specsheet and it's operating temps go up to 80. Craziest thing is that I had 2 of them on a heatsink and after this happened the second one didn't work either but the second one never got a load.

I tried using a switching transistor 2n2222 on the 5v rail with 220 resistor and no action. I'm not an engineer so please take it easy on me. I doubt I fried the SSR just wondering what I try next.

EZKernel
Posts: 19
Joined: Sat May 25, 2019 4:39 pm

Re: solid state relay

Fri Aug 16, 2019 8:13 am

what would be a safe way to check the voltage an amperage across the terminals of the SSR?

pcmanbob
Posts: 6645
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: solid state relay

Fri Aug 16, 2019 8:15 am

So my first question would be were did you get your SSR's from ?

If you apply 5vDC and ground to the input side of the SSR, and the output does not turn on then it can only be the SSR that has failed, if however it works then you need to check the output of your pi gpio pin as you may have damaged that.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

gordon77
Posts: 4114
Joined: Sun Aug 05, 2012 3:12 pm

Re: solid state relay

Fri Aug 16, 2019 8:18 am

Are you sure they have died and just not being triggered ? How are you proving they are dead ?

It quotes the trigger current is 7.5mA @ 12v, do you know the trigger current @ 3.3v ?
Last edited by gordon77 on Fri Aug 16, 2019 8:29 am, edited 2 times in total.

pcmanbob
Posts: 6645
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: solid state relay

Fri Aug 16, 2019 8:19 am

EZKernel wrote:
Fri Aug 16, 2019 8:13 am
what would be a safe way to check the voltage an amperage across the terminals of the SSR?

With the mains supply and load connected you need a mains rated multi meter to measure the AC volts and a clip-on AC amp meter.

If you have no electrical training I suggest you seek help from some one who has, as mains AC voltage can and will kill you , you should also use good quality test equipment and not cheap hobby meters.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

EZKernel
Posts: 19
Joined: Sat May 25, 2019 4:39 pm

Re: solid state relay

Fri Aug 16, 2019 8:36 am

Hi, I don't care about AC mains voltage as all that stuff is locked behind a box and the house runs on it so I'm sure it works :lol: .

they are ebay SSRs. I have checked the output of all the pins I used an could light up and LED with them.

I have no idea what the trigger current should be at 3v3 but I aimed for 10ma.... and it did work albeit temporarily.

when I measure the voltage across the dc side of SSR I only see 500mV where I expect to see 5.

pcmanbob
Posts: 6645
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: solid state relay

Fri Aug 16, 2019 8:55 am

Its possible than that they are cheap Chinese SSR's that may actually be factory rejects , so they could be faulty or fail quickly.

Have you tried a 5v DC power supply of 500mA or greater output , directly connected to the SSR input terminals to see if it will switch on ?

If you supply voltage is being pulled down to 0.5V when you attempt to power the SSR input then either the power supply cant supply enough current to switch the SSR and is pulling the supply voltage down , or the input on the SSR is a partial short circuit which is pulling the voltage down due to the high load current.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

EZKernel
Posts: 19
Joined: Sat May 25, 2019 4:39 pm

Re: solid state relay

Fri Aug 16, 2019 9:18 am

must be something on my end because it switched on at 12v 1400ma

maybe a bad wire?

gordon77
Posts: 4114
Joined: Sun Aug 05, 2012 3:12 pm

Re: solid state relay

Fri Aug 16, 2019 9:20 am

"when I measure the voltage across the dc side of SSR I only see 500mV where I expect to see 5."

Where is the 5v coming from? The GPIO output is only 3.3v

EZKernel
Posts: 19
Joined: Sat May 25, 2019 4:39 pm

Re: solid state relay

Fri Aug 16, 2019 9:34 am

i used the 5v rail and a resistor to drive a 2n2222 from gpio

pcmanbob
Posts: 6645
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: solid state relay

Fri Aug 16, 2019 9:41 am

Re-reading you original post there seems to be some confusion about how to connect the SSR to the pi gpio.

it should work correctly if connected like this

Image
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

EZKernel
Posts: 19
Joined: Sat May 25, 2019 4:39 pm

Re: solid state relay

Fri Aug 16, 2019 9:00 pm

thanks for the diagram

wont this draw too much current from the 5v rail?

I got it to work using your diagram with a 5k on the load side of 5v and 10k between the pi and the base, but when the pi boots up and defaults the pin to input it saturates the base and activates the SSR until I set it to output where I have full control.

Should I pull down the gpio to ground to fix that? If i do that it will divide the voltage I think. so I need like a 50k resistor?

EZKernel
Posts: 19
Joined: Sat May 25, 2019 4:39 pm

Re: solid state relay

Fri Aug 16, 2019 10:12 pm

after more testing i'm at a loss.

I grabbed another fresh ssr and was able to trigger it with 3v3 logic - without the 2n2222...

but the last time the same thing happened, I was able to trigger it without the transistors and it only worked for 15 minutes, so I assume the same thing will happen again.

The old SSRs were not even triggerable by the 5v. I can still trigger them with 12v so I will work on modifying the 2n2222a to handle that.

EZKernel
Posts: 19
Joined: Sat May 25, 2019 4:39 pm

Re: solid state relay

Fri Aug 16, 2019 11:08 pm

Code: Select all

 
                    SSR
12v---------------[+  -]----
                           |
                           | 
  3.3v control     10k     /
       ------------===----|   2n2222a331
                           \
                  330R      |
            ------===-------
            |
           [b] _[/b]
       Common ground
 
I will connect the ground to pi ground or should I combine the pi and 12v grounds?
I got the resistance values from this calculator

https://www.petervis.com/GCSE_Design_an ... lator.html

EZKernel
Posts: 19
Joined: Sat May 25, 2019 4:39 pm

Re: solid state relay

Sat Aug 17, 2019 4:45 am

combining the grounds is the way to go.

been working solid a good 30 minutes now and hasn't gotten hotter than 40.

definitely not 3v or 5v logic though. maybe once it heats up the internal resistance of the components increases and the voltage drop is too heavy.

just a speculation based on what happened to me with these.

pcmanbob
Posts: 6645
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: solid state relay

Sat Aug 17, 2019 10:43 am

Yes you need to common the grounds but you don't need the 330R resistor in the ground leg of the transistor, you just need to connected it to the ground of the pi/12v psu.

what do the specifications say for the SSR you are using not all of them are usable with 3 or 5V on the control inputs.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

danjperron
Posts: 3391
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: solid state relay

Sat Aug 17, 2019 11:48 am

I'm with pcmanbob.!

SSR input are opto coupler with build-in resistor in series. If you add a resistor you will limit the current at the led of the opto coupler and it could misfire the trigger on the triac on the output side of the SSR.

Since you are using a 2n2222 use 12V to the + input , connect the transistor collector to - input and both ground of the 12V and PI together.

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