{"id":16,"date":"2018-12-05T03:25:42","date_gmt":"2018-12-05T03:25:42","guid":{"rendered":"https:\/\/edwinsmash.com\/?p=16"},"modified":"2018-12-08T21:06:40","modified_gmt":"2018-12-08T21:06:40","slug":"a-primer-on-leds","status":"publish","type":"post","link":"https:\/\/edwinsmash.com\/?p=16","title":{"rendered":"A Primer on LEDs"},"content":{"rendered":"<p>CAVEAT: Electronics and electrical theory are not my strong suit, and this was written for mostly my own benefit, so if I am wrong please let me know.<\/p>\n<p>ALSO: All the information for this post was taken from the Adafruit post here:<\/p>\n<p><a href=\"https:\/\/learn.adafruit.com\/all-about-leds?view=all\">https:\/\/learn.adafruit.com\/all-about-leds?view=all<\/a><\/p>\n<p>If you have the time I recommend you just read that.<\/p>\n<p>LEDs can be powered with a power source, assuming you supply the correct voltage. I have in mind a project that would be run off USB (5V), and most LEDs run off something less than that. So we need to add a resistor to bring the 5V&#8217;s down to something the LED can run without burning out. This requires some light (ha!) math that is better explained in the Adafruit post.<\/p>\n<p>LEDs have a short leg and a long leg. The SHORT one is NEGATIVE (GROUND\/BLACK). The LONG one is POSITIVE (THIS IS THE RED WIRE).<\/p>\n<p>The resistor goes in between the SHORT LEG and GROUND.<\/p>\n<p>Your LED also has something called a FORWARD VOLTAGE, which for mine is listed on the supplied datasheet as &#8220;2.8~3.2V&#8221; so we&#8217;ll call it 3V.<\/p>\n<p>Here is some MATH:<\/p>\n<p style=\"padding-left: 30px;\">SuppliedVoltage = ForwardVoltage + ResistorVoltage<\/p>\n<p>Rewritten as&#8230;<\/p>\n<p style=\"padding-left: 30px;\">ResistorVoltage = SuppliedVoltage &#8211; ForwardVoltage<\/p>\n<p>Therefore&#8230;<\/p>\n<p style=\"padding-left: 30px;\">ResistorVoltage= 5V (supplied via USB) &#8211; 3V<\/p>\n<p>So the &#8220;ResistorVoltage&#8221; is 2V.<\/p>\n<p>Now we use Ohm&#8217;s law:<\/p>\n<p style=\"padding-left: 30px;\">V(volts)=I(amps)*R(ohms)<\/p>\n<p>Whereas&#8230;<\/p>\n<p style=\"padding-left: 30px;\">V is the &#8220;ResistorVoltage&#8221;<\/p>\n<p style=\"padding-left: 30px;\">\u00a0I is the amps used by the LED, which should also be on the supplied datasheet but is probably 20 mA (0.02 amps)<\/p>\n<p style=\"padding-left: 30px;\">R is resistance measured in ohms (&#8220;\u03a9&#8221;), which is what we&#8217;re trying to solve for.<\/p>\n<p>Rewritten, it looks like this:<\/p>\n<p style=\"padding-left: 30px;\">R = V \/ I<\/p>\n<p>Therefore:<\/p>\n<p>R = 2V\/0.02A<\/p>\n<p>So the required resistance is 100 \u03a9. So pop in a 100\u03a9 resistor and you now have an optimal circuit for the LED?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CAVEAT: Electronics and electrical theory are not my strong suit, and this was written for mostly my own benefit, so if I am wrong please let me know. ALSO: All the information for this post was taken from the Adafruit &hellip; <a href=\"https:\/\/edwinsmash.com\/?p=16\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-16","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/edwinsmash.com\/index.php?rest_route=\/wp\/v2\/posts\/16","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/edwinsmash.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/edwinsmash.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/edwinsmash.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/edwinsmash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16"}],"version-history":[{"count":0,"href":"https:\/\/edwinsmash.com\/index.php?rest_route=\/wp\/v2\/posts\/16\/revisions"}],"wp:attachment":[{"href":"https:\/\/edwinsmash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/edwinsmash.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/edwinsmash.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}