Can I drive a two relay module directly from Arduino

Hello,
I'm new to the forum and to electronics in general
I'm trying to use a Nano board to turn a twenty year-old off grid solar power system into a battery priority grid-tied system. But, lest I bore you with the details, I'm hoping to use a two relay module

to turn on AC power to charge a bank of 12v batteries. I have read these two topics:

Use single Arduino pin to drive two opto-isolators in relay module

and to be honest, the information in them, they appear to contradict each other. Or do they?

The relay module has two headers, one three pins and the other 4 pins. The three pins one is labelled 'JDVcc', 'Vcc', and 'Gnd'. The other, 4 pins, says "Gnd", "In1", In2" and "Vcc". The second header I get, Gnd and Vcc need to be connected to -5v and 5v respectively and In1 and In2 will activate the two relays when the corresponding pin is connected to ground (active LOW).

The other header I'm not so sure. JDVcc and Vcc are jumpered together as can be seen in the photo. And Gnd is, obviously, ground. But the device seems to work with only the 4-pin header connected.

OK. I'd be grateful to be corrected if I'm wrong, after all that's what I came here for... I'm surmising that JDVcc would be a connection to an independent 5v power supply and that jumpering it to Vcc means it will get it's power from whatever is connected to Vcc on the 4-pin header.

The module seems to work just fine with only the 4-pin module connected. So the question is;
If I try to use it like that --even for long periods of time-- will I damage either the relay module or my Nano?

And a secondary question: I had planned to use the two modules in parallel to double the current handling of the unit. Can I power both relays from one pin? This is actually not a big deal, I can easily use one pin for each relay, but, for simplicity I have jumpered In1 and In2. Should I undo that?

Anyway, any and all help will be GREATLY appreciated.

What DC amperage and voltage will you be switching ?

Your module is not the best quality.

A Potter & Brumfield relay would be a better manufacturer.

The motor in this image would be replaced by a relay.

You can use this device. Feed 5 volt, from a power supply, not the controller 5 volt pin, to the Vcc pin. GNDs connected to each other.
The yellow plug selects whether a low or high, to the input pins will activate the relays.

Thanks,
My plan was to power the the entire system directly off the 12v battery bank with this:

If necessary. As you can see in the photo (sorry, it's a little fuzzy), it's an old micro-USB car charger with an extra USB JACK. Of course, I'd rather not use the second power wire if I don't have to, hence the question. But I get it, I will use both.

This circuit is similar to your relay module.

Do not usually recommend using the 5v pin to power the relay circuit itself.

An output pin on an Nano 5v PCB can drive 20mA with no problem; you should check what the relay input current is.

@ LarryD
230 volt 2.4 Amps...

@OP
Exactly what kind is that 12 volt battery? I don't get that from the spiral cord picture..
A fully charged LEAD battery will exceed 12 volt. That is above specs for the controller. Get a 12 to 5 volt converter.

Thanks Larry D, I really appreciate the help. I helps me to understand what's going on. But the urgency to get this system working... For the moment, I will probably go ahead with the Chinese module and keep my fingers crossed.

220v 2.4A is the OPs requirement or @ coldbreeze16 :thinking:

If you are in a bind, try your hook up scenario.

If things fail you will learn something.

:cry:

The batteries (there are 8 of them) are nominal 12v lead-acid, deep cycle, solar batteries. The curly cord, being a car charger, would --basically-- run off the same type battery, a car battery which is a lead-acid battery, I will check the output before connecting the Nano or the relay module. But I think I'll be OK.

You really should . . .

Show us a good schematic of your circuit.

Give links to components.

:+1: Hey LarryD, can you point me to a good schematic drawing app?

These are free:

EasyEDA
https://easyeda.com/

OR

KiCAD

OR

Pencil and Paper

image

2 Likes

Drive the relay with 12v.
Why pay for a converter .

We get people on here every week trying to make it work with power from the arduino.
Sensors don't work properly or at all
Board resets occasionally
Relays won't respond.

@Railroader
After requesting info on the relay module from the seller, I just received a 5 page PDF. This is part of page 2

Unfortunately it's in Spanish but I think it's important to share that, according to this document, the last paragraph states (my translation) "The jumper placed between JD-VCC and VCC shares the 5v being fed to the VCC of the logic part, i.e. the Arduino will feed 5v to both the relays and the logic part." The language is a little squirrely but it's clear that my earlier conclusion was correct. The jumper allows the relays to work directly from the Arduino's Vcc. The external 5v should be connected here instead of the jumper. At least according to this doc.

Connecting Arduino 5v to power a relay is a bbbbaaaadddd idea.

The Arduino power supply is meant to power the Arduino electronics only, well maybe a low powered RTC or LCD too.

As mentioned, you have 12v already so buy the 12v version of this board (or use a Potter & Brumfield relay :wink: ). Then use your batteries to power the 12v relay board.

@ quintonio
I was too quick, was wrong.
Yes, You can strap the board to use Vcc, 5 volt, to power the relay coils. Be prepaired to supply some 60, 70, 80 mA per relay coil. That's too much for the controller 5 volt pin.
Else I think You can supply an external, other, power to the JDVcc. Check the documentation to know the limits.

...especially when you are depending on an inefficient analog voltage regulator on the Arduino, to supply 5V for both the Arduino and the relays, from the VIN pin.

The short answer is no, you can't.
The long answer is noooooooooo, you can't.

It's entirely possible that the company who copied that device, poorly, produced a poorly written manual as well.

I'm still learning but I do know that you have a few very talented users giving you much better advice than that manual.

Of course you can! If you couldn't, there wouldn't be 1000 identical tutorials doing it. The quality of tutorials "at large" is so poor now, that most of them are seriously flawed. So, while you can make such a DIY project work for a while on a bench, doesn't mean you've built anything reliable. For example, I know you can run a micro servo on the Arduino +5V. But I would never use that for anything that performs any practical task. Only for demonstration purposes.

Like a set of gate openers? :rofl: