Trying to understand some voltage/amp maths - Page 1
Forum section: electronics / beginners

author: msknight
author_rank: Regular Contributor
timestamp: January 06, 2024, 03:27:26 pm
content: Let's say I've got a device drawing 300mA at 5V.I'm going to put it at the end of a voltage regulator which I'm going to be feeding with 9V.How do I work out what it's going to draw off the 9V please?I've tried ohms law, but I'm obviously getting my numbers messed up.

author: msknight
author_rank: Regular Contributor
timestamp: January 06, 2024, 04:43:09 pm
content: OK - let's start this afresh...I have a ZX81 which runs off a 9v supply. It was measured drawing 330mA.To display it on HDMI, I'm using a PiZero which is pulling 190mA off 5v.To deal with storage, I have a ZX-Wespi on an ESP32 board which was pulling 90mA on 5v.I wanted to put them all in the same case, and be sure I had enough juice to power everything.In theory, according to Ohms law, if my maths were correct, (which is probably isn't) something pulling 250mA on a 5V supply, would be pulling 450mA on a 9v supply.To my newbie brain... more electronics equals drawing more "power" ... every mouth has got to be fed.The 40 year old 7805 was replaced with a muRata I50115 with 5v at 1.5A max, so I believed I had headroom from the regulator, but when the bench power supply said that everything... at 9v... was only pulling 385mA... I knew my maths was way out, and that if resistance in parallel is at play here... how do I ensure that I'm not going to overload something.At the moment, the only thing that seems to be pulling with any consistency... is my hair!More on what I did is detailed here...https://msknight.com/bbc/zx81-power.html... but I'm at a loss to work out how I can be sure that all mouths are being fed and I'm not in danger of blowing anything up.

author: CaptDon
author_rank: Super Contributor
timestamp: January 06, 2024, 09:39:59 pm
content: I calculated the individual powers and added them. 5x.19=.95w, 5x.09=.45w and 9x.33=2.97w Something is lying in your test setup because you state 9 volts at .385a total which only comes to 3.465 watts but your individually calculated loads come to 4.4 watts. Something is wrong in your current measurement test setup.

author: CaptDon
author_rank: Super Contributor
timestamp: January 06, 2024, 09:43:12 pm
content: The numbers are even more off if you used linear regulators as you would have .61a total draw at 5.49 watts being consumed equaling about 1 additional watt of heat being lost in the linear regulators.

author: wasedadoc
author_rank: Super Contributor
timestamp: January 06, 2024, 09:49:23 pm
content: 1. Ohm's Law is not relevant to your question.2. When using a linear voltage regulator, the current into it is only very slightly more than the current going out of it.3. When using a switching regulator you need to consider the power being supplied to the load. If the switching regulator were 100% efficient the power into it would equal the power to the load. In practice the regulator is not 100% efficient. Maybe somewhere between 75 and 95%. So the power in is more. The power out is the product of the output voltage and the output current. From that power you calculate the input power using the efficiency ratio. You can then divide the input power by the input voltage to get the input current.4. "In theory, according to Ohms law, if my maths were correct, (which is probably isn't) something pulling 250mA on a 5V supply, would be pulling 450mA on a 9v supply." No, your understanding of theory is incorrect.

author: shapirus
author_rank: Super Contributor
timestamp: January 06, 2024, 10:02:27 pm
content: Quote from: wasedadoc on January 06, 2024, 09:49:23 pmIt is correct for the case of "something" being a passive resistor.

author: themadhippy
author_rank: Super Contributor
timestamp: January 06, 2024, 10:05:29 pm
content: QuoteIf were talking purely ohms law then how is it incorrect?

author: sleemanj
author_rank: Super Contributor
timestamp: January 06, 2024, 10:16:24 pm
content: Quote from: msknight on January 06, 2024, 04:43:09 pmOhm's law does not come into it.The murata is a switching regulator.Use the formula for power, W = V * ISolve for W (watts) of your 5v output with however much I (amps) that output draws, then plug in that W to solve for I of your 9v input, then add about 20% as a generous inefficiency margin. Add that to the original draw of your 9v components to get total draw. Remember that your devices may not draw their whole rated amount constantly (or indeed at all, it's a maximum not a minimum).

