Connecting Relay and arduino with a load

Hi,
I have 4ch relay module which I would like to control with arduino.
Here is the schematics I came up with:

The really gets is power from Arduino +5V and GND.
The solenoid + is connected to the Relay COM pin while the Normally Open pin is connected to the external supply + wire. The solenoid GND is connected to the external power supply GND.
a control signal of High and LOW is send from Arduino pin 2 to connect and disconnect the relay COM pin and the solenoid (which is connected to the relay Normally Open pin)

I was wandering for two things:

  1. I should not in any case connect the external power supply GND and arduino GND together right?
  2. my setup right now is that the relay is making a connection between the external power supply + and the solenoid + , while the power supply GND and the solenoid GND are tied together.
    What difference will it make to do the opposite? Tiding the power supply + to the solenoid + while using the relay to switch the power supply GND and the solenoid GND ?

Any other comments on my schematics I share? is it fine as it is?
Thanks.

edit2: this is the solenoid I'm using:


one wire have a dashed white lines and the other is mainly black with some writing on it

How can I know the polarity of that type of solenoid? (I bought it from eBay and nothing was specify regarding the polarity)

That is a mistake. A 12V relay board would have been a better choice. That way, the relay coils would be powered directly by the 12V PSU. With a 5V relay module, the Arduino's onboard regulator must supply power to the relay coils, and the onboard regulator can easily overheat, and it's voltage can drop, causing the Arduino to reset or be damaged. And that's just with one relay. With 4 relays activated at the same time...

Better even than 12V relays would be to use (logic-level, n-channel) MOSFETs such as stp16nf06l or irlz44.

So I will need three different power supply? 1 - to power the arduino (usually a computer) 2 - to power the relay module (VCC and GND) and 3 - to power the load (solenoid) via the relay COM and N/O pin ?

That is the relay I'm using:

Is a FQP30N06L also a good Logic Level MOSFET ?
using a MOSFET with arduino without relay will require adding a Optocoupler such as the LTV-816

The solenoid should have a reverse diode across it to stop the spike of interference you get when turning off an inductive load.

2 Likes

Could it be my solenoid have no polarity? or all solenoid have polarity?

It depends on if the moving part is magnetised or not. Normally they are not so you just get an electro magnet being made which pulls the plunger into the field. When the current is removed the spring pulls the plunger out. So normally no polarity.

1 Like

In that case a diode across it with the cathode at the + connection is still needed?

Of course it is still needed, it is an inductive load after all.

Generally not, unless it already includes the diode. :thinking:

I doubt your does, but if it does you may find out the hard way. :astonished:

No, only one. The 12V supply would power the solenoids, relay coils and potentially the Arduino. If you want to continue to power the Arduino with a separate 5V PSU, for some reason, you can do that. But provided the Arduino is powering only itself and maybe a small number of low power components, the Arduino's built-in regulator should be able to do that without overheating while powered by the 12V PSU.

However, if you continue to use 5V relays, you will definitely need a second, 5V PSU. The Arduino's built in regulator will not be able to provide enough current for 4 relay coils from a 12V supply without overheating. Even one relay coil might be too much.

Yes, that's very similar to one of my suggestions.

No.

hello hk_jk
I have seen that discussion about relays and the relay Board.
my first question about that relay Board is, if the board has any logic on itself to sort out that four relays and define which relay has to be activated or are all control lines connected together and all relays are activated at the same time.
This ist important because the power consumtion of the relay coil is about 72mA of current . That is alredy a lot of current because the maximum is about 100mA on all digital outputs together, due tto the data sheets I found.
To reduce the needed power on the outputs and with that action reduce the heat on the processor chip istself you should think about an optical cupler that is able to switch a hiher amount of current and normally has a very low need of current to control the input side (5mA to 15 mA) Then you have eliminated the problem with the ground too.
The second option would be a sort of driver that is controled by nearly only the Voltage at the input and will consume less than 10 mA at the input side.
Always keep an attention on the power used at the outputs of the chip itself. As more power as you take in total ase more heat is produced in that chip and that will result in the end to an overheat situation that blows the chip.

Assuming using a +12V relay:
that is the correct way of the circuit?
(Arduino gets is power for computer)
Do I need to tie PSU GND and Arduino GND together?

Each relay will be activated at a different time (overlap will accrue) triggered by individual GPIO pin

Any schematics you can point me too?

I guess that the current need to drive a relay is not the same as needed to open a MOSFET/BJT for switching application. This may be the reason I got all confused. What specify the amount of current needs to activate a relay?

Yes.

And you also need to connect 12V to the Vin or barrel jack.

Unless it will be powered separately from a computer or another device such as a phone (+5V) charger ?

Of course, but you still need to connect the grounds together.

All of the diagram I've seen on google using relays and arduino has not tie the load external supply GND with the arduino GND. why is so?

edit: for example:

Because you have not been looking at them right, that is you misunderstood them, or because what you have been looking at will not work. See
(http://www.thebox.myzen.co.uk/Tutorial/Power_Supplies.html)

What is that stupid board in the middle? it is possible that there is a continuous ground at both ends of that and so it HAS a common ground between the Arduino and the external supply.

It looks like a relay board, so you have misunderstood what is happening.

Thanks for your link. I will make sure to read it!

I have just found that card and I have to do some corrections to my forst entry.
it is correct, that the relay itself consumes that 70 mA of power but this is driven by an amplifier alreday and separated by an otical coupler. that means the power to drive the relays is taken from the external power supply. in that case you can use the unit with an external power supply. you can use the power of this power supply to put it to the arduino too if you ise the +Vin input.
I found this card as a 5V version, and on your photo I saw that the relays are 5V types . make shure that the poard is made for 12 V DC .