Brand new to electricity & hobby electronics here, and I just watched this video on calculating the resistor needed for an LED, and I had a basic question about that process that I (surprisingly) could not find an answer to.

In that video, the setup is very simple:

  • 9V battery
  • LED rated at 9V and 20mA

Hence the author explains that you need a resistor rated at:

R = (V2 - V1) / I
  = 9V - 3V / 20mA
  = 6V / 20mA
  = 300 ohms

Math is simple, and makes sense. Well, mostly...

However the battery is outputting/supplying (giving off?) 9V of voltage. And a cursory Google search yielded that the avergae 9V battery outputs/supplies (gives off) ~5mA of current. So to me, in my newbie/dummy brain:

  • The battery is providing us with 9V @ 5mA
  • The LED requires 3V @ 20mA
  • This means we need to lower the voltage by 6V (9V - 6V = 3V); and
  • It also means we need to raise the current by 15mA (5mA + 15mA = 20mA)

My assertion: So by lowering the supplied voltage from 9V -> 3V and by raising the supplied current from 5mA -> 20mA, we are providing the LED with the correct voltage and current that it needs to operate successfully & safely.

So to me, the problem here is:

How do we "convert" the outputted/supplied voltage & current to the required voltage & current of the component (in our case, an LED; but could be anything I guess, a buzzer, a motor, etc.)?

So my question here is: am I correct in asserting that the way you decide how to wire any component to a voltage source (9V battery in this case) is by deciding on the required adjustments to both voltage and current? Or do we just care about voltage? And why?! (For example, are there some cases where we care about making supplied voltage equal to required voltage, other cases where we only care about making supplied current equal to required current, and maybe other cases where we care about both?)

So if you really read between the lines of my question, I'm looking for the strategy on determining what "supporting components" (resistors, transistors, capacitors, etc.) need to be added to make a voltage source "compatible" with some other IO component (LED, pushbutton, buzzer, motor, etc.).

  • \$\begingroup\$ +1 for well written question. The answer may be a little too broad for here though. \$\endgroup\$
    – Trevor_G
    Sep 7, 2017 at 21:08
  • \$\begingroup\$ Thanks @Trevor, I kinda/sorta see your point, but I think this is also an important electronics subject for any newbies that actually think outside the box and want to understand why we do things (like add resistors for LEDs), and don't just accept what they read in textbooks and cargo cult their way through life :-) . \$\endgroup\$
    – smeeb
    Sep 7, 2017 at 21:09
  • 1
    \$\begingroup\$ Yup. it's just this forum is not well suited to the kind of interactive Q&A discussion you probably need to satisfy your thirst. But you might get some good, deeper, responses. \$\endgroup\$
    – Trevor_G
    Sep 7, 2017 at 21:11
  • 1
    \$\begingroup\$ Isn't this a variant on "is current pushed or pulled" which gets asked at least once a week? \$\endgroup\$
    – pjc50
    Sep 7, 2017 at 21:36
  • \$\begingroup\$ @pjc50 Sounds like it to me. \$\endgroup\$
    – Steve G
    Sep 7, 2017 at 21:53

2 Answers 2


A 9V battery will, within limits, always supply 9V. But a battery does not force a specific current into a load. Instead it is the load (in your case the LED and resistor) which determines how much current it needs, and within limits, the battery supplies the required current. In your circuit the LED and resistor will demand 20mA from the battery, and the battery will happily supply 20mA. Try your circuit, you will find it works OK.

If you have an LED and resistor circuit that requires 200mA then the battery will try to supply 200mA, but with a small 9V battery you may find that the voltage across its terminals is no longer 9V, but has fallen to say 7V. This is because the battery has a small amount of internal resistance which drops voltage. Its like having a resistor inside the battery. Unfortunately you cannot remove this resistor! And as the battery gets older the value of this resistor will increase.

If you want the battery voltage to remain about 9V when supplying 200mA then what you need to do is to get a different battery with a lower internal resistance. You can get a better quality battery like a Duracell, get a bigger 9V battery like a PP9, or make a 9V battery from six 1.5V AA cells.

  • \$\begingroup\$ Thanks so much @Steve G (+1), the way you phrased the first paragraph made a lot of sense to me: the load determines the current requirements, and the voltage source tries to supply that required current. Got it! A few followup questions, if you don't mind, that would help lock this in for me: (1) Is it safe to provide the LED more and/or less voltage than it is rated for? (2) Is it safe to provide the LED more and/or less current than it is rated for? (3) Are your answers to (1) and (2) above the same for all components (LEDs, buzzers, pushbuttons, servos, etc.)? \$\endgroup\$
    – smeeb
    Sep 7, 2017 at 23:28
  • \$\begingroup\$ And finally (4) How does one determine whether a particular voltage source is capable of providing the required current to a given load? Thanks again so much! \$\endgroup\$
    – smeeb
    Sep 7, 2017 at 23:29

Any supply, if you change the load on that supply, voltage or current will change.

Batteries are constant-voltage devices. Meaning a 9V battery will supply whatever current your load asks for, at around 9 volts. (It may sag slightly). Almost all supplies are constant-voltage.

An LED works best as a constant-current load, that is, it is happiest if the supply is limiting its supply current to a specified amount. This is done by varying the supply voltage, increasing it if current drawn is too little, decreasing if it's too much. Supplies don't normally do that, so the state of the art for high-power LED lighting is an active driver circuit which does.

However, for a small job, a resistor will suffice.

  • \$\begingroup\$ Thanks so much @Harper (+1) - a few followup questions if you don't mind: (1) how do I tell if a particular device/component (battery, LED, buzzer, servo, etc.) is a constant voltage vs constant current device? (2) How do I tell whether a particular load will change the supply's voltage or its current? (3) Is it ever OK for supplied voltage to be greater than or equal to a device's rated forward voltage? And finally (4) Is it ever OK for supplied current to be greater than or equal to a device's rated forward current? \$\endgroup\$
    – smeeb
    Sep 7, 2017 at 21:14
  • \$\begingroup\$ I think if I understand these, I'll be able to make full sense of your answer! Thanks again so much! \$\endgroup\$
    – smeeb
    Sep 7, 2017 at 21:14
  • \$\begingroup\$ @smeeb 1) either your knowledge/experience tells you this is the nature of the type of device, or you check its data sheet. 2) start by looking at the supply, a constant-voltage supply will fight changes in voltage, ditto -current. 3) and 4) Generally not unless you are engaged in sabotage. However a few devices can be overdriven with a nudge and a wink (CPUs, illumination LEDs). If an LED's spectral data is specified at 350ma but the data sheet says it's good to drive it to 1400ma, what's its rating? \$\endgroup\$ Sep 10, 2017 at 3:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.