Jump to content

Help finding what resistor I need?

ELECTRISK

So I have a basic circuit:

A 2V 20mA LED, a MB102 power supply which can be switched to either 3.3v or 5v, and a resistor. With this information, can I determine how many ohms my resistor needs to be? Are there online calculators that I can insert my supply voltage and device current into to calculate how many ohms my resistor needs to be? Anything else I need to know?

Thanks! 

Link to comment
Share on other sites

Link to post
Share on other sites

image.png.af77abadde1d1b0bf30b10b01c3a355d.png

Ryzen 5700g @ 4.4ghz all cores | Asrock B550M Steel Legend | 3060 | 2x 16gb Micron E 2666 @ 4200mhz cl16 | 500gb WD SN750 | 12 TB HDD | Deepcool Gammax 400 w/ 2 delta 4000rpm push pull | Antec Neo Eco Zen 500w

Link to comment
Share on other sites

Link to post
Share on other sites

Resistance of LED = 2/0.02 = 100 ohms

 

needed resistor resistance at 3.3V (in series) = 100/2*1.3 = 65 ohms

needed resistor resistance at 5V (in series) = 100/2*3 = 150 ohms

CPU: i7-2600K 4751MHz 1.44V (software) --> 1.47V at the back of the socket Motherboard: Asrock Z77 Extreme4 (BCLK: 103.3MHz) CPU Cooler: Noctua NH-D15 RAM: Adata XPG 2x8GB DDR3 (XMP: 2133MHz 10-11-11-30 CR2, custom: 2203MHz 10-11-10-26 CR1 tRFC:230 tREFI:14000) GPU: Asus GTX 1070 Dual (Super Jetstream vbios, +70(2025-2088MHz)/+400(8.8Gbps)) SSD: Samsung 840 Pro 256GB (main boot drive), Transcend SSD370 128GB PSU: Seasonic X-660 80+ Gold Case: Antec P110 Silent, 5 intakes 1 exhaust Monitor: AOC G2460PF 1080p 144Hz (150Hz max w/ DP, 121Hz max w/ HDMI) TN panel Keyboard: Logitech G610 Orion (Cherry MX Blue) with SteelSeries Apex M260 keycaps Mouse: BenQ Zowie FK1

 

Model: HP Omen 17 17-an110ca CPU: i7-8750H (0.125V core & cache, 50mV SA undervolt) GPU: GTX 1060 6GB Mobile (+80/+450, 1650MHz~1750MHz 0.78V~0.85V) RAM: 8+8GB DDR4-2400 18-17-17-39 2T Storage: HP EX920 1TB PCIe x4 M.2 SSD + Crucial MX500 1TB 2.5" SATA SSD, 128GB Toshiba PCIe x2 M.2 SSD (KBG30ZMV128G) gone cooking externally, 1TB Seagate 7200RPM 2.5" HDD (ST1000LM049-2GH172) left outside Monitor: 1080p 126Hz IPS G-sync

 

Desktop benching:

Cinebench R15 Single thread:168 Multi-thread: 833 

SuperPi (v1.5 from Techpowerup, PI value output) 16K: 0.100s 1M: 8.255s 32M: 7m 45.93s

Link to comment
Share on other sites

Link to post
Share on other sites

Ohm's law  .... voltage equals  current x resistance   or V = I x R  ... i got used to it by thinking of "virus" everytime.

 

So   Voltage psu  - Forward Voltage LED = Current x Resistance

 

Your voltage is 3.3v , forward voltage is 2v , current is 0.02A (20mA)  .... therefore resistance =  (voltage psu - forward voltage) / current = (3.3v - 2v) / 0.02 = 1.3 / 0.02 = 65 ohm.

 

