Author Topic: Trying to understand some voltage/amp maths  (Read 4239 times)

0 Members and 1 Guest are viewing this topic.

Offline msknightTopic starter

  • Regular Contributor
  • *
  • Posts: 191
  • Country: gb
    • My pages
Trying to understand some voltage/amp maths
« on: January 06, 2024, 03:27:26 pm »
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.
If god had meant for humans to solder, she'd have given us three hands.
 

Offline msknightTopic starter

  • Regular Contributor
  • *
  • Posts: 191
  • Country: gb
    • My pages
Re: Trying to understand some voltage/amp maths
« Reply #1 on: January 06, 2024, 04:43:09 pm »
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.
If god had meant for humans to solder, she'd have given us three hands.
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1997
  • Country: is
Re: Trying to understand some voltage/amp maths
« Reply #2 on: January 06, 2024, 09:39:59 pm »
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.
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline CaptDon

  • Super Contributor
  • ***
  • Posts: 1997
  • Country: is
Re: Trying to understand some voltage/amp maths
« Reply #3 on: January 06, 2024, 09:43:12 pm »
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.
Collector and repairer of vintage and not so vintage electronic gadgets and test equipment. What's the difference between a pizza and a musician? A pizza can feed a family of four!! Classically trained guitarist. Sound engineer.
 

Offline wasedadoc

  • Super Contributor
  • ***
  • Posts: 1632
  • Country: gb
Re: Trying to understand some voltage/amp maths
« Reply #4 on: January 06, 2024, 09:49:23 pm »
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.
« Last Edit: January 06, 2024, 09:53:46 pm by wasedadoc »
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1625
  • Country: ua
Re: Trying to understand some voltage/amp maths
« Reply #5 on: January 06, 2024, 10:02:27 pm »
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.
It is correct for the case of "something" being a passive resistor.
 

Offline themadhippy

  • Super Contributor
  • ***
  • Posts: 2967
  • Country: gb
Re: Trying to understand some voltage/amp maths
« Reply #6 on: January 06, 2024, 10:05:29 pm »
Quote
No, your understanding of theory is incorrect.
If were talking purely ohms law then how is it incorrect?
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3043
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Trying to understand some voltage/amp maths
« Reply #7 on: January 06, 2024, 10:16:24 pm »
OK - let's start this afresh...

Ohm's law does not come into it.

The murata is a switching regulator.

Use the formula for power, W = V * I

Solve 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).
« Last Edit: January 06, 2024, 10:18:30 pm by sleemanj »
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1625
  • Country: ua
Re: Trying to understand some voltage/amp maths
« Reply #8 on: January 06, 2024, 10:17:01 pm »
I'm going to put it at the end of a voltage regulator which I'm going to be feeding with 9V.
It 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.
 

Offline TimFox

  • Super Contributor
  • ***
  • Posts: 8366
  • Country: us
  • Retired, now restoring antique test equipment
Re: Trying to understand some voltage/amp maths
« Reply #9 on: January 06, 2024, 10:23:33 pm »
Quote
No, your understanding of theory is incorrect.
If were talking purely ohms law then how is it incorrect?

Tautology:  Ohm’s Law is valid for “ohmic” devices.
Really good resistors are very close to ohmic.
Most other devices are not ohmic.
 

Offline wasedadoc

  • Super Contributor
  • ***
  • Posts: 1632
  • Country: gb
Re: Trying to understand some voltage/amp maths
« Reply #10 on: January 06, 2024, 10:33:14 pm »
Quote
No, your understanding of theory is incorrect.
If were talking purely ohms law then how is it incorrect?
It 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.
 

Offline Jwillis

  • Super Contributor
  • ***
  • Posts: 1716
  • Country: ca
Re: Trying to understand some voltage/amp maths
« Reply #11 on: January 07, 2024, 01:01:37 am »
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.
 
« Last Edit: January 07, 2024, 02:29:55 am by Jwillis »
 

Offline msknightTopic starter

  • Regular Contributor
  • *
  • Posts: 191
  • Country: gb
    • My pages
Re: Trying to understand some voltage/amp maths
« Reply #12 on: January 07, 2024, 07:03:51 am »
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!
If god had meant for humans to solder, she'd have given us three hands.
 

Offline MathWizard

  • Super Contributor
  • ***
  • Posts: 1609
  • Country: ca
Re: Trying to understand some voltage/amp maths
« Reply #13 on: January 08, 2024, 08:01:19 am »
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*I

 And for power P=V*I, and then also P=V^2/R and P=R*I^2

For something with transistors, the internal power will always still be the voltage potential across it, times the current flowing through it. P=V*I


And 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
« Last Edit: January 08, 2024, 08:15:31 am by MathWizard »
 

Online Andy Chee

  • Super Contributor
  • ***
  • Posts: 1092
  • Country: au
Re: Trying to understand some voltage/amp maths
« Reply #14 on: January 08, 2024, 08:10:21 am »
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.
An 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.
 
The following users thanked this post: MathWizard

Offline shapirus

  • Super Contributor
  • ***
  • Posts: 1625
  • Country: ua
Re: Trying to understand some voltage/amp maths
« Reply #15 on: January 08, 2024, 09:21:02 am »
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.
I 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.
« Last Edit: January 08, 2024, 09:23:06 am by shapirus »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf