One 12V battery and two DC-DC step down modules?

Hi, I am working on an Arduino project for a motorcycle. I have planned to power both an Arduino and a relay unit from the motorcycle 12V battery using DC-DC step down to 5V. The relay module will control the motorcycle 12V components.

I have read that best practice is to power the relays with a separate power supply to physically isolate the relays from the Arduino with the relay module’s built-in optocoupler.

Adding extra batteries to the motorcycle to power the Arduino and the relay unit separately will not be very practical. I hope it will be possible to use the 12V battery to power it all, and still get at reliable system.

QUESTION 1: Would I achieve the recommended isolation if I use two DC-DC step down modules, even if they both are powered by the same battery?

QUESTION 2: I guess this isolation is very important if the relay is connected to high voltage systems (110V / 230V), perhaps this isolation is not that important since my system is 12V only?

Any advice is appreciated.

What is the load the relay module will operate? Light bulb only?
Often one step down converter will do fine. Decoupling eventually noisy components/loads will be enough. Light bulbs draw quite some current at switch on. A bulk cap, say 100 microfarads near the DC-DC, would be good.

First question: Why not use a 12V relay module?

The inputs are usually still 5V opto isolated. So there’s less to think about all-round.

The 12V relay coils will be quite tolerant of the car’s supply variation.

1 Like

I might mention that the schematics is a bit simplified, I will have in total 10 relays (2 + 8 relay module). Most channels will drive LED lights 2-4 watts, the headlight is most power hungry, i think high beam is 30 watts. This is on the 12 volt "side" of the relays. On the 5V "side" they consume 0.2 amp each - in other words 2 amps when all 10 are on. Sorry for my bad explanations, hope it makes sense :roll_eyes:

Ahh, I have to admit that I have not seen relay modules run on 12V. That sounds very smart and would simplify a lot. Thanks a lot for the tip - running over to eBay now :yum:

I would say the opposite. Some 12 volt relay modules will not react from a 5 volt signal from the controller. Use 5 volt relay modules to be sure.

I would put a bet on more than 30 Watt for the high beam. Rather 50 Watt or even 60. Add a bulk cap to the DC-dc converter input.

1 Like

Most relay ‘modules’ use a transistor to drive the actual relay coil… that’s the current amplifier needed to pull the relay in.
A 12V relay wants nominal 12 v to pull in & hold…
the input signal merely needs to turn on the driver transistor.

It’s not being driven directly by the ‘arduino’ signal pin.

A few "facts of life".

The two buck converters do not provide complete isolation to the relay supply as the ground is common through them.

It is frankly, unlikely to be worth the trouble of using two.

What is far more important is how you run the wiring. All supply from one part to another must run as a pair - in paired cable (such as "figure-8") with the supply and ground together.

The same applies for signal and "return". You have noted that the "return" from Arduino to relay module is in fact the 5 V supply so that is what must be paired with the control connection(s). Where the power supply and a control line go from one part to another, then all three (including the "ground") travel as a bundle. You must avoid open loops forming in any local circuit.

So power to the relay module is run directly from the converter output to that module and power to the Arduino runs separately, direct from the converter output to the Arduino. That is the important isolation of the circuits. A 1 mF capacitor across "JD-VCC" and ground at the relay module itself is however a good idea.

The only benefit of using 12 V relays is that the current to drive all eight SRD-05VDC-SLC relays at once - 560 mA in total - would not need to be supplied as part of the 5 V regulator budget.

You do not need 12 V to control a module using 12 V relays, but it can only be used with the ground as a reference for the control voltage. It really is not worth the trouble.

1 Like

OK, conflicting suggestions are always tricky... The 12V relay modules I found on eBay was made for Arduino so I understood it like this: they run on 5V on the "Arduino" side for the optocoupler part, while the relay magnet was to be powered by 12V. I am not sure though...

The classic motorcycle headlight bulbs (Halogen - H4) used to be 55-60watts, but LED bulbs are normally half of this and still producing same amount of lights. The specs you find on LED lights are often the same as it used to be for the classic light bulbs, even though they use less current.

Well here's the deal. :grin:

If you give the Web link of those modules, we can probably determine how suitable they might be and how you would need to wire them.

If you do not provide that information, all bets are off. :roll_eyes:

Fair enough?

(In general, the 5 V relay modules will be OK. :sunglasses:)

That is as they say, "life". :thinking:

1 Like

Thanks a lot for in-depth explanation! :+1: I will try to make a new drawing using just one dc-dc step down, and try to illustrate cabling paired up, and with a capacitor as well...

That is totally fair :grin: The parts are bought directly from China (eBay), schematics was not included :yum: I found this: 4 Channel 5V Relay Module - Wiki - looks very similar to mine:

So, based on your feedback I made a new drawing - tried to illustrate separate / paired cables from DC-DC step down to the Arduino and the relay module. Does this make sense:

How about logic level MOSFET switches, about $2.00 each?

1 Like

Yes, that is planned for the next iteration. It will take some time to design it, get them produced and shipped, so the first prototype will be based on these relay units since I had them at hand. Makes it possible for me to test the software, measure current draw and more. It is also quite more expensive to build solid state relays, so I will wait until I have some experience with these relay boards before I go to the next step :blush:

Thank you very much for your input. I have planned to wire my DC-DC directly to the battery. It is a 12V 8Ah Lithium Ion battery. The relays will have separate wiring. Do you think turning on a 30W light will make the power to the DC-DC drop, or cause some kind of "disturbance" and make the Arduino crash? Can you explain why you think a bulk cap can improve the system?

Looks pretty good.

It quite likely will, but not enough to be a problem.

Not much.

I suggest a capacitor at the relay board because the relay board has no such capacitor and the point abut "isolation" is to suppress the transients created by operating the relays.

The DC-DC converter necessarily includes a capacitor on its input, so whatever capacitor you connect there is simply in addition to that and any benefit will be proportional. The entire purpose of the DC-DC converter is to provide a stable output voltage despite variations in either the load current or its input voltage. It is in fact, specified according to how effectively it compensates for each of these.

1 Like

I’m looking for a little explanation here…

If the JD-VCC is at 12v with 12V relay coils, it takes all the relay noise/burden off the DCDC converter, and away from the Arduino completely.

Less load on the regulator, and half the current at 12V vs 5V to run the relays (not a big factor, but worth noting)

Maybe I’m just old fashioned, and it’s better to use more components at higher current nowadays?

1 Like

I will not deny any of that. :+1:

If a 12 V module is available with the appropriate isolation (which not all do, thus my comment in #10), then by all means use it. It will almost certainly work with 5 V logic on the control side.

But the wiring discipline is still essential.

1 Like

Thanks a lot for your feedback, adding a capacitor seems like a smart solution! :blush: