External 5v power supply via 5v pin

Hi,
I had many questions that were answered on a different thread, and now I come to the final design of powering my project, and I just want to make sure I got this all idea of “powering the UNO via the 5v pin” right.

My design is in the attached file.

I am using a 5v ‘buck’ converter to power the entire design.

I got the 5v buck output (+) pin connected to - LCD 5v, UNO 5v pin, Relay-module Vcc
The 5v buck (Gnd) pin is connected to - LCD Gnd, UNO Gnd pin, Relay-module Gnd

(As can be seen clearly in the JPG file :).

I got it working well.

I also measured the currents in 2 spots:

  1. UNO 5v pin - 37-41 mA
  2. Buck output 5v pin - 53-130 mA

I think I got the heat dissipation issue solved like this (by bypassing the voltage regulator).

Do I have any critical mistake here - or does it seem right what I did :o ?

Tnx!

Looks reasonable.

Similar relay PCBs should have things wired differently as the opto isolators are not if fact working as they should if not wired correctly.

Do you have a schematic of your relay board?

Always be careful when first setting the converter o/p to 5v as you can damage hardware if the voltage is set much above 5.4V.

It looks rather good. Depending on the quality of the relayboard I would maybe use a separate pwr supply for the relays but if the board is resonably well denoiced, it's all ok.

larryd:
Looks reasonable.

Do you have a schematic of your relay board?

Always be careful when first setting the converter o/p to 5v as you can damage hardware if the voltage is set much above 5.4V.

Thank you.

I couldn't find the schematics of that relay module. I asked the shop I bought it from and nothing there.

I am using this converter - it has only 5v output.

I couldn't figure out the COM / GND ports of the relay module. I took the jumper away, and relays didn't lock as before.

Be careful removing jumpers if they are unknown. Don't loose the spark killing diodes f ex.

Railroader:
It looks rather good. Depending on the quality of the relayboard I would maybe use a separate pwr supply for the relays but if the board is resonably well denoiced, it's all ok.

I am not sure this relay module is the best.
it has good relays on it, but I couldn't find too much information concerning the module itself etc.

Would you take another 'buck' 5v converter and connect it to the relay Vcc/GND ports?

Can you explain please the reason of this?

Tnx!

A poorly designed relay board might not kill the back bounce from coils being switched off. That could send disturbance inte the controller, via Vcc or even other Cables between the two units, making the controlle loose tracks, hang, restart, etc.

If it works fine for You You most likely have a board being good enough. Having random problems like above, separate 5V supplies could be worth trying.

trsuthbu888:
I am not sure this relay module is the best.

I used a four relay Keyes board just like that on the first version of my Xmas light controller. It is fine and will work.

When you get a chance, stepping up to a board with solid state relays is nice.

Maybe not this particular one (shop around) but something like it:

SainSmart-4-Channel

OK, the important thing about wiring up that relay board is that (with the link removed) the "IN" wires go to the Arduino outputs run together with the "COM" wire to the Arduino ground connection, while the "GND" and "VCC" wires run together as a pair, separately and directly to the output terminals where the capacitor is of the power supply, in this case, the "Buck" converter.

Note the concept of keeping the wires corresponding to each circuit part together and separating the wiring that powers the relays from the wiring that powers the optocouplers and controls the relays. You wish to avoid forming open loops of wire which can inductively couple one circuit to another.

Yeah, because inductive coupling is such a huge thing on a 5v project.

bigred1212:
Yeah, because inductive coupling is such a huge thing on a 5v project.

Indeed it most certainly is. :sunglasses:

We are talking about systems which operate at the frequency of shortwave radio. :astonished:

Thank you again, to all of you :slight_smile: !

Paul__B:
OK, the important thing about wiring up that relay board is that (with the link removed) the “IN” wires go to the Arduino outputs run together with the “COM” wire to the Arduino ground connection, while the “GND” and “VCC” wires run together as a pair, separately and directly to the output terminals where the capacitor is of the power supply, in this case, the “Buck” converter.

Note the concept of keeping the wires corresponding to each circuit part together and separating the wiring that powers the relays from the wiring that powers the optocouplers and controls the relays. You wish to avoid forming open loops of wire which can inductively couple one circuit to another.

Does that sketch (Rev-2) matches what you mean?

Due my actual design, and in order to refrain from long power-supply wire, I am thinking of adding another 5v-buck, and connect it to supply only the power of the relay-module - this is in the sketch in Rev-3.

Will that give me the confidence to avoid inductance/capacitance issues?

power connections Rev2.jpg
Revision 2

power connections Rev3.jpg
Revision 3

No, "Revision 2" is not what I described at all. You have the power wires branching off at random points.

What I said was that given you have one buck converter, the pair of power wires from the Arduino go - together - to that buck converter while the the pair of power wires from the relay module (you have those correctly connected now at the relay module) go - together - to the output terminals of that same buck converter where there will be a decoupling capacitor which will minimise the transmission of surges from one device to the other.

Your "Revision 3" shows this arrangement correctly but you would be just as well to use just one buck converter for a start.

An improvement would be to put a 470 µF capacitor directly across the relay power terminals of the relay board itself.

Finally, the same discipline should be applied to the LCD. Its power wires should come from the Arduino together with the data/ control wires.

Paul__B:
Your “Revision 3” shows this arrangement correctly but you would be just as well to use just one buck converter for a start.

An improvement would be to put a 470 µF capacitor directly across the relay power terminals of the relay board itself.

Finally, the same discipline should be applied to the LCD. Its power wires should come from the Arduino together with the data/ control wires.

Considering I am using 2 buck converters - would Rev-4 fit the requirements?

If the same power supply is powering both buck converters your GNDs will probably ‘not’ be isolated from each other.

larryd:
If the same power supply is powering both buck converters your GNDs will probably ‘not’ be isolated from each other.

Well pointed out.

Given that you get the wiring right, why would you want to use two buck converters? If there is any doubt about their ability to handle surges, then adding a capacitor as I described should cover that.

There is no "magic" in regard to isolation. The problems commonly described here in relation to switching transients from the devices switched by the relays interfering with the operation of the microcontroller result from only three effects; surges on supply lines due to effective internal resistance of the supply and lack of decoupling capacitance, inductive coupling due to open loops in wiring, and capacitive coupling due to proximity of control and switched circuits.

Proper design procedure manages all three as demonstrated by the considerable number of devices in commercial production which use relays entirely effectively.

Paul__B:
Well pointed out.

Given that you get the wiring right, why would you want to use two buck converters? If there is any doubt about their ability to handle surges, then adding a capacitor as I described should cover that.

There is no "magic" in regard to isolation. The problems commonly described here in relation to switching transients from the devices switched by the relays interfering with the operation of the microcontroller result from only three effects; surges on supply lines due to effective internal resistance of the supply and lack of decoupling capacitance, inductive coupling due to open loops in wiring, and capacitive coupling due to proximity of control and switched circuits.

Proper design procedure manages all three as demonstrated by the considerable number of devices in commercial production which use relays entirely effectively.

First - thank you for the time and efforts to assist me here. This is definitely not taken for granted.

Second - if you recall my very first questions, some time ago - about wiring signals for 5-7 meters away from the Arduino - so I have the main power supply (24v) at Location-1 (it is the same location with the relays - activating the needed appliances). From that location, I have 5-7 meters wires to Location-2 , where the Arduino and LCD will be (plus some diodes and press-switches).

My thinking is:

  • To put 1 buck-converter at Location-1 - to supply the relay module alone.
  • To wire the main power supply (24v) from Location-1 to Location-2, and produce 5v locally with the second buck.
    Like that - to avoid wiring back 5v supply from Location-2 to Location-1. It seems logical, taking into account all the surge-coupling-etc issues.

Third - Following this design - would you recommend on other safety measures (more capacitors at other locations etc) to make the design 100% reliable?

trsuthbu888:
if you recall my very first questions, some time ago - about wiring signals for 5-7 meters away from the Arduino

Ah well, there is the trick, isn't it? Basically "Cross posting" where the basic description appears in one post, then a new aspect appears in a separate question relying on information in the other posting.

Frankly I do not recall your other questions; I imagine I may well have answered them, but then I answer a lot of things by the look of my post count. :grinning: I expect to give the same sort of answers, and keep a file of "stock" answers to facilitate this, but recalling every discussion in detail is a bit much to ask. :astonished:

And you did not provide a link; you only have 27 posts noted so far so I could track it down but - should I really have to?

trsuthbu888:
so I have the main power supply (24v) at Location-1 (it is the same location with the relays - activating the needed appliances). From that location, I have 5-7 meters wires to Location-2 , where the Arduino and LCD will be (plus some diodes and press-switches).

OK, this sounds reasonable. This means you absolutely do want to use the isolation feature of the relay board and using two separate buck converters sounds quite necessary for the following reason.

trsuthbu888:
My thinking is:

  • To put 1 buck-converter at Location-1 - to supply the relay module alone.
  • To wire the main power supply (24v) from Location-1 to Location-2, and produce 5v locally with the second buck.
    Like that - to avoid wiring back 5v supply from Location-2 to Location-1. It seems logical, taking into account all the surge-coupling-etc issues.

Well, you will be wiring the 5 V "back" from your second (MCU) location to the first (relays)- at least the ground side - but it will be isolated and control signals only. That is the point about the separate ground grouped with the "IN" signals to the relays.

I believe you can use "Cat 5" for this purpose. One pair to take 24 V from the source forward to your Arduino with the buck regulator and three pairs to take the control signals back to the relays. Since the relays are isolated and the regulators should suppress impulses in the power wiring, there is no common ground wire to couple between power, relays and control signals.

trsuthbu888:
Following this design - would you recommend on other safety measures (more capacitors at other locations etc) to make the design 100% reliable?
[/quote]
Yes, extra capacitance at the power connections of the relay board is always advised as this is where the "kickback" of relay coil switching is felt. And additional reservoir capacitors across the input of each buck regulator would be good.
Do not connect the Arduino equipment to a local ground, especially if the 24 V supply itself grounds the negative (we would always assume it does not ground the positive! :astonished: ).

Thank you again!

No, there is no need at all to go back to the previous thread of questions - I got that finalized.

Concerning the design discussed now - I attached a sketch of Location-1 and Location-2.
They are about 5-7 meters apart, and I will have to run 1 cable between them - that will contain the digital data + GND from Arduino and the 24VDC input power - all 6 wires together. I have to.

So, I have the following capacitors:

  1. 470 uF on the (+) & (-) pins of the relay module

Concerning the buck input - would you put the capacitor on the (24VDC +) pin and (-) pin,
470 uF ?
on both bucks?

power connections - loc-1-2.jpg
Yes, that looks about right. Note you are using only three of the four relays.

You may have "got the previous thread finalised", but it seems it contained the important description of your project.

The capacitors sound about right.

Clearly the reason for the 24 V power as such is that it is used for the machinery that the relays control. As long as the mains to 24 V converter is capable of delivering the full start-up current of those devices without sagging, this should be OK.