Triggering an SSR from Arduino Zero with NPN -- what's my mistake in this schematic?

Hi -- I got one of these SSR's, which trigger on 3-32 VDC. It's driving a load at 12 VDC.

Unfortunately it needs 5mA to trigger, and the 2mA (if I have that right) of the Arduino Zero GPIO pin is not sufficient, so I wired up a PN2222A to drive it.

But I'm doing something dumb, because it's not working... here's what I have going:

Does it maybe have something to do with the fact that arduino ground and 12V PSU ground are not tied? Or maybe it doesn't work to trigger an SSR with the same source that is being switched?

Thanks for any hints! I know I'm going to feel silly.

Most probably the voltage of 2.7 V on the control + is not sufficient. Try to place the transistor between control - and PSU -.

Thanks, I'll try that!

Maybe this is a fundamental misunderstanding I have in thinking of NPNs like relays... in the above schematic, doesn't control+ see 12V when the NPN is activated?

One other note: if the arduino is powered by USB from a PSU that is plugged into the same power strip as the 12V PSU, the SSR activates constantly no matter the state of the pin. If I plug the arduino in via USB to my laptop, it never activates. (This is part of why I was wondering about the ground of the arduino vs the 12V PSU...)

No. The emitter voltage always is lower than the base voltage.

I'll be darned. Don't know how I made it this far not knowing that. Thanks for the education.

Ok, I wired it as shown here (apologies for tortured layout):

...now the SSR fires constantly when things are powered on, as long as the wire from the GPIO pin is plugged in... even if that wire connects to the arduino GND pin it activates the SSR (!). Anything obvious I'm still missing?

I don't see the Arduino GND in your diagram.
Also adjust the base resistor to limit the current to 2mA.

Yeah it's just a typical 5V wall wart supply plugged into the USB input. I was wondering if the arduino GND should be tied to the 12V PSU - ?

so that current can flow into the base and back to the Arduino.

Normally I dont think a SSR would require a transistor...

Gotcha, will do. It always feels "weird" to me for some reason to tie separate PSUs together, but clearly my intuitions need a lot of adjustment. :slight_smile:

Yeah I wasn't expecting it (and was bummed it didn't work), but this SSR apparently needs 5mA and AFAIK the arduino GPIO only supplies 2mA, right? The light on the SSR would dimly illuminate when the pin went high but not activate...

Like this?
schemeit-Project

Would that be smarter? Instead of what you drew, I'm powering the SSR input with the 12V supply (see my post #6). It was much more convenient to wire it that way in the physical installation this is in, but if that's dumb for some reason I could use the 5V from the arduino as you showed...

My drawing isolates the ZERO from the 12V circuit (separate grounds}, also, I should have drawn in a 1k transistor base resistor, 220Ω is a little low IMHO. But if your way works OK, proceed.

No.
The spec page states "7mA"
Zero | Arduino Documentation | Arduino Documentation

From datasheet page 875, 7mA?


3.3V - 0.7v = 2.6V / 220Ω = 11.8mA !! Blown GPIO pin?

An SSR input is an IRED and a series resistor.
I would suppose the current given a 3V signal is <= 2mA.
(I would assume 20mA with 32V applied. I could be wrong.)

Oh, hrmm, thanks... wonder what was happening then...

So, in the original configuration, I had the arduino on the 5V supply. The GPIO pin went to the SSR (no resistor inline; my understanding is that it isn't necessary with this one), and the - of the SSR control side went back to arduino ground. The load side received the 12V and the output (labeled "-") went to the load, load ground to 12V PSU ground.

Anything wrong with that? If that sounds correct, I'll try again with a different pin, but I did previously try two of them just in case it was something to do with the pins... any digital pin should be able to do this, right?

I set pinMode OUTPUT, and digitalWrite LOW in setup... then HIGH to turn it on... the SSR indicator LED would glow dimly when it went HIGH but nothing would happen.

@runaway_pancake -- interesting. Maybe that explains it then. Still, it would be a much more usable device if you could just drive it with a GPIO.

Yes, and?

I've always used a transistor to switch SSR inputs with 3.3V I/O for the reason you just described (weak input current), but base resistor should be large enough to prevent too much current from the output pin, 1.8k might work (1.4mA).