How do components know how much current to draw

Sorry really dumb question, I know a tiny amount about electronics that has helped a fair bit.
Re the above question, is it just the components overall resistance that determines how much current it can draw?

I know that you have to be specific with the amount of voltage for a component, but from my limited knowledge and experience you can have a huge amount of potential current in the power supply, but the device will only take what it needs. How is this determined, is it just the resistance of the wire etc that determines it?

Quick solution: Check the data sheet.

If its a resistor, sure its V=IR. If it is not a resistor, either use basic principles for stuff like Capacitors and Inductors. If you are asking about ICs or transistors, then the answer is "Check the datasheet" and "Depends". You can always measure it.

You can often classify something by its impedance, but that never tells the full story, and active devices typically are non-linear so Ohm's Law doesn't apply.

In conclusion: Check the Datasheet.

is it just the components overall resistance that determines how much current it can draw

Basically yes.
In some components resistance is not a constant but some function of something else, like time for a capacitor or voltage for an LED, but if you want to simplify it, yes it is resistance.

Current is given, it's taken. You seem to be aware of this simple fact, but it's something you really need to ponder on. The current drawn depends on the component's resistance. This can be:

-- Static; i.e., a resistor, or a light bulb.
-- Dynamic; particularly, frequency-dependent, known as "impedance", or maybe it depends on temperature, like a thermister, or by light, like an LDR.
-- Variable; like how a composite device -- such as an Arduino board -- draws current that varies as its components are running, and as you add other components which reduce the overall resistance, and therefore increase the current demand.

Here's a deeper question, which will lead to deeper understanding...

You have a pair or wires, one end of the pair is on your desk, the other end
is 10 km away at a friends desk connected to a resistor - it might be a 10 ohm
resistor, a 100 ohm resistor or a 1k ohm resistor - your friend hasn't
told you which one though.

Lets assume its magic wire with zero resistance (some spare superconducting
cable from CERN!).

You connect your 5V supply on your desk to the two wires. How do the wires
know how much current to draw? The resistor is 10km away, thats about 33
microseconds at the speed of light - so in that first 33 us the wires will be
drawing some current, but how much??? After several milliseconds its
obvious the current will reflect I = V/R where V = 5, R = 10 or 100 or 1000,
but those first few microseconds are very interesting since the wires cannot
know what the value of the resistor is...

TBC

Ohms law...

The wire's resistance will limit the total current available to your circuit, with exception to mainly diodes and batteries which operate on current after a required voltage has been provided.

Leds and batteries will consume large amounts of current providing the differential difference is high enough.

Zero resistance wires...

Q: How does your tap [faucet] know how much water to draw from the supply?
A: It doesn't know anything. It draws as much as you demand.

Henry_Best:
Q: How does your tap [faucet] know how much water to draw from the supply?
A: It doesn't know anything. It draws as much as you demand.

A: It doesn't know anything. It draws as much as you demand.

this is a short circuit, to prevent a short, you induce resistance into your circuit purposely via a resistor or a bulb, if it's a diode like an LED, you need to limit it's current with a resistor or controlling the current flow with more diodes or semiconductors like a couple of transistors and resistor to measure current flow and adjust the current flowing through the transistor.

Ohms law again.

Henry_Best:
Q: How does your tap [faucet] know how much water to draw from the supply?
A: It doesn't know anything. It draws as much as you demand.

It draws as much as you "demand" ?

No. The amount that comes out of the faucet depends on the pressure in the pipe, the size of the pipe, and the size of the hole in the faucet.

Depending on the style of faucet, your can control the third one of those parameters.

MarkT's question really is an interesting one which involves a transient pulse passing down the line and being reflected back by the termination device.

So not only is there the potential for "infinite" transient current flow but a "super oscilloscope" would show some interesting waveforms.

And for those who disbelieve, read up about TDR systems Time-domain reflectometer - Wikipedia

OK, a bit more detail.

In practice the current drawn by the wire pair from the 5V supply depends on
the geometry of the wires and the nature of the insulation. For the first 66us or so that is.

Indeed when the supply is connected a voltage pulse travels down the wire, with
current flowing in its wake. You can think of the current as being
required to charge up the capacitance between the wires - as the pulse travels
along more and more wire has to be charged up, so more charge in total is
needed, hence a constant amount of current is needed from the supply to fulfil
this demand.

In practice typical wire pairs have about 30pF per metre of capacitance, meaning
about 10mA is needed per volt of pulse (1V / 10mA = 100 ohms "characteristic impedance").
In one micro second about 300 metres have to charge up, which is ~10nF capacitor,
hence about 0.01 uC/V are needed in 1us hence about 0.01C/s/V = 0.01A/V.

That's not the whole story - the voltage step itself is acting on the inductance of
the wires to cause the current to rise from 0 to 10mA/V (for our 5V example
its 50mA in total). In reality this interplay of inductance and capacitance is what
sets the speed of the step. Typical insulation materials mean the actual speed
of signals are about 2/3rd the speed of light, here I've glossed over that.

The geometry and electric and magnetic properties of the materials determine
the capacitance and inductance per unit length of a cable, and these determine
both the speed of propagation and characteristic impedance of the cable. Wire
pairs are about 100--150 ohm, coaxial cables 30 to 75 ohms. Its hard to make
cables much outside this range.

Back to the thought experiment - we have a voltage step travelling along the wires
for 10km, 5V step, 50mA in its wake. The step reaches the resistor and current
can flow into the resistor.

If the resistor happens to be 100 ohms that's the end of the story, all it simple
since it sees 5V and swallows all of the 50mA neatly.

