{"id":37,"date":"2012-02-20T10:53:37","date_gmt":"2012-02-20T10:53:37","guid":{"rendered":"http:\/\/stompville.co.uk\/?p=37"},"modified":"2020-10-11T16:21:14","modified_gmt":"2020-10-11T16:21:14","slug":"test","status":"publish","type":"post","link":"https:\/\/stompville.co.uk\/?p=37","title":{"rendered":"How to calculate the series resistor for an LED"},"content":{"rendered":"<p>So you&#8217;re mucking about with a stompbox and you want to change the boring old red LED for a shiny new white LED &#8211;\u00a0 but you&#8217;re not sure how to proceed&#8230;<\/p>\n<p>Over the last ten years or so, light emitting diodes (LEDs) have generally become much more efficient than they used to be (actually, the technical term is &#8220;luminous efficacy&#8221; rather than &#8220;efficiency&#8221; but you know what I mean).\u00a0 So you either get more-bang-for-your-buck <em>or<\/em> you get the same amount of bang for a lower price.<\/p>\n<p>An LED is a diode, so it only conducts current in one direction.\u00a0 When it&#8217;s conducting it has a forward voltage drop. This forward voltage drop increases slightly as the current increases, but not by much.<\/p>\n<p>The nominal forward voltage drop depends on the colour of the diode and typically you have the following: &#8211;<\/p>\n<p><a href=\"http:\/\/stompville.co.uk\/wp-content\/uploads\/2012\/02\/103SV1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-115\" title=\"103SV\" src=\"http:\/\/stompville.co.uk\/wp-content\/uploads\/2012\/02\/103SV1.png\" alt=\"LED Forward Voltage Drop Table\" width=\"300\" height=\"259\" \/><\/a><\/p>\n<p>So how do we go about deciding on the value of that pesky series resistor?\u00a0 Well:<\/p>\n<ul>\n<li>We know what the forward voltage is,<em> and<\/em><\/li>\n<li>We know what the supply voltage is, <em>and<\/em><\/li>\n<li>We know what current we want to flow through the LED<\/li>\n<\/ul>\n<p>Actually, we need to choose what current we want to flow through the LED.\u00a0 Up to a point more current means brighter.\u00a0 After a while though, more current just means the LED runs hotter but doesn&#8217;t get any brighter.<\/p>\n<p>We start by picking a current that&#8217;s going to light up the LED so we can see what it looks like.\u00a0 High efficiency LEDs may give a good light at 2mA forward current whereas older designs may need 20 or 30mA forward current to give a decent light output.<\/p>\n<p>Let&#8217;s say we go looking for a white LED and settle on the Kingbright L7113PWW-A which is a fairly inexpensive 5mm diffused white LED.\u00a0 A quick scan of the datasheet reveals that the brightness is 1000mcd @ 20mA with a forward voltage drop of 3.2V.<\/p>\n<p>Now, 1000mcd is far too bright for a stomp box and 20mA forward current will drain the battery pretty hard so we need to consider a lower current and corresponding lower brightness.\u00a0 The datasheet has two graphs of interest:<\/p>\n<ul>\n<li>Luminous Intensity (i.e. brightness) vs Forward Current<\/li>\n<li>Forward Voltage vs Forward Current<\/li>\n<\/ul>\n<p>We can probably get a suitable brightness from about 2mA forward current and we can see that (at 2mA) the forward voltage will be about 2.7V.<\/p>\n<p>We can now use Ohms law (V = I x R, remember?) to calculate a suitable series resistor.<\/p>\n<p><a href=\"http:\/\/stompville.co.uk\/wp-content\/uploads\/2012\/02\/101SV1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-116\" title=\"101SV\" src=\"http:\/\/stompville.co.uk\/wp-content\/uploads\/2012\/02\/101SV1.png\" alt=\"LED Series Resistor Schematic\" width=\"250\" height=\"241\" \/><\/a><\/p>\n<p>The way to think of the calculation is this:<\/p>\n<ul>\n<li>We want 2mA to flow in the circuit<\/li>\n<li>We know that the LED has a forward voltage drop of 2.7V @ 2mA<\/li>\n<li>We know that we are using (say) a 9V battery<\/li>\n<li>We are switching the LED on and off with a switch which has negligible resistance<\/li>\n<\/ul>\n<p>So we can simply say that if there is going to be 2.7V across the LED then there must be 9 &#8211; 2.7 = 6.3V across the series resistor.\u00a0 We know that the current is going to be 2mA so the resistance of our series resistor must be the ratio of the voltage across the resistor to the current flowing through the resistor.<\/p>\n<p>Resistor = Voltage\/Current = 6.3V\/2mA = 6.3\/.002 = 3150 Ohms.\u00a0 The nearest standard resistor value is 3300 Ohms (3.3kOhm) so that&#8217;s what we should use for our starting point.<\/p>\n<p>If it turns out that the LED is too bright then we increase the value of the resistor and if the LED is too dim we reduce the value of the resistor.\u00a0 So you could try a 2.7k Ohm or 2.2k Ohm resistor to make it brighter or a 3.6k Ohm or 4.7k Ohm resistor to make it dimmer.<\/p>\n<p>You may be tempted (and why not) to use a potentiometer (in variable resistance mode) to vary the current through the LED and find the sweet-spot where the brightness is just right.\u00a0 In this case make sure you have a fixed resistor in series with the variable resistor &#8211; otherwise you will at some point turn the variable resistor down to zero and potentially damage the LED.<\/p>\n<p><a href=\"http:\/\/stompville.co.uk\/wp-content\/uploads\/2012\/02\/102SV.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-117\" title=\"102SV\" src=\"http:\/\/stompville.co.uk\/wp-content\/uploads\/2012\/02\/102SV.png\" alt=\"LED Variable Series Resistor Schematic\" width=\"310\" height=\"267\" srcset=\"https:\/\/stompville.co.uk\/wp-content\/uploads\/2012\/02\/102SV.png 310w, https:\/\/stompville.co.uk\/wp-content\/uploads\/2012\/02\/102SV-300x258.png 300w\" sizes=\"(max-width: 310px) 100vw, 310px\" \/><\/a><\/p>\n<p>Going back to our datasheet we can see that the absolute maximum allowable continuous forward current is 30mA and (from the graph) we can see that the forward voltage is 3.3V @ 30mA.\u00a0 Therefore, our series limiting resistor should be 9V-3.3V \/ 30mA = 190 Ohm.\u00a0 So if we put a 220 Ohm resistor (or a 180 Ohm resistor if we&#8217;re feeling brave) in series with a 4.7k or 5k Ohm variable resistor, we can safely vary the current from maximum to off.<\/p>\n<p>If you&#8217;re making battery-powered stomp-boxes you need to consider that 3-5mA or so is the maximum current you want to be pulling continuously from a 9V battery if you want the battery to last &#8211; so arranging for a low LED current of 2mA or so is a good idea. \u00a0 <img loading=\"lazy\" decoding=\"async\" title=\"svfavicon\" src=\"http:\/\/stompville.co.uk\/wp-content\/uploads\/2012\/02\/svfavicon.png\" alt=\"\" width=\"16\" height=\"16\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you&#8217;re mucking about with a stompbox and you want to change the boring old red LED for a shiny new white LED &#8211;\u00a0 but you&#8217;re not sure how to proceed&#8230; Over the last ten years or so, light emitting diodes (LEDs) have generally become much more efficient than they used to be (actually, the\u2026 <span class=\"read-more\"><a href=\"https:\/\/stompville.co.uk\/?p=37\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6],"tags":[],"_links":{"self":[{"href":"https:\/\/stompville.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/37"}],"collection":[{"href":"https:\/\/stompville.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stompville.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stompville.co.uk\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/stompville.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=37"}],"version-history":[{"count":2,"href":"https:\/\/stompville.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":1462,"href":"https:\/\/stompville.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/37\/revisions\/1462"}],"wp:attachment":[{"href":"https:\/\/stompville.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stompville.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stompville.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}