author: shapirus
author_rank: Super Contributor
timestamp: January 06, 2024, 10:17:01 pm
content: Quote from: msknight on January 06, 2024, 03:27:26 pmIt may help you to understand the principle of voltage regulators easier as follows:- linear regulators act as resistors whose value is adjusted continously by the internal circuitry so as to keep output voltage (and/or current) below or equal to the set level. Therefore, like an actual resistor, they convert the difference between the input and output power to heat, which is dissipated on the regulator IC (or on the external transistor, if it is used).- switching regulators transfer energy in pulses, adjusting their width as necessary to keep the output voltage (and/or current) again at or below the set level. They are more efficient than linear regulators, because power that they consume from input equals to the output power plus a comparatively low amount that is wasted on switching, powering internal circuitry etc.: they do not draw power from input unless it is necessary.

author: TimFox
author_rank: Super Contributor
timestamp: January 06, 2024, 10:23:33 pm
content: Quote from: themadhippy on January 06, 2024, 10:05:29 pmTautology: Ohm’s Law is valid for “ohmic” devices.Really good resistors are very close to ohmic.Most other devices are not ohmic.

author: wasedadoc
author_rank: Super Contributor
timestamp: January 06, 2024, 10:33:14 pm
content: Quote from: themadhippy on January 06, 2024, 10:05:29 pmIt is incorrect in the context of the scenario given by the OP.If the regulator were a linear one the draw on the 9 Volt supply would be slightly more than 250mA. Very much less than 450mA.If the regulator were a switching type the draw on the 9 Volt supply would be much less than 250mA, not more.

author: Jwillis
author_rank: Super Contributor
timestamp: January 07, 2024, 01:01:37 am
content: You also need to take in account the efficiency of the switching regulator. The 5V regulator has an efficiency of between 89 - 90.5% at nominal 12V input.At Minimal input of 7 volts efficiency rises to 91.4 to 92.5%. That means there is anywhere between a 11 to 7.5% loss between Nominal input voltage of 12V and Minimum input voltage of 7V.So for a 9V input that would equate to approximately an average of 90.2 to 91.5% efficiency with a loss between 9.8 to 8.5%. That loss is transferred into heat and dissipated.If you look at the Performance Data (Efficiency vs. Line Voltage and Load Current @ +25˚C. (Vout = Vnom.) chart you can see that the 12V nominal is the "sweet spot" for operation.9V will fall somewhere between the 7V min and 12V nominal.You you calculate your current in and current out based on efficiency percentage.

author: msknight
author_rank: Regular Contributor
timestamp: January 07, 2024, 07:03:51 am
content: Thanks to all for this help. I've got to sit back with a coffee and digest all this. It's a big subject to learn with a lot of unexpected twists and turns!

author: MathWizard
author_rank: Super Contributor
timestamp: January 08, 2024, 08:01:19 am
content: Is it a good or bad idea to put a resistor between the supply Vin, and the regulator ? It would share some of the voltage drop and power loss, and it would limit max current if the regulator shorts, or for inrush current to some circuits. A lot of regulators probably have that inside these days.If it's kept small I'd think there'd be no big issue. What about when your 7805/xx can't handle the Vin, and you add dropping resistor's to help. I've done that before, IDK what new time constants I might have added, but it was only for supplying a few mA or dozens of mA.The voltage drop V across some resistance R with current I flowing in it, is V=R*IAnd for power P=V*I, and then also P=V^2/R and P=R*I^2For something with transistors, the internal power will always still be the voltage potential across it, times the current flowing through it. P=V*IAnd if had some resistor losing 1W of power, I'd use a 2W resistor, if I wanted any chance of not burning my finger when touching it. I can't remember the temperature formula's, but for saner temps and longer part life, usually multiply your power rating by 1.5-2x

author: Andy Chee
author_rank: Super Contributor
timestamp: January 08, 2024, 08:10:21 am
content: Quote from: MathWizard on January 08, 2024, 08:01:19 amAn inline resistor to prevent inrush is normally a technique used on the mains side of the transformer, most notably with large switchmode power supplies or audio amplifiers with big filter capacitors.But for low voltage logic circuitry, such a resistor is not needed. The low voltage regulator has all the output protection circuitry it needs.

author: shapirus
author_rank: Super Contributor
timestamp: January 08, 2024, 09:21:02 am
content: Quote from: MathWizard on January 08, 2024, 08:01:19 amI guess it depends on application. I have used this technique in cases where the linear regulator would have to drop a lot of voltage, dissipating significant heat even at low currents and requiring a heat sink. Thus much of the heat was moved to the resistor, the linear regulator did not require a heat sink anymore, and the resistor, in addition, had a bonus as serving as part of the input RC filter: only an extra cap was required.