If its different then we have what is called an impedance mis-match, and another
step wave starts to flow back the other way (it could be the same sense if the
resistor is 1000 ohms, or opposite if its 10 ohms). The resistor ensures the
current it takes is in the right ratio to the voltage it sees and any excess or
deficiency generates a new wave. A very high value resistor will generate another
5V wave on top of the arriving one, and thus get 10V (and cancelling out most of
the current). A dead-short will generate a -5V wave which cancels the voltage (but
doubles the current in the wire to 100mA since the wave is opposite sense but flowing in opposite direction).

On a longer timescale we have a series of wave fronts bouncing back and forth that
ultimately inform the power supply what current the resistor actually wants - and inform
the resistor that the supply really wants to be 5V - the voltage on the wire will "ring" or
oscillate in discrete steps for a while until it settles down, the current will increase or decrease in a stepped exponential.

[[ With a good oscilloscope and a few 10's of metres
of wire you can do this experiment yourself (you don't need 10km, 20m will give a
round-trip delay of about 150 to 200ns depending on the cable insulation. Coax or
twisted pair (as in CAT5) will perform well. Connect about a 100 ohm resistor between
an Arduino pin and the cable, ground to the other wire and observe the voltage on
the cable/resistor junction when you send a square wave down it. (Also connect a
schottky diodes between the pin and ground and Vcc to protect against reflected
current doing damage)

Try shorting the end of the cable (actually for that make the resistor 150 ohms to avoid overloading the pin).

Try terminating the cable in 100 ohms.
]]

So my real point is this is how components know how much current to draw ultimately,
there is a to-and-fro exchange of wavefronts between the "supply" and the "load" which
mutually converges on the steady-state value - whenever there is a step change in the
situation. All signals can be factored into a sum (perhaps infinite) of small (infinitessimal)
step changes.

Normally you don't have to think about this, but as soon as you want to deal with
stepped waveforms (such as logic pulses) this aspect of electronics comes to the fore
and can't be ignored. Its why we need decoupling capacitors right next to chips, its
why signalling over long wires is fraught with traps for the unwary, its why we need
ground planes. Its also why every signal wire should be routed alongside a ground
or supply wire (so that the wave has a wire pair to propagate along).

To send logic signals at high speeds down a long cable you need to terminate it with a
resistor of its characteristic impedance - otherwise the cascade of reflected signals will
reduce its bandwidth severely and cause lots of distortion to the wavefront (ringing). Protocols like ethernet, USB, RS485, SATA all do this, and these days traces on a
computer PCB are also terminated with their characteristic impedance so that
multi-Gb/s signals can be pushed between chips.

So the grand answer to the question "How do components know how much current to draw"
is thus "because the wiring between them carries electromagnetic waves back and forth
until both ends are satisfied".

How do components know how much current to draw

Quite simply, they are born with that knowledge. :wink:

retrolefty:

How do components know how much current to draw

Quite simply, they are born with that knowledge. :wink:

No, the government gives them a licence telling them how much they are permitted to draw.

Killer post, Mark. Very well done.

mattjberry:
Sorry really dumb question, I know a tiny amount about electronics that has helped a fair bit.
Re the above question, is it just the components overall resistance that determines how much current it can draw?

It's not a dumb question.

Devices do not "know" how much current to draw... they draw what they need.

For example, a 60 watt light bulb. At 120 volts, 60 watts is 1/2 ampere. The tungsten filament has the correct diameter and length (designed at the factory) to have a hot resistance of approximately 240 ohms. So, when 120 volts is applied, the bulb draws 1/2 ampere and that figures out to be 60 watts.

It's a bit more complicated for digital circuits. Typically, a CMOS chip draws virtually zero current when resting (that is, not switching).

Now, imagine a microprocessor with millions of CMOS transistors. The internal capacitance of each transistor needs to be charged and discharged each time that transistor switches. So, switch a gate on or off and you get a momentary spike of current demand. Of course, thousands to millions of gates are all switching at the same time, and in different patterns. So, all those little spikes add up to an average current that the microprocessor draws.

From this it's obvious that the faster the chip switches, the more current it will draw (which is why your CPU needs a big heatsink and a fan!).

Analog circuits like audio amplifiers draw current for two different reasons. One reason is simply that the power being sent to the speakers have to be sent from the power supply, through the power transistors and into the speakers.

Audio amps usually are "push-pull" circuits where one transistor sends out plus voltage to the speaker and the other minus power.

Now, picture the amplifier like this: Take a rope, have a person hold each end and connect the speaker cone in the middle.

One person can pull the rope one way (but can't push it), the other person can pull the rope the other way.

For the speaker cone to FAITHFULLY follow the movements of the two people, the rope needs to be TAUT. If the rope had some slack, each person would pull a little before the speaker cone started to move. The speaker would not follow the "signal" faithfully and you would have DISTORTION (called "crossover distortion" in an audio amp).

The resting tension or tautness of the rope uses energy (muscle energy in the people, or DC current in the amp). So, the audio amplifier draws or "wastes" some current (and therefore power) simply idling and keeping itself biased (the rope tight).

A fluorescent light sends current through mercury vapor, generating ultraviolet light. This UV light is then converted to visible light by the white phosphor coating inside the lamp.

The current flowing through the lamp has to be the right amount (too little and the lamp is dim or doesn't even work), too much and it overheats and burns out. So the lamp fixture has a ballast (a choke coil or an electronic circuit) that controls the current flowing through the lamp. So, the lamp draws what it needs.

I hope these examples made sense. There are a LOT more, but I think these examples should be enough for you to get the idea.