Connect a solid state relay

I searched a bit on the forum, and found others already connecting solid state relays to their arduino.

None of them seemed to have a resistor in, and somewhere else I read that inside a solid state relay, a diode is driven to open for the high voltage. But isn’t it necessary to use a resistor, or did I overlook something? And if not, why isn’t it needed? Couldn’t it damage the pin if it is connected directly?

There was a topic about that. It seems that most of the SSR can accept direct driving voltage in certain interval - say 3.5-5.5 volts and no current limiting resistor is needed. But I personally blew one SSR which in fact needed a resistor.
It seems that how to drive it is clearly written in the datasheet. I myself did not read the datasheet at first :slight_smile:

On a solid state relay input there is the LED of an opto isolator. Most of them also have a built in current limiting resistor but not all as witnessed above.
So if you need a resistor and you don't fit one, it is more likely you will blow the arduino but blowing both is possible.

It’s the old rule that one should check the datasheet before implementation. If the SSR’s input requirement is stated in voltage, say 3-25vdc, then you can be certain that the device has an internal series resistor.

Lefty

Is it true that you also do not need a diode since a coil is not used?

Is it true that you also do not need a diode since a coil is not used?

Correct.

Going to look at bit more on the relays tomorrow, and trying to find a datasheet on them. But got an idea of what is going on inside those now.

The solid state relays I got can be operated from 3 to 30V, so they should have the resistor in then, but going to check, just in case. Not worried about the relays them self, used them with a 12V car battery before, I just don't want to damage the arduino.

Wait a minute, everything else I've read said that a diode was required in order to prevent frying the Arduino, but you're saying there are circumstances where it is NOT required?

(I've yet to understand how to wire in this diode. I've seen several drawings of the circuit with the transistor and the diode and the relay, but it always looks backwards to me.)

/Newbie

This is not a normal relay with a coil. So it won't kick back. The diode on other relays are there to cancel that out.

(I've yet to understand how to wire in this diode. I've seen several drawings of the circuit with the transistor and the diode and the relay, but it always looks backwards to me.)

It indeed is wired 'backwards' from what a typical diode installation would have. It's pretty simple, when you apply DC voltage to a relay coil it develops a strong magnetic field. When the voltage is removed from the coil (it's an inductor actually) the magnetic field collapses and that causes an electrical current to flow in the opposite direction from the starting applied polarity. The diode wired 'backwards' was reversed biased (no current flowed through it) but now with the collapsing field creating a reverse DC voltage the diode starts conduction and thus the transient current is clamped quickly by the diode. Note that you will not see such diodes wired to AC coil relays as the diode would be a short circuit on every other half of the AC sine wave.

Lefty