Connecting Solid State Relay

Hi, is this the right way to connect a solid state relay to an Arduino?

Circuit Diagram

I'm using an Adafruit Metro version of the Uno Arduino board.

This is the relay module I have: Solid State Relay

It is a 12volt magnetic latch, same model as this: magnetic latch

I'm powering the Uno via the onboard barrel jack from a 12V DC supply. What I'm not sure about is whether I can use the VIN pin to supply 12V to the magnet?

My understanding is that the VIN jack will bypass the regulator, allowing the magnet to use the full 12v. I'm hoping to power the board and magnet off one power supply (either plug pack, or a 12v battery at a future stage).

Thanks

1/ what 12v psu are you using? enough to provide the power pulses for the relay/
2/ could you post a circuit diagram so we can see what you're doing?
3/ the arduino will only sink/source at 5v. so you'll need an h-bridge to switch the relay .

In principle sounds like it should be ok

regards

Allan

Thanks Allan.

My post above has a link to the circuit diagram.

The power supply I'm using is a generic power brick with 12v 1amp output.

Regarding the relay, it takes a 5v supply, but the documentation for the board has this:

  • Input Voltage of Control Signal: 0-2.5V (low level state), the relay will be on; 3-5V (high level state), the relay will be off.

If I set it as an output pin in my sketch, won't it be in the correct range to trigger the relay?

Don't use D1. That pin is already reserved for serial comms.

Can't use this SSR to switch a low voltage load. Only mains powered loads.

Can't you control that solenoid with a logic level mosfet, like everybody else does.

Don't power the solenoid from V-in if you power the Arduino with 12volt on the DC socket.
There is a reverse protection diode between DC socket and V-in with a max rating of 1Amp.
Leo..

Wawa:
Can't you control that solenoid with a logic level mosfet, like everybody else does.

http://www.gammon.com.au/images/MOSFET_low_side_driver.png

Didn't know I could use a mosfet, thanks! (I'm a software guy, hardware is new to me).

I have this relay board which should do the trick instead: Relay board

I'll read up on mosfets.

Wawa:
Don't power the solenoid from V-in if you power the Arduino with 12volt on the DC socket.
There is a reverse protection diode between DC socket and V-in with a max rating of 1Amp.

The magnet only draws 100mA - wouldn't this be ok?

If not, I can make up a small harness for the power brick to split it before it hits the Arduino.

Wawa:
Don't use D1. That pin is already reserved for serial comms.

Cheers!

That relay board will work, but will draw ~80mA from the 5volt pin.
Don't know the "Metro". The 5volt regulator might get hot on a 12volt supply.
The gate of a mosfet draws nothing from the Arduino.

"The magnet only draws 100mA - wouldn't this be ok?"
A 2N2222 with ~1k base resistor could be used for that sort of current.

"I can make up a small harness for the power brick to split it before it hits the Arduino."
Wise.
Leo..

That's an AC relay with a triac switching element, it won't turn off by removing the gate signal.
Also, you should have a "kickback" diode in parallel with the electromagnet.

outsider:
That's an AC relay with a triac switching element, it won't turn off by removing the gate signal.
Also, you should have a "kickback" diode in parallel with the electromagnet.

Would a 1N4007 be appropriate for use as a fly back diode?

I have the following on hand:

1N4148
1N4007
1N5819
1N5399
FR107
FR207
1N5408
1N5822

It seems to be switching on and off fine in my little test circuit, but I haven't connected the magnet to it yet. I am explicitly setting the output pin LOW or HIGH in my sketch as needed.

dannyf:
Would a 1N4007 be appropriate for use as a fly back diode?

It seems to be switching on and off fine in my little test circuit, but I haven't connected the magnet to it yet. I am explicitly setting the output pin LOW or HIGH in my sketch as needed.

Yes. Almost any diode would do for a small 12volt/100mA solenoid.
The 1N5819 (schottky) would be my pick.

What test circuit. A 2N2222 with 1k base resistor?
We don't have crystal balls here.
Leo..

Wawa:
What test circuit. A 2N2222 with 1k base resistor?
We don't have crystal balls here.
Leo..

Sorry, relay module connected as follows:

Relay Vcc -> Arduino 5v
Relay Gnd -> Arduino Gnd
Relay In1 -> Arduino digital pin

So the relay coil is powered by the arduino 5v pin. The relay module is capable of opto-isolation, but I have a 12v power supply with no way to step it down to 5v and power the coil (and a 2 week wait if I need additional components).

The relay you linked (NOT the solid state one) has a 5V coil so you’re good to go, connect 12V+ to NO, magnet + to COM, magnet - to 12V - and don’t forget the 1N4007 in parallel with the magnet, cathode (end with white stripe) toward + (toward the relay).
relay.png

Hi,
The OPs circuit.
circuitaaa.jpg
Please post them directly to the forum instead of offsite, some forum members are not using laptops or desktop computers.

Tom… :slight_smile: