Dual 12 V/5 V supply

I am putting an arduino (Mega 2560 pro mini) (and also Raspberry Pi Zero) on a RC airplane and I need to have supply from two independent sources. On board I have a 12 V source and two 6.2 V switch UBECs. The Two UBECs are connected to a common point throgh diodes, one through regular ones (-0.7 V drop), and the other (-0.4 V)thorugh shottky, so that there is a no load voltage of 5.8 Volt which can go down to 5.5 V in case of a failre of the first UBEC, and both voltages can go down slightly under load (5.3-5.6 V).

My question is this: what is the best way to power arduino preserving the double safety

Option 1: Connect the common rail through a shottky diode to arduino 5 V direct. The voltage should be around 5.0 to 5.4 Volts.

Option 2: Connect a separate UBEC with 5 V output and connect battery directly to the Vin pin. I am not sure whther this would work well. The 12 V suppply also comes from two batteries and through diodes, so that there is also double safety there, but the problem is that since arudino has linear regulator, the loss of power will be much higher.

Option 1 sounds good. You can allow the Arduino to go a little under 5V. The datasheet specification for voltage is quite extensive if you feel the need to read it.

Option 3 (12V) is usually a poor idea. The wasted power is not usually significant except it's all wasted inside one single component on the Arduino board. That will overheat and fail if there's anything more than just the Arduino drawing 5V power.

Thanks for the input.

Here are some more clarifications:

Option 2. The idea is to use a dedicated switched supply of 5 volts, but if it fails, to have a 12 V through Vin as secondary source. I know it is not efficient, but arduino would not draw much current and this would be last resort.

Option 1. The problem is that this supply is shared with servoes, so there may be fluctuations in voltage (I am not sure whether they could put the voltage out of safe range i.e. below 4.5 V. Also, I am not sure whether using a diode as a means of reducing voltage is really such a good idea.

For both of these situations, connecting additionally a 12 V is good or bad idea? I.e. mostly it would run on 5 V switched power supply with possible fluctuations, and if it really gets too low, would the 12 V input kick in sufficiently fast so as not to reset the arduino?

arduino would not draw much current

Do you know how much?

would the 12 V input kick in sufficiently fast so as not to reset the arduino?

It doesn't work like that.

I think we need more information. Maybe a schematic will help.

No, I am not sure about current, but there are no heavy load periferals; it will have 3 UARTs operating, + SPI for raspberry, but no loads.

Two UBECS provide 6 V. One UBEC output goes through shottky diode to common point. The voltage there should be around 5.6 V. The other UBEC output goes through normal diode to the same common point, and since the voltage drop is higher, this UBEC under normal conditions is not operational. Only if the first UBEC failed for some reason, the second UBEC kicks in. In that case the voltage would be around 5.3 V. This common point supplies power to everything, including servoes. Option 1 is simply to connect the 5V pin of arduino to this common point through another shottky diode (the diode is to reduce voltage, which would be 5.3-5.6 V), so that the 5 V pin should get around 4.9 - 5.2 V.

What I am worried is that this supply is probably not very clean and maybe will have transients and sagging under heavier loads. The UBECs are rated to 5 A each, and usually the current draw is around 1 A, but it can go much higher to 3 - 4 A.

So having a power (9-12 V) applied to Vin as a secondary power source is not a good idea at all if simultaneously 4.5-5.5 volts are fed to 5 V pin?

I'd use a separate 5V buck converter for the Arduino. Gives you much more stable supply.

Why are you using those series diodes in the first place, instead of getting a converter that gives you the voltage you actually want?

chileflora:
So having a power (9-12 V) applied to Vin as a secondary power source is not a good idea at all if simultaneously 4.5-5.5 volts are fed to 5 V pin?

No point to this. Won't work, will cause resets if switching over, and then may cause an overheating regulator as 12V is a bit much: you have to drop 7V there as waste heat.

What good is it going to do anyway if your other power source fails, and your servos and so don't work either?

What if the failure of the UBEC is a short from battery to output? To design for failures you need to understand the failures and their probability.

Usually it is better to put more effort into making one component more reliable than working with two unreliable components.

chileflora:
So having a power (9-12 V) applied to Vin as a secondary power source is not a good idea at all if simultaneously 4.5-5.5 volts are fed to 5 V pin?

wvmarle:
No point to this. Won't work, will cause resets if switching over, and then may cause an overheating regulator as 12V is a bit much: you have to drop 7V there as waste heat.

No, it won't "cause resets if switching over" because he was referring to powering via the 5 V pin; you are thinking about the changeover circuit which interrupts the USB power supply.

The point is, "Vin" is simply useless. It is essentially an ornament provided in the very beginning of the Arduino project when "9V" power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.

If powering from 12 V, you need the proper 5 V switchmode "buck" converter.

wvmarle:
I'd use a separate 5V buck converter for the Arduino. Gives you much more stable supply.

Why are you using those series diodes in the first place, instead of getting a converter that gives you the voltage you actually want?

The extra shottky diode is intended to lower the voltage somewhat because it is near the upper limit of 5.4-5.8 V. (UBECs 6.2 V - (shottky/normal) > 5.4-5.8 V - (shottky)> ARduino 5.0-5.4 V.

The general voltage of the system (6 V instead of 5 V) is due to two considerations:
6 V (or 5.6 V really) provide more power to servoes.
5 V would not allow combining two power sources through diodes because the resulting voltage would be around 4.6 V.

From what I see in this discussion, a separate 5.0 V standalone switching supply (UBEC) is better than trying to use the 6.0 V UBECs which run the servos through the diodes to lower the voltage. The problem is that an extra UBEC adds extra weight (12 grams).

One important point, I will have the same probem (of power supply) for the raspberry pi zero. The current there is around 150 - 200 mA, and from what I gathered, raspberry is more delicate in terms of supply power (4.75-5.25) than arduinos.

So in this sense, a dedicated switching supply is probably better.

MorganS:
What if the failure of the UBEC is a short from battery to output? To design for failures you need to understand the failures and their probability.

That is a good point, but it is virtually impossible to do something against it. Fuses or cutoffs thorugh mosfet and stuff like this would introduce much more complexity and other types of failures, so I do not see a simple way to implement overvoltage protection. However, the use of couple of diodes to combine two power sources is a very simple, reliable and proven method (I have been using this system for a long time already).