This is not a preferred value ( see https://en.wikipedia.org/wiki/E_series_of_preferred_numbers ), normally you'd want to aim for one of the E24 values

 

[  1.0, 1.1, 1.2, 1.3, 1.5, 1.6, 1.8, 2.0, 2.2, 2.4, 2.7, 3.0, 3.3, 3.6, 3.9, 4.3, 4.7, 5.1, 5.6, 6.2, 6.8, 7.5, 8.2, 9.1   ]   x 10 , 100, 1000 etc

 

so you should go with either 62 ohm (which means slightly more current than 20mA) or 68 ohm, which means slightly less current.

Or, you could go with 2  130 ohm (1.3 x 100 , it's in your E24 values above) resistors in parallel, which will give you exactly 65 ohm .

Or, you could go with a 62 ohm resistor and a 2.7 ohm resistor in series, which gets you to 64.7 ohm, which is close enough considering the 5% or 1% tolerance of your resistors - you really don't need better than 5% precision though.

 

With 5v input, you're looking at (5v - 2v) / 0.02A = 150 ohm  which is an E24 value

 

You have a second formula which you can derive from the first ... power dissipated in the resistor..

 

Power   = Current 2 x Resistance ... so with 62 ohm, you have P = 0.022 x 62 = 0.0248 watts  which tells you that it would be safe to use a 0.125w resistor  (if your value was higher than around 70% of the resistor's rating, for example 0.1w, then you would go with the next rating which would be 0.25w, otherwise it would be unsafe to use the resistor and it could be very hot during operation)

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

4 hours ago, Infinite_Render said:

So I have a basic circuit:

A 2V 20mA LED, a MB102 power supply which can be switched to either 3.3v or 5v, and a resistor. With this information, can I determine how many ohms my resistor needs to be? Are there online calculators that I can insert my supply voltage and device current into to calculate how many ohms my resistor needs to be? Anything else I need to know?

Thanks! 

Note that the relationship current/brightness is not linear. You could drop the current to 15mA (perhaps even lower) with not much loss in light intensity and make your LED last multiples longer in stead of pushing near it's limit for little reason.

Link to comment
Share on other sites

Link to post
Share on other sites

And while not relevant for a tiny led that consumes 20mA, it's important to understand this..

 

Limiting current with a resistor is something very rudimentary, a very poor of controlling the current and protecting the led.

 

The forward voltage of  led is not fixed, and will vary significantly from the factory. If you take 100 red leds from a box with thousands of leds, their forward voltage will vary a lot, let's say between 1.7v and 2v. 

Also, the forward voltage of a led typically decreases a bit as the led gets warm. So, with a more powerful led, you would set the current to 100mA but as the led heats up from 30c ambient to 60-80c operating temperature, its forward voltage could decrease enough to allow more current to flow through ... so now instead of 100mA you may have 105..110mA of current.

You also have the resistor itself.... if it's a cheap one, then its actual value will deviate slightly as it gets hot. Usually it's not significant enough to get outside the 1..5% tolerance so you don't worry about it but nevertheless it's also a factor.

 

if you're more curious about effect of heat you could check out this application note: https://www.cree.com/led-components/media/documents/XLampThermalManagement.pdf

It's probably not the best, but it's first one i could find right now.

 

To work around these issues, we have led drivers, which actually monitor the current (by reading the voltage drop across a very small value resistor, like 0.01 ohm or something like that) and depending on this value they either increase or decrease the voltage, aiming to keep the current constant.  Linear drivers use a pnp or npn transistor to adjust voltage, basically like a linear regulator... and switching drivers typically use an inductor and use pwm to send pulses of various widths to adjust voltage (and this is more efficient than dropping power in the linear regulator part of the driver, but it's a bit more costly)

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

V = IR. So R = V/I.

When the supply voltage is considerably higher than the forward voltage of the LED, the calculation can be approximated by taking V as the supply voltage subtracted by the LED forward voltage. Therefore:

 

(3.3-2)/0.02 = 65ohm, or higher.

(5-2)/0.02 = 150ohm, or higher.

 

Beware: even if it's rated at 3.3V, or 5V, the voltage can be a bit higher or lower than that because of the tolerance. Same goes for the resistor, there's a tolerance. Let's assume that the tolerance is 5% for the power supply:

(3.3*1.05-2)/0.02 = 73ohm.

(5*1.05-2)/0.02 = 162ohm.

Now let's handle the resistance tolerance. 73/0.95 would be 76.8ohm. 162/0.95 would be 170.5ohm. So picking a resistor with higher than these values would be safe.

 

Just ensure that current is less than 20mA and the LED is good. When in doubt, get a multimeter and measure it. :)

Link to comment
Share on other sites

Link to post
Share on other sites

On 12/7/2018 at 1:23 AM, mariushm said:

And while not relevant for a tiny led that consumes 20mA, it's important to understand this..

 

Limiting current with a resistor is something very rudimentary, a very poor of controlling the current and protecting the led.

 

The forward voltage of  led is not fixed, and will vary significantly from the factory. If you take 100 red leds from a box with thousands of leds, their forward voltage will vary a lot, let's say between 1.7v and 2v. 

Also, the forward voltage of a led typically decreases a bit as the led gets warm. So, with a more powerful led, you would set the current to 100mA but as the led heats up from 30c ambient to 60-80c operating temperature, its forward voltage could decrease enough to allow more current to flow through ... so now instead of 100mA you may have 105..110mA of current.

You also have the resistor itself.... if it's a cheap one, then its actual value will deviate slightly as it gets hot. Usually it's not significant enough to get outside the 1..5% tolerance so you don't worry about it but nevertheless it's also a factor.

 

if you're more curious about effect of heat you could check out this application note: https://www.cree.com/led-components/media/documents/XLampThermalManagement.pdf

It's probably not the best, but it's first one i could find right now.

 

To work around these issues, we have led drivers, which actually monitor the current (by reading the voltage drop across a very small value resistor, like 0.01 ohm or something like that) and depending on this value they either increase or decrease the voltage, aiming to keep the current constant.  Linear drivers use a pnp or npn transistor to adjust voltage, basically like a linear regulator... and switching drivers typically use an inductor and use pwm to send pulses of various widths to adjust voltage (and this is more efficient than dropping power in the linear regulator part of the driver, but it's a bit more costly)

 

 

To add to this, as closed loop regulation is not really necessary for low current indicator led's, what I typically do is spec the current limiting resistor for around 20% under the rated current. Pretty common to do in industry as it can massively increase the lifetime of led's without too large a drop in light output.

Case: Phanteks Evolve X with ITX mount  cpu: Ryzen 3900X 4.35ghz all cores Motherboard: MSI X570 Unify gpu: EVGA 1070 SC  psu: Phanteks revolt x 1200W Memory: 64GB Kingston Hyper X oc'd to 3600mhz ssd: Sabrent Rocket 4.0 1TB ITX System CPU: 4670k  Motherboard: some cheap asus h87 Ram: 16gb corsair vengeance 1600mhz

                                                                                                                                                                                                                                                          

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×