I said that the current in a DC circuit is the same everywhere. If there is one amp going into a node, there is one amp coming out.
Yes but...
Switching regulators are not exactly DC circuits. That "switching" is the key here.
Explaining how a switching regulator works is a bit much for a forum post so I suggest you start here to get an idea of how it is done: http://en.wikipedia.org/wiki/Buck_converter
Basically energy is alternately switched into an inductor which stores it in it's magnetic field. And then switched out of the inductor into the load where the energy dissipates.
The current in and out of such a circuit need not be the same.
Depending on how the inductor is connected and switched the output voltage can be lower or higher than the input. The current being correspondingly higher or lower thus keeping power in equal to power out (ignoring losses).
I think it's quite magical really. I recently built my first ever switching boost converter using a 555 timer and a MOSFET. It took 12 volts in and put 200 volts out.
Think about that: The current out is ~17 times less than the current in. Ignoring losses.
Sadly when I accidentally disconnected the load the output shot up to over 600V destroying the MOSFET, the 555 and the diode! I did not have the feed back control in place yet. So I never got to measure the actual current ratios and hence the efficiency.
I'm about to try this again but with a proper switcher chip, the MC34063.
They're power converters.
An ideal SMPS, with 5v @ 1A (5W) on its output, powered from 24V would draw 208mA. Powered from 3V, as a boost converter, its draw would be 1.67A.
Pin = Pout
But, outside of an ideal context, power in is greater than power out.
Just a word of warning. Not all regulators follow the same 7805 pinout !!!
Applies not only to TO220 but also TO252, SOT223, SOT89 and SOT23 (aka SOT23-3)
I don't mean to be getting at you but your statements were bugging me when I woke up. Last night I was a too tired to really appriciate them:
I said that the current in a DC circuit is the same everywhere.
This is clearly not correct. A simple circuit with parallel resistors shows that. If the resistors are of different values the current through each will be different.
I guess you are talking about a simple single loop of series components. I which case yes that is true.
What you are really talking about is Kirchhoff's circuit laws:
1) The current law: The algebraic sum of currents in a network of conductors meeting at a point is zero. This is a statement about the conservation of charge.
2) The voltage law: The directed sum of the electrical potential differences (voltage) around any closed network is zero. This is a statement about the conservation of energy. http://en.wikipedia.org/wiki/Kirchhoff's_circuit_laws
I was bugged because I woke up wondering how come this appears not to be the case for the switched converter circuits? Seems to be "magic" as I said above.
I think the paradox, if I can call it that, is removed by considering that Kirchhoff's laws apply to a circuit. But what we have here is effectively two circuits. An input loop and an output loop. Coupled together by the energy stored in the inductor which is transferred form one loop to the other when that switching action happens.
I think you would accept that in a transformer circuit the current in the input can be different than the current in the output. We really have two circuits there coupled by the transformer. There is no talk of current flowing between the input side and the output side in Kirchhoff's laws.
Similarly in the switcher, that switching action effectively disconnects the inductor from the input circuit and connects it to the output circuit thus transferring energy. You cannot apply Kirchhoff here so easily. We have to apply Kirchhoff to both circuits. This would probably be easier to see if we consider a fly-back switcher that has a transformer between input and output not just a single inductor.
I didn't mention energy.
I believe that actually you did. Your statement was basically a statement of Kirchhoff's laws and those laws come about because of the need to conserve energy and charges in circuits.
As we require conservation of energy, else all of physics breaks down, we see that power in must equal power out:
Pin = out
Or in terms of currents and voltages:
Iin * Vin = Iout * Vout
Rearranging to give:
Vin / Vout = Iin / Iout
The ratio of the currents equals the ratio of the voltages. Same as for the transformer circuits.
Even with all that in mind I still think switchers are magic:)
P.S. Once again I'm not getting at you here. This was all just puzzling me as well.
If there is one amp going into a node, there is one amp coming out. Unlike voltage drops, there is no such thing as a current drop.
Actually, this is correct, even for voltage regulators (linear or switcher).
If 330mA of current at 15V is flowing into the regulator, and 1A of current is flowing out at 5V, where did the other 670mA of current come from?
It came in the ground lead. The 1A flowing through the circuit returned 670mA to the regulator, and 330mA to the source. Total current in and out of the regulator is zero.
Actually, this is correct, even for voltage regulators (linear or switcher).
If 330mA of current at 15V is flowing into the regulator, and 1A of current is flowing out at 5V, where did the other 670mA of current come from?
No. This is not possible for a linear regulator.
A linear regulator looks like this:
Where R1, R2, R4 represent the regulator. There is no way for the current in the load can be greater than the current in the source.
In your example the input power is 15 * 0.33 = 1 Watt and the output power is 5 * 1 = 1 Watt.
But for a linear regulator you would be dissipating power in your regulator. P = I * V.
Where V is the voltage drop drop, 10 Volts. And I is the current, 1 Amp. So the power dissipation in the regulator is 5 Watts.
So your example has 1 Watt going in and 6 Watts going out in the load and as waste heat.
This is clearly not possible.
Kirchhoff's current law tells us the currents at that node in the middle of the regulator must sum to zero. So Iinput = Iload - I leakage. The current in the load can only be less than the current in the input.
Another way to look at it is in your own words "Total current in and out of the regulator is zero." As there is no other current source in the circuit where would this extra current come from?
Wrong. I have 330mA + 670mA = 1A going in, and 1A coming out. Sum is zero.
Just like a resistor: put 1A into 10 ohms and you burn off 10 watts. And you still get 1A out.
If you are talking about linear regulators then why do you quote the 330ma figure I gave for the example switching regulator with 15V input and then you subtract that from the given 1A on the 5V output????
The sum of all that explanation is indeed zero, squat.
That's why this thread is getting very confused $%^%#)(*&@#!!
A transformer can have 15V AC in and 5V RMS @1A load on the secondary so you already know that the 15V primary current is definitely not 1A. To keep it succinct a switching regulator TRANSFORMS in a similar manner.
Please draw me a circuit of what you have in mind here. Either I am misunderstanding your picture or you are trying to defy the laws of physics. Both are possible of course.
I have 330mA + 670mA = 1A going in, and 1A coming out. Sum is zero.
Ah, so I am not wrong at all. You have changed your claim. The claim I was refuting was "If 330mA of current at 15V is flowing into the regulator, and 1A of current is flowing out at 5V,.."
I see no possible way this can happen with a linear regulator.
I use a Texas Instruments P/N PTB78560CAH. I know it's considered expensive but it runs cool to the touch with 24 volts input. Using 2 electrolytic capacitors, one on the input and one on the output, I'm getting approximately 9 volts at the output which I feed into a 7805. I get very little ripple with this arrangement and everything runs cool to the touch, no heat sink required. These units can accept up to 60 VDC but they will only see 28.5 VDC in my application.
The very little ripple bit is important for me since I'm using a couple of 12 bit ADCs.
That's why this thread is getting very confused $%^%#)(*&@#!!
....To keep it succinct a switching regulator TRANSFORMS in a similar manner.
Quite so.
To be fair, if you look at a switching regulator and think of it in the same way as a linear then you will come to all the wrong conclusions. But that is a natural tendency seeing as it has DC in and DC out. Which ignores all the "magic" in the middle.
The "magic" here, I have decided, is that we actually have two circuits. The input loop and the output loop. One could imagine that there were a switch at both ends of the inductor physically disconnecting it from the input loop and connecting it to the output loop. Clearly an inductor moved from loop to loop like that by the switcher can transfer energy from the input circuit to the output and can transform voltage and current as it does so.
In the original example (a string of regulators in a DC circuit) I considered the regulators as a node. Yes there are small ground currents, but basically what ever current goes in one end comes out the other.
You can simplify the circuit down to a power source and "every thing else". This way there are only two nodes. If you build such a circuit and measure the current flowing out of the power source and then measure the current flowing in to the power source, it will be the same.
This is actually pretty easy to test. So if you doubt Kirchoff's Law, just build some kind of circuit*, connect it to a battery and measure the current flowing into and out of the battery, right at the battery terminals. Report back here with your results.
* include a switching regulator if you want to be sure.
Kirchhoff's current law (KCL)
The current entering any junction is equal to the current leaving that junction.
This law is also called Kirchhoff's first law, Kirchhoff's point rule, or Kirchhoff's junction rule (or nodal rule).
The principle of conservation of electric charge implies that:
At any node (junction) in an electrical circuit, the sum of currents flowing into that node is equal to the sum of currents flowing out of that node
Yep, what you describe is true for switching regulators as well.
But is also true that the current flowing through the load on a switching regulator can be more or less than the current flowing though the input voltage source.
This is an example currently under construction here as we speak:
I do believe we are talking at cross purposes here. I am not disagreeing with you. What goes in must come out. As Kirchhoff is fond of saying after a few beers
As a note: The point of my posting that circuit is not that the supply is capable of delivering 2 Amps but that it will actually be delivering two amps when the load is only seeing 100mA. Meanwhile the input voltage is transformed from 12 to 200. As a first approximation the simulation is telling the truth.
A slight re-arragement of the circuit can do the transform the other way, lower voltage higher current.
My beef is with the claim that a linear regulator can put more current into the load than it sucks from the input supply. In a similar way that it cannot present a higher voltage to the load than it sees from the input supply. A linear reg does not do that "transform" as Peter says.
By way of some kind of completeness here is a switcher circuit delivering 1 amp at 5 volts into the load whilst taking 330mA from the 20 Volt input. 5 Watts out, 6.6 Watts in. 1.6 Watts wasted somewhere.
An equivalent linear regulator would be taking 1 Amp from the input and dropping 15 Volts. That 15 Watts wasted that needs to be dumped some where!
This is the SEPIC (Single Ended Primary Inductance Converter). It can produce output voltages higher or lower than the input simply by changing the pulse width of the switch. Buck or boost in the same circuit.
Now that is "magic".
My apologies to all those who are old hands at this but I only recently discovered these things. I'm still looking forward to experimenting with these circuits some more for real.
EDIT: Q1 is probably upside down in the above schematic. See posts below. It makes no difference in this simulation.
@Heater: I knew you were new at this, especially when you mentioned MC34063 as a "real" switcher
Those ones are just the simpler version of the really really really old (no, not as old as a 6AN7s) 78S40 switcher but here is one with a modern switcher that I made up for some products. It takes up to 70V in and gives me a nice clean ripple free 5V@1A output as well as 3.3V via the extra LDO onboard. It only uses ceramic capacitors and the inductor is on the other side but due to the high frequency of operation all the component values are small. The module has extra pins for varying the voltage up or down or shutdown. Now that's a switcher.
What I really wanted to do was make 200v out of 12v or so to drive a bunch of Nixie tubes. Back in the late 1970's my Nixies were isolated by means of a small mains transformer working backwards. That led me to a simple boost switcher converter built with the 555 and a MOSFET. The MC34063 is the next step up for me. True enough it's hardly a "real" switcher chip compared to modern devices, barely a step up from the 555.
The MC34063 has it's advantages though for experimenting with: It comes in a DIP package. It operates at relatively low frequencies, so all the components will be bigger. I'm only just now catching up with this new fangled surface mount technology:)
That led to the discovery of the SEPIC topology. SEPIC sounds great for this as it means one can use lower voltage rating MOSETS.
Historically for me all thought of switchers was off the table due to their mysterious operation, high frequency, and the need for small SMD parts. I might get there one day but once I'm happy I have learned enough about how they work I'm more likely to just buy ready made switcher modules from ebay.
Great looking board by the way. 70v in must be the highest I have seen for such a module.
Nobody here has made that claim. We really are talking at cross-purposes.
We are discussing converter/regulators here. Three terminal devices (Or four if the output is electrically isolated). For a three terminal device there are two circuits, a loop from source voltage to device and back to source voltage and a second loop from device through load back to device. The current in those two loops need not be the same.
Reading around a bit it seems that Physicists like to point out where Kirchoff's laws break down. But then they are missing the point that Kirchhoff's laws apply to the lumped circuit element approximation of real circuits, which is itself a gross over simplification of any electronic design. The lumped circuit model and Kirchoff's laws make it easier for electronics engineers to reason about their designs. rather than having to deal with the fact that every part of their gizmo is interacting with every other part via Maxwell's equations like a wobbly jelly.
What we do claim is that:
a) Given a three terminal black box it is possible to source a voltage out of two terminals that is very different from that applied to the third terminal and one common point.
b) For such a device it is quite possible to have more or less current in the output circuit than the input.
c) Power in is always greater than or equal to power out. (Except we can't do the "equal to" part in reality).
RDL2004,
See the specs for the R-78E5.0-0.5
This chip switching regulator takes a higher input voltage and switches down to 5.0V out. IIRC (without looking at the specs) is over 95% efficient.
Thus for 0.95W out, 1W input is required, with 0.05W loss within the regulator.
0.95W out = 5V @ 190mA.
1W input = 100mA @ 10V, or 50mA @ 20V.
So, you see here, we have a lower input current and a higher output current !
Now, lets just look at you PC...
Your power supply is probably capablee of supplying 5V @ 15A or more, plus other voltages at large currents too. But your input current (@110Vac in the USA or @240Vac here in Oz.). BUT the power supply does not draw 15A from the power point for this, does it !
So, you see here, we have a lower input current and a higher output current !
You are still only considering two of the three terminals on the regulator. The "missing" 90mA in your 10V example is going in the ground terminal.
Sum of the currents at all three terminals is zero: 100mA (Vin) - 190mA (Vout) + 90mA (ground) = 0.
Consider the case of a DC-DC converter with 4 terminals (two in, two out). Obviously the current Iin is the same at the input terminals, and Iout is the same at the output terminals. Sum of the input currents are zero and sum of the output currents are zero. Now tie the two low sides together (Vin- and Vout-) to form a common ground, and you have a three terminal regulator. It should be clear that the common ground current is (Iout - Iin). Thus for the three terminal regulator: Iin - Iout + (Iout - Iin) = 0.
OK. We really are talking at cross purposes and having an argument over nothing. It all comes down to some ambiguous statements made above.
If one amp enters a string of regulators, one amp comes out the other end.
The meaning of this depends what you mean by "other end".
As far as the source of power is concerned it puts out current on one terminal, say the positive output of a bench PSU, and the "other end" is it's other terminal, in this case the negative terminal of the bench PSU. In this case there is no debate. Current out = curent in as far as that PSU is concerned.
BUT we are discussing converter/regulators here. The normal interpretation of "other end" is the load being driven by the regulator. In this case the current seen by that bench PSU and the current seen flowing in the load need not be the same. This is clearly demonstrated by wiring up such a switching regulator and measuring PSU and load currents.
Except: For linear regulators the current in the load is usually equal to the current from the supply (Except for a tiny bit in that third leg). This is why they are so inefficient. For switching regulators this is not true. Which is why they are a lot more efficient.
It was a statement about this difference between linear and switchers that started all this mess for some reason unknown to me.
So that was one source of confusion.
You can measure current at any point in a circuit, it will be the same everywhere.
Taken literally this is gibberish. Build a network of resistors, apply some volts across it, measure or calculate the current through each resistor. They are often all different.
It is however true if you consider special networks. Like a simple loop of series resistors or a bunch of equal value resistors in parallel.
That was another source of confusion.
...the current in a DC circuit is the same everywhere....
Same as above.
If there is one amp going into a node, there is one amp coming out.
This seems to be stating Kirchhof's current law. So there is no debate there.
But what is the topology?
For two node devices wired in series in a loop every connection will carry the same current.
But again we are talking three terminal regulators. The current in to anyone of them is split between that which goes to ground and that which goes to the load. Those currents need not be equal.
All of this is a todo about nothing. Unless you really are arguing that for a switching regulator I have to have the same current flowing through my end load as I have flowing through my input terminals. Which is demonstrably not true.
The confusion here is apples to oranges. I see power here current there. The two dont compare. Voltage makes the difference. 1 amp current at 10 volts equals 2 amp currect at 5 volt. Power takes voltage into the calculation. 1 watt 10 volts equals 1 watt 5 volts, current changes. You need to talk current or power not both at the same time.
Yes indeed. Ultimately energy must be conserved. As I already pointed out three pages back in this thread (post #14).
However it is possible to think about the whole thing without thinking about energy or power. Simply with Kirchhoff's laws. Kirchhoff already wraps up all that messy physics stuff for you in such a way that in most cases it works well enough.
Using Kirckhhoff's current laws we can get all the right sums of currents at all the nodes.
Using the voltage law we can get all the voltages around all the loops in our design to add up correctly.
Ohms law get's you the rest of the way.
Mind you, in this case I agree with you. Thinking about power is the easy way:
Energy is conserved:
Pout = Pin
Which is:
Iout * Vout = Iin * Vin
Therefore:
Iout / Iin = Vin / Vout
Therefore:
Iout = In * Vin / Vout
Therefore load current need not be equal to supply current.
Yes, Kirckhhoff's law does it all. I just see some saying current in should equal current out and it will as long as the voltage stays the same. K's law takes all into the result. I agree with you, End Of Story.
Comments
Switching regulators are not exactly DC circuits. That "switching" is the key here.
Explaining how a switching regulator works is a bit much for a forum post so I suggest you start here to get an idea of how it is done: http://en.wikipedia.org/wiki/Buck_converter
Basically energy is alternately switched into an inductor which stores it in it's magnetic field. And then switched out of the inductor into the load where the energy dissipates.
The current in and out of such a circuit need not be the same.
Depending on how the inductor is connected and switched the output voltage can be lower or higher than the input. The current being correspondingly higher or lower thus keeping power in equal to power out (ignoring losses).
Boost converter: http://en.wikipedia.org/wiki/Boost_converter
I think it's quite magical really. I recently built my first ever switching boost converter using a 555 timer and a MOSFET. It took 12 volts in and put 200 volts out.
Think about that: The current out is ~17 times less than the current in. Ignoring losses.
Sadly when I accidentally disconnected the load the output shot up to over 600V destroying the MOSFET, the 555 and the diode! I did not have the feed back control in place yet. So I never got to measure the actual current ratios and hence the efficiency.
I'm about to try this again but with a proper switcher chip, the MC34063.
An ideal SMPS, with 5v @ 1A (5W) on its output, powered from 24V would draw 208mA. Powered from 3V, as a boost converter, its draw would be 1.67A.
Pin = Pout
But, outside of an ideal context, power in is greater than power out.
Applies not only to TO220 but also TO252, SOT223, SOT89 and SOT23 (aka SOT23-3)
I don't mean to be getting at you but your statements were bugging me when I woke up. Last night I was a too tired to really appriciate them: This is clearly not correct. A simple circuit with parallel resistors shows that. If the resistors are of different values the current through each will be different.
I guess you are talking about a simple single loop of series components. I which case yes that is true.
What you are really talking about is Kirchhoff's circuit laws:
1) The current law: The algebraic sum of currents in a network of conductors meeting at a point is zero. This is a statement about the conservation of charge.
2) The voltage law: The directed sum of the electrical potential differences (voltage) around any closed network is zero. This is a statement about the conservation of energy.
http://en.wikipedia.org/wiki/Kirchhoff's_circuit_laws
I was bugged because I woke up wondering how come this appears not to be the case for the switched converter circuits? Seems to be "magic" as I said above.
I think the paradox, if I can call it that, is removed by considering that Kirchhoff's laws apply to a circuit. But what we have here is effectively two circuits. An input loop and an output loop. Coupled together by the energy stored in the inductor which is transferred form one loop to the other when that switching action happens.
I think you would accept that in a transformer circuit the current in the input can be different than the current in the output. We really have two circuits there coupled by the transformer. There is no talk of current flowing between the input side and the output side in Kirchhoff's laws.
Similarly in the switcher, that switching action effectively disconnects the inductor from the input circuit and connects it to the output circuit thus transferring energy. You cannot apply Kirchhoff here so easily. We have to apply Kirchhoff to both circuits. This would probably be easier to see if we consider a fly-back switcher that has a transformer between input and output not just a single inductor. I believe that actually you did. Your statement was basically a statement of Kirchhoff's laws and those laws come about because of the need to conserve energy and charges in circuits.
As we require conservation of energy, else all of physics breaks down, we see that power in must equal power out:
Pin = out
Or in terms of currents and voltages:
Iin * Vin = Iout * Vout
Rearranging to give:
Vin / Vout = Iin / Iout
The ratio of the currents equals the ratio of the voltages. Same as for the transformer circuits.
Even with all that in mind I still think switchers are magic:)
P.S. Once again I'm not getting at you here. This was all just puzzling me as well.
Actually, this is correct, even for voltage regulators (linear or switcher).
If 330mA of current at 15V is flowing into the regulator, and 1A of current is flowing out at 5V, where did the other 670mA of current come from?
It came in the ground lead. The 1A flowing through the circuit returned 670mA to the regulator, and 330mA to the source. Total current in and out of the regulator is zero.
A linear regulator looks like this:
Where R1, R2, R4 represent the regulator. There is no way for the current in the load can be greater than the current in the source.
In your example the input power is 15 * 0.33 = 1 Watt and the output power is 5 * 1 = 1 Watt.
But for a linear regulator you would be dissipating power in your regulator. P = I * V.
Where V is the voltage drop drop, 10 Volts. And I is the current, 1 Amp. So the power dissipation in the regulator is 5 Watts.
So your example has 1 Watt going in and 6 Watts going out in the load and as waste heat.
This is clearly not possible.
Kirchhoff's current law tells us the currents at that node in the middle of the regulator must sum to zero. So Iinput = Iload - I leakage. The current in the load can only be less than the current in the input.
Another way to look at it is in your own words "Total current in and out of the regulator is zero." As there is no other current source in the circuit where would this extra current come from?
Just like a resistor: put 1A into 10 ohms and you burn off 10 watts. And you still get 1A out.
If you are talking about linear regulators then why do you quote the 330ma figure I gave for the example switching regulator with 15V input and then you subtract that from the given 1A on the 5V output????
The sum of all that explanation is indeed zero, squat.
That's why this thread is getting very confused $%^%#)(*&@#!!
A transformer can have 15V AC in and 5V RMS @1A load on the secondary so you already know that the 15V primary current is definitely not 1A. To keep it succinct a switching regulator TRANSFORMS in a similar manner.
I see no possible way this can happen with a linear regulator.
The very little ripple bit is important for me since I'm using a couple of 12 bit ADCs.
These units are not cheap but they do work well.
Sandy
Quite so.
To be fair, if you look at a switching regulator and think of it in the same way as a linear then you will come to all the wrong conclusions. But that is a natural tendency seeing as it has DC in and DC out. Which ignores all the "magic" in the middle.
The "magic" here, I have decided, is that we actually have two circuits. The input loop and the output loop. One could imagine that there were a switch at both ends of the inductor physically disconnecting it from the input loop and connecting it to the output loop. Clearly an inductor moved from loop to loop like that by the switcher can transfer energy from the input circuit to the output and can transform voltage and current as it does so.
You can simplify the circuit down to a power source and "every thing else". This way there are only two nodes. If you build such a circuit and measure the current flowing out of the power source and then measure the current flowing in to the power source, it will be the same.
This is actually pretty easy to test. So if you doubt Kirchoff's Law, just build some kind of circuit*, connect it to a battery and measure the current flowing into and out of the battery, right at the battery terminals. Report back here with your results.
* include a switching regulator if you want to be sure.
Yep, we have faith in Kirchhoff around here.
Although Kirchoff's laws are full of holes and "You cannot apply these «laws» safely unless you know when, how, and why they break down." As it says here: http://www.av8n.com/physics/kirchhoff-circuit-laws.htm
Yep, what you describe is true for switching regulators as well.
But is also true that the current flowing through the load on a switching regulator can be more or less than the current flowing though the input voltage source.
This is an example currently under construction here as we speak:
12 volts and 2 amps in. 200 volts and 100ma out.
I think you should build this circuit, then measure how much current actually flows from that source with only a 200 mA load.
I do believe we are talking at cross purposes here. I am not disagreeing with you. What goes in must come out. As Kirchhoff is fond of saying after a few beers
As a note: The point of my posting that circuit is not that the supply is capable of delivering 2 Amps but that it will actually be delivering two amps when the load is only seeing 100mA. Meanwhile the input voltage is transformed from 12 to 200. As a first approximation the simulation is telling the truth.
A slight re-arragement of the circuit can do the transform the other way, lower voltage higher current.
My beef is with the claim that a linear regulator can put more current into the load than it sucks from the input supply. In a similar way that it cannot present a higher voltage to the load than it sees from the input supply. A linear reg does not do that "transform" as Peter says.
An equivalent linear regulator would be taking 1 Amp from the input and dropping 15 Volts. That 15 Watts wasted that needs to be dumped some where!
This is the SEPIC (Single Ended Primary Inductance Converter). It can produce output voltages higher or lower than the input simply by changing the pulse width of the switch. Buck or boost in the same circuit.
Now that is "magic".
My apologies to all those who are old hands at this but I only recently discovered these things. I'm still looking forward to experimenting with these circuits some more for real.
EDIT: Q1 is probably upside down in the above schematic. See posts below. It makes no difference in this simulation.
Those ones are just the simpler version of the really really really old (no, not as old as a 6AN7s) 78S40 switcher but here is one with a modern switcher that I made up for some products. It takes up to 70V in and gives me a nice clean ripple free 5V@1A output as well as 3.3V via the extra LDO onboard. It only uses ceramic capacitors and the inductor is on the other side but due to the high frequency of operation all the component values are small. The module has extra pins for varying the voltage up or down or shutdown. Now that's a switcher.
Oh yes, this is all new ground for me.
What I really wanted to do was make 200v out of 12v or so to drive a bunch of Nixie tubes. Back in the late 1970's my Nixies were isolated by means of a small mains transformer working backwards. That led me to a simple boost switcher converter built with the 555 and a MOSFET. The MC34063 is the next step up for me. True enough it's hardly a "real" switcher chip compared to modern devices, barely a step up from the 555.
The MC34063 has it's advantages though for experimenting with: It comes in a DIP package. It operates at relatively low frequencies, so all the components will be bigger. I'm only just now catching up with this new fangled surface mount technology:)
That led to the discovery of the SEPIC topology. SEPIC sounds great for this as it means one can use lower voltage rating MOSETS.
Historically for me all thought of switchers was off the table due to their mysterious operation, high frequency, and the need for small SMD parts. I might get there one day but once I'm happy I have learned enough about how they work I'm more likely to just buy ready made switcher modules from ebay.
Great looking board by the way. 70v in must be the highest I have seen for such a module.
I do not really understand the impact of Q1, should emitter and collector swapped?
Ah, hmm, well...well spotted. Looks like you found the deliberate mistake in my plan
The idea of Q1 is to speed up the switch off time of the MOSFET by sucking charge out of it's gate as fast as possible.
It's not needed for this simulation given that the V2 driving the gate has zero impedance.
Whether you need it in a real circuit or not depends on what you are driving the gate from.
Nobody here has made that claim. We really are talking at cross-purposes.
We are discussing converter/regulators here. Three terminal devices (Or four if the output is electrically isolated). For a three terminal device there are two circuits, a loop from source voltage to device and back to source voltage and a second loop from device through load back to device. The current in those two loops need not be the same.
Reading around a bit it seems that Physicists like to point out where Kirchoff's laws break down. But then they are missing the point that Kirchhoff's laws apply to the lumped circuit element approximation of real circuits, which is itself a gross over simplification of any electronic design. The lumped circuit model and Kirchoff's laws make it easier for electronics engineers to reason about their designs. rather than having to deal with the fact that every part of their gizmo is interacting with every other part via Maxwell's equations like a wobbly jelly.
What we do claim is that:
a) Given a three terminal black box it is possible to source a voltage out of two terminals that is very different from that applied to the third terminal and one common point.
b) For such a device it is quite possible to have more or less current in the output circuit than the input.
c) Power in is always greater than or equal to power out. (Except we can't do the "equal to" part in reality).
See the specs for the R-78E5.0-0.5
This chip switching regulator takes a higher input voltage and switches down to 5.0V out. IIRC (without looking at the specs) is over 95% efficient.
Thus for 0.95W out, 1W input is required, with 0.05W loss within the regulator.
0.95W out = 5V @ 190mA.
1W input = 100mA @ 10V, or 50mA @ 20V.
So, you see here, we have a lower input current and a higher output current !
Now, lets just look at you PC...
Your power supply is probably capablee of supplying 5V @ 15A or more, plus other voltages at large currents too. But your input current (@110Vac in the USA or @240Vac here in Oz.). BUT the power supply does not draw 15A from the power point for this, does it !
Read through the mentioned wiki links. Power conversion versus voltage conversion.
I get it now.
Kinda like a transformer versus a resistor.
You are still only considering two of the three terminals on the regulator. The "missing" 90mA in your 10V example is going in the ground terminal.
Sum of the currents at all three terminals is zero: 100mA (Vin) - 190mA (Vout) + 90mA (ground) = 0.
Consider the case of a DC-DC converter with 4 terminals (two in, two out). Obviously the current Iin is the same at the input terminals, and Iout is the same at the output terminals. Sum of the input currents are zero and sum of the output currents are zero. Now tie the two low sides together (Vin- and Vout-) to form a common ground, and you have a three terminal regulator. It should be clear that the common ground current is (Iout - Iin). Thus for the three terminal regulator: Iin - Iout + (Iout - Iin) = 0.
See below:
As far as the source of power is concerned it puts out current on one terminal, say the positive output of a bench PSU, and the "other end" is it's other terminal, in this case the negative terminal of the bench PSU. In this case there is no debate. Current out = curent in as far as that PSU is concerned.
BUT we are discussing converter/regulators here. The normal interpretation of "other end" is the load being driven by the regulator. In this case the current seen by that bench PSU and the current seen flowing in the load need not be the same. This is clearly demonstrated by wiring up such a switching regulator and measuring PSU and load currents.
Except: For linear regulators the current in the load is usually equal to the current from the supply (Except for a tiny bit in that third leg). This is why they are so inefficient. For switching regulators this is not true. Which is why they are a lot more efficient.
It was a statement about this difference between linear and switchers that started all this mess for some reason unknown to me.
So that was one source of confusion. Taken literally this is gibberish. Build a network of resistors, apply some volts across it, measure or calculate the current through each resistor. They are often all different.
It is however true if you consider special networks. Like a simple loop of series resistors or a bunch of equal value resistors in parallel.
That was another source of confusion. Same as above. This seems to be stating Kirchhof's current law. So there is no debate there.
But what is the topology?
For two node devices wired in series in a loop every connection will carry the same current.
But again we are talking three terminal regulators. The current in to anyone of them is split between that which goes to ground and that which goes to the load. Those currents need not be equal.
All of this is a todo about nothing. Unless you really are arguing that for a switching regulator I have to have the same current flowing through my end load as I have flowing through my input terminals. Which is demonstrably not true.
Why am I bothering with all this?
Yes indeed. Ultimately energy must be conserved. As I already pointed out three pages back in this thread (post #14).
However it is possible to think about the whole thing without thinking about energy or power. Simply with Kirchhoff's laws. Kirchhoff already wraps up all that messy physics stuff for you in such a way that in most cases it works well enough.
Using Kirckhhoff's current laws we can get all the right sums of currents at all the nodes.
Using the voltage law we can get all the voltages around all the loops in our design to add up correctly.
Ohms law get's you the rest of the way.
Mind you, in this case I agree with you. Thinking about power is the easy way:
Energy is conserved:
Pout = Pin
Which is:
Iout * Vout = Iin * Vin
Therefore:
Iout / Iin = Vin / Vout
Therefore:
Iout = In * Vin / Vout
Therefore load current need not be equal to supply current.
End of story.