Calculating resistors for leds

Hello,

I need to wire 6 LEDs they have a forward voltage of 1.2 to 1.4 and require 100ma
the schematic I have attached, I have put values in but I'm unsure.

can someone advise me, but id also like to understand the calculations for future knowledge?

2020-01-31 18_06_38-Circuit Wizard - [led circuit.cwz _].png

You need to understand Ohm's Law and Kirchhoff's circuit laws, these are basic to all electrical circuits and the answer to your question comes from understanding them.

You have 7.4V from the battery. You say the LEDs have a Vf of 1.2V to 1.4V. Taking 1.4V, subtract that from 7.4V, giving 6V.

Current is calculated as V/R, so with the values you have 6/470 = 12.7mA.

Resistance is calculated as V/I, so for 100mA 6/0.1 = 60 Ohms.

Also, if you apply 5V directly to the transistor base it will die. You need a resistor, same calculation as for an LED. Vf for a base - emitter junction can be assumed to be 0.6V for a silicon transistor.

Ummmm.. LEDs needing 100mA will get quite warm. The increase in temperature will lower their forward voltage. As the forward voltage drops, the current will increase, making them even hotter and pretty soon... they will fail.

To prevent this, you can do one of two things.

  1. Connect the LEDs to a large heatsink to keep their temperature stable

  2. Use a constant-current circuit to adjust the resistor to automatically keep the current stable.

I think I know what type of LEDs you plan to use. I have some that I bought to test and play with. They are 8-10mm and have quite wide flat pins which narrow down to thin pins so they can plug into breadboards. When I tested them, I used a resistor which resulted in around 100mA when they were cold. But they soon got warm and failed after 4~8 hours.

Thanks

Ok, I've now put a 2k resistor between the 5v and 2n2222 transistor the circuit works in circuit works.

hello, paul the LEDs I have are 5mm infra-reds, I will look at a constant current circuit but this is all new to me.

MakeMyIdeas:
hello, paul the LEDs I have are 5mm infra-reds, I will look at a constant current circuit but this is all new to me.

Ah, ok, forget what I said. But next time please give more detail about the components you are using in your first post. Perhaps I should have guessed by the low forward voltage. With IR LEDs, they are normally only pulsed to 100mA for short periods, so won't get hot, and a constant current circuit won't be necessary.

Thanks, Paul.

yes, I agree I was very vague in my first post and will next time thanks for your time in helping me.

modified circuit is attached.

2020-01-31 19_24_54-Circuit Wizard - [led circuit.cwz].png

Very wasteful use of the battery.
You can have three of those LEDs in series (3*1.4volt = 5.2volt), and the remaining 2.2volt across the resistor.
So two strings of three, with two 22 ohm resistors.
That would use 200mA instead of 600mA.

R3 current should be calculated for 5% (5-10%) of the collector current.
Totally off in that diagram (~2mA instead of the required ~45mA).
The 2N2222 will not saturate, and LED current is not what you calculated for.

Three LEDs in series would make LED current more dependable on battery voltage.
Constant current drive would be better.
Leo..

Wawa:
Constant current drive would be better.

8e4de9873c8cdeb40fea6393b6dd71654143e5a0.png

Three
LEDs in
series

For 100 mA,
R would
be 6.8 Ohms

Of course, using a resistor and one LED from 7.4 V was essentially constant-current drive. :grinning:

So changed it to parallel series but i have no clue about constent current circuit

2020-01-31 22_18_46-Circuit Wizard - [led circuit.cwz _].png

Your circuit will work, but the 2N2222 will burn out with that low base resistor value.
Change R3 to 220 ohm.

Or use two of Paul__B's circuits, one for each LED string of three.
Change the 3k3 resistor to 1k, the 'R' resistor to 6.8ohm (standard value), and the LED transistor to a 2N2222.
Don't use a 22 ohm resistor in the LED string if you use that constant current circuit.
Leo..

Couple of interesting things.

The BC547 is actually not appropriate for this task as its collector current maximum continuous rating is 100 mA. Its gain at this current however exceeds 100 so the 3.3k resistor would actually be adequate (just) to bias it, and probably also for a 2N2222. Yes, 1k would be better. Not my own graphic!

And yes, it is the β (HFE) that is relevant in this case. The transistor is not saturating.

So using the values you have provided, know I have done the constant current circuit twice and can both be controlled by a single pin from arduino?

Almost correct.
There also must be two 1k resistors, joined at the Arduino pin.

Q2, Q4 can be small signal transistors, like BC547/548 2N3904 etc
They only pinch off base current for the LED driver when it reaches >=100mA.

IR LEDs drop about 1.4volt@100mA, which means that you can have up to four LEDs in the string.
Leo..

Thanks, Leo,

I hope you tell me it's all fine now, as you seem very knowledgeable could you advise on a good book to understand more about electronics.

as for four, I've attached an image of my project it currently only has room for six LEDs on the righthand side of the head unit but could be adapted is there a benefit to having 4?

Perfect.

Learned the basics in the fifties/sixties, and those books are not current any more.
Maybe someone younger can chime in for that.
I currently only use the net for data sheets, forums, etc.
Increasing the knowledge until Alzheimer's kicks in.

Circuit is quite simple.
The 2N2222 gets sufficient base current from the Arduino pin that could draw several hundred mA through the LED string. That current builds up a voltage across the 6.8ohm emitter resistor.
When the voltage reaches the BE threshold (~0.65volt) of the 2N3904, that one starts to conduct, and channels some of the base current for the 2N2222 to ground.
The 2N2222 is the throttle, the 2N3904 is the brake. They both settle at ~100mA.

Seems you are using the LEDs for an IR spotlight, for a camera?
With three LEDs in a string (Vf~4.2volt), about 40% of the power is used (wasted) in the transistor.
A fourth LED just gives you a bit more light at no power cost.
Five LEDs in a string (Vf~7volt) is pushing it when the battery goes flat.
Six LEDs in a string (Vf~8.4volt) is not possible on a ~7.4volt battery.
Leo..

Bad circuit:
2020-02-01 20_19_10-Window.png

Better circuit:
2020-02-01 21_06_05-Window.png
Project:
wr.JPG

MakeMyIdeas:
is there a benefit to having 4?

It would make more efficient use - extra light output - of the same current you are already providing.

Wawa:
Increasing the knowledge until Alzheimer's kicks in.

Popular opinion is that crosswords and such are good "exercises" to enhance function against the onset of Alzheimer's. It is not necessarily suggested this alters the actual pathology of the disease though it is not impossible, but that you continue to recruit damaged brain function to make the best use of it, as in recovery from a stroke.

I would think that coding and making with Arduinox or similar, should be at the least as effective an activity.

Hello,

so I have redesigned the headpiece to accommodate the extra 2 LEDs, do I need to change the resistors the 6.8?

The 6.8ohm resistor just sets the 100mA current through the string.
No changes needed if you add another LED.
Leo..

Paul__B:
It would make more efficient use - extra light output - of the same current you are already providing.