{"id":271,"date":"2013-11-22T17:48:17","date_gmt":"2013-11-22T17:48:17","guid":{"rendered":"http:\/\/www.analysir.com\/blog\/?p=271"},"modified":"2016-02-14T22:15:23","modified_gmt":"2016-02-14T22:15:23","slug":"constant-current-infrared-led-circuit","status":"publish","type":"post","link":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/","title":{"rendered":"Constant current infrared LED emitter circuit"},"content":{"rendered":"<p>Recently, we have been asked several times about driver circuits for IR LEDs, particularly with good range and coverage. Most of us start off driving infrared leds directly from an Arduino or other MCU using a basic resistor in series with the LED connected to a digital output pin of the MCU.<\/p>\n<figure id=\"attachment_280\" aria-describedby=\"caption-attachment-280\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-280    \" alt=\"IRsignaltraceRectifierDiodeIN4148\" src=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148-300x219.jpg\" width=\"300\" height=\"219\" srcset=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148-300x219.jpg 300w, https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148.jpg 640w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-280\" class=\"wp-caption-text\">An oscilloscope snalpshot showing a trace of Ve from the constant current circuit shown below.<\/figcaption><\/figure>\n<p style=\"text-align: left;\"><!--more-->&nbsp;The next step is to progress to a circuit being driven by an NPN transistor, which is more than adequate for &gt;90% of hobbyists. But what if you need that extra bit of range and quality from your Infrared signal?<em><\/em><\/p>\n<p>Here we show a constant current circuit for driving one or two IR LEDS from a circuit supplied with 5V.<\/p>\n<figure id=\"attachment_272\" aria-describedby=\"caption-attachment-272\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IR-LEd-Constant-current-circuit_sch.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-272  \" alt=\"Constant current IR LED circuit\" src=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IR-LEd-Constant-current-circuit_sch-300x278.png\" width=\"300\" height=\"278\" srcset=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IR-LEd-Constant-current-circuit_sch-300x278.png 300w, https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IR-LEd-Constant-current-circuit_sch-1024x951.png 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-272\" class=\"wp-caption-text\">Constant current IR LED circuit<br \/>(Click for larger images)<\/figcaption><\/figure>\n<p>We have presented two almost identical circuits above with the only difference being that the one on the left is driving 2 x IR LEDs and the one on the right is driving just one. It is important to note that because the current is constant [ I(R1) ~= I(R4) ] you get (almost) twice the IR radiance from the circuit on the left for the equivalent amount of power &#8211; nice. Of course you must use a second IR LED. <span style=\"color: #808080;\"><em>Before reading on please see the Caveat at the bottom of this post.<\/em><\/span><\/p>\n<p>So let us try to explain the magic. The key to the constant current through R1\/R4 is to keep the voltage Ve constant. This is achieved with the help of the diode pairs (D1\/D2 or D3\/D4). When a modulated IR signal is applied to the circuit the voltage at Vb is either 0V or the sum of the forward voltage for the diode pair (provided sufficient current is flowing through R3).<\/p>\n<p>So let&#8217;s say the forward voltage of the diode is 0.6V then Vb will be 1.2V. It follows then that once the NPN transistor is activated that Ve will be determined by the formula Ve=Vb-Vbe. So if Vbe is 0.7V then in our ideal case Ve will be 0.5V. In fact it will be oscillating between 0V and 0.5V because of the modulation. Next we look at R1\/R4, which at 2.5ohms means that the current going through the resistor will be 0.5\/2.5 = 0.2A or 200 mA. This is of course at the peak of the square wave and the average current @ 50% duty cycle will be 100mA.<\/p>\n<p>Great that it is so simple in theory, but in an actual circuit you will see some variations with different components, temperature etc. So here are the real world results we obtained this week on a solder-less breadboard:<\/p>\n<ul>\n<li>R1,R4 &#8211; 2.5 ohm (actually 4 x 10 ohms in parallel)<\/li>\n<li>D1-4 &#8211; IN4148 &#8216;fast switching diode&#8217;<\/li>\n<li>IR LED 1-3, we used <a href=\"https:\/\/www.vishay.com\/docs\/81009\/tsal6100.pdf\" target=\"_blank\">TSAL6100 <\/a>from Vishay<\/li>\n<li>R3 3.3 kOhms (actually 3&#215;10 kOhms in parallel)<\/li>\n<li>TR1-2 C33716 NPN transistor<\/li>\n<li>We also used an Arduino to generate a simulated modulated IR signal. This was a simple sketch to toggle the output pin every 13 microseconds to give a modulation frequency of circa 37 kHz. Having a consistent modulated signal of exactly 50% duty cycle made it easier to test and measure with.<\/li>\n<li>We measured Vb to be 1.2V<\/li>\n<li>We measured Ve to be 0.32V <em>(0.311V in the Oscilloscope image at the top of this post)<\/em><\/li>\n<li>Thus the resulting current passing through R4 is 128mA or an average of 64mA.<\/li>\n<li>We also tried with just one IR LED as in the circuit above on the right and found that we got slightly higher current through R1. Ve was 0.34V thus resulting in a current through R1 of 136mA. (This is also the current going through the single IR LED vs the 128mA going through 2 LEDs above)<\/li>\n<\/ul>\n<p>So there it is &#8211; a simple way to implement a constant current circuit for infrared LEDs.<\/p>\n<p>I hear you say, but what if I don&#8217;t have the same components as in your circuit. Don&#8217;t worry &#8211; here are some tips for selecting alternatives:<\/p>\n<ul>\n<li>Diodes &#8211; as long as you get Vb to be around 1.2-1.5V it should be fine.&nbsp; Try to get a diode with a fast switching time for a better quality IR signal. We also tried with IN4001 rectifiers and although they worked the quality of the square wave signal was not as good. The switching time for the IN4148 is 4 nano-seconds which is why it is called a &#8216;fast switching diode&#8217;.<\/li>\n<li>Zener diodes &#8211; You could also use a single zener diode instead of the 2 diodes above. However, make sure you go through the process of checking the voltage achieved at Vb and Ve and size all the resistors accordingly. Also, make sure you are using the zener in the correct orientation (which is opposite) and that the voltage is not too large. (Some zeners are 12V, 30V or more and will not work. I would suggest up to 1.5V, if possible.<\/li>\n<li>R1,R4 &#8211; start off with 10 or 20 ohms and measure the voltage at Ve. This will give you an idea of how your circuit is performing. Remember that if you are measuring with a multi-meter you are measuring the average current, not the peak. Also, if you are using libraries such as <a href=\"http:\/\/www.righto.com\/2009\/08\/multi-protocol-infrared-remote-library.html\" target=\"_blank\">IRremote <\/a>or <a href=\"http:\/\/tech.cyborg5.com\/irlib\/\" target=\"_blank\">IRLib <\/a>the default duty cycle is 33% not 50%. Once you know Ve you can adjust the resistors to match the current you want.<\/li>\n<li>IR LEDs &#8211; Any IR LED with a wavelength of 940nm will do. Remember, to size the resistors R1\/R4 to limit the current flowing to within the specification of whatever LED you choose.<\/li>\n<li>TR1,TR2 &#8211; we just chose one out of the box and it worked so most common NPN&nbsp; transistors should work. But remember to check that it can take the current you are putting through R1,R4.<\/li>\n<li>Power supply &#8211; We ran this off the USB power from the PC with an Arduino also connected. The actual supply voltage was below 5V. To run this circuit on 3.3V you will only get one IR LED working and may have to adjust R3 to get the transistor to activate.<\/li>\n<\/ul>\n<p>The second part of the questions we get are as much to do with coverage within an area as range. Sometimes people want a circuit to point in 4 or more directions to flood the room with IR so that every device receives the signal. There are several devices available commercially targeted at solving this and they are not cheap. One simple solution using the 2 LED circuit above would be to use LEDs with different &#8216;beam&#8217; angles. For example the Vishay LED above has an &#8216;angle of half intensity&#8217; of 10 degrees, thus resulting in 20 degrees of coverage at 50% power or more. The <a href=\"http:\/\/www.vishay.com\/docs\/81010\/tsal6200.pdf\" target=\"_blank\">TSAL6200 <\/a>has an equivalent coverage of 34 degrees and the <a href=\"http:\/\/www.vishay.com\/docs\/81011\/tsal6400.pdf\" target=\"_blank\">TSAL6400 <\/a>has an equivalent coverage of 50 degrees.&nbsp; So combining two of these three LEDs will give a different coverage area for your devices and all for the same power usage as just a single LED.<\/p>\n<p>If you want to study constant current IR LED circuits in more detail, please review the following publication from 1999 (copyright Sharp)<\/p>\n<p style=\"text-align: center;\"><a href=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/Sharp-IR-LED-Circuits.pdf\" target=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/Sharp-IR-LED-Circuits.pdf\">Sharp IR LED Circuits (Size: 361k)<\/a><\/p>\n<p style=\"text-align: left;\">If you have general comments about the circuit, would like to suggest improvements or would like some advice on troubleshooting your own circuit then reply to the <a href=\"https:\/\/www.analysir.com\/joomla\/IRforum\/viewtopic.php?f=6&amp;t=10\" target=\"_blank\">post we have opened in the IRforum<\/a>. Code for the sample sketch used for the circuit above is provided in the IRforum.<\/p>\n<p style=\"text-align: left;\"><a title=\"AnalysIR integrated support for USB IR Toy\" href=\"https:\/\/www.analysir.com\/blog\/2013\/11\/05\/analysir-integrated-support-for-usb-ir-toy\/\"><strong>See also:&nbsp;<\/strong>AnalysIR integrated support for USB IR Toy<\/a><\/p>\n<p><em><span style=\"color: #808080;\">Caveat: Do not use any of the information above in situations where injury or damage to property could occur. Please ensure you have independently verified the correctness of any project you undertake and do not rely on the accuracy of any information provided herein. All of the information above is provided as-is and without warranty or liability of any kind.<\/span><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, we have been asked several times about driver circuits for IR LEDs, particularly with good range and coverage. Most of us start off driving infrared leds directly from an Arduino or other MCU using a basic resistor in series with the LED connected to a digital output pin of the MCU.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[4,285,161,158,160,7,33,163,6,5,164,162,51,159],"class_list":["post-271","post","type-post","status-publish","format-standard","hentry","category-analysir-blog","tag-analysir","tag-arduino","tag-circuit","tag-constant-current","tag-diode","tag-infrared","tag-ir","tag-irforum","tag-irlib","tag-irremote","tag-npn-transistor","tag-schematic","tag-usb-ir-toy","tag-zener"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Constant current infrared LED emitter circuit - AnalysIR Blog<\/title>\n<meta name=\"description\" content=\"Constant current infrared LED emitter circuit using diodes explained with examples\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Constant current infrared LED emitter circuit - AnalysIR Blog\" \/>\n<meta property=\"og:description\" content=\"Constant current infrared LED emitter circuit using diodes explained with examples\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/\" \/>\n<meta property=\"og:site_name\" content=\"AnalysIR Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/chris.analysir\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/chris.analysir\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-22T17:48:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-02-14T22:15:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148-300x219.jpg\" \/>\n<meta name=\"author\" content=\"User Two\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@AnalysIR\" \/>\n<meta name=\"twitter:site\" content=\"@analysir\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"User Two\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/\"},\"author\":{\"name\":\"User Two\",\"@id\":\"https:\/\/www.analysir.com\/blog\/#\/schema\/person\/16a6d94c57d4f2629096ab80a7b36e13\"},\"headline\":\"Constant current infrared LED emitter circuit\",\"datePublished\":\"2013-11-22T17:48:17+00:00\",\"dateModified\":\"2016-02-14T22:15:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/\"},\"wordCount\":1337,\"commentCount\":9,\"publisher\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148-300x219.jpg\",\"keywords\":[\"AnalysIR\",\"Arduino\",\"circuit\",\"constant current\",\"diode\",\"Infrared\",\"IR\",\"IRforum\",\"IRLib\",\"IRremote\",\"NPN transistor\",\"schematic\",\"USB IR Toy\",\"zener\"],\"articleSection\":[\"AnalysIR Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/\",\"url\":\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/\",\"name\":\"Constant current infrared LED emitter circuit - AnalysIR Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148-300x219.jpg\",\"datePublished\":\"2013-11-22T17:48:17+00:00\",\"dateModified\":\"2016-02-14T22:15:23+00:00\",\"description\":\"Constant current infrared LED emitter circuit using diodes explained with examples\",\"breadcrumb\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#primaryimage\",\"url\":\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148.jpg\",\"contentUrl\":\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148.jpg\",\"width\":640,\"height\":468,\"caption\":\"Infrared signal oscilloscope tract\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.analysir.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Constant current infrared LED emitter circuit\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.analysir.com\/blog\/#website\",\"url\":\"https:\/\/www.analysir.com\/blog\/\",\"name\":\"AnalysIR Blog\",\"description\":\"All about infrared remote control, IR decoding and more\",\"publisher\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.analysir.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.analysir.com\/blog\/#organization\",\"name\":\"AnalysIR\",\"url\":\"https:\/\/www.analysir.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.analysir.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2015\/10\/AnalysIR_and_IRToy.png\",\"contentUrl\":\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2015\/10\/AnalysIR_and_IRToy.png\",\"width\":200,\"height\":200,\"caption\":\"AnalysIR\"},\"image\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/chris.analysir\",\"https:\/\/x.com\/analysir\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.analysir.com\/blog\/#\/schema\/person\/16a6d94c57d4f2629096ab80a7b36e13\",\"name\":\"User Two\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/8167f41ca01c8bf0646f87048aaf9e8f90e7d0b65650c0f8eaaf8002b288d6cb?s=96&d=identicon&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8167f41ca01c8bf0646f87048aaf9e8f90e7d0b65650c0f8eaaf8002b288d6cb?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8167f41ca01c8bf0646f87048aaf9e8f90e7d0b65650c0f8eaaf8002b288d6cb?s=96&d=identicon&r=g\",\"caption\":\"User Two\"},\"sameAs\":[\"http:\/\/www.AnalysIR.com\",\"https:\/\/www.facebook.com\/chris.analysir\",\"https:\/\/x.com\/AnalysIR\"],\"url\":\"https:\/\/www.analysir.com\/blog\/author\/analysir\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Constant current infrared LED emitter circuit - AnalysIR Blog","description":"Constant current infrared LED emitter circuit using diodes explained with examples","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/","og_locale":"en_US","og_type":"article","og_title":"Constant current infrared LED emitter circuit - AnalysIR Blog","og_description":"Constant current infrared LED emitter circuit using diodes explained with examples","og_url":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/","og_site_name":"AnalysIR Blog","article_publisher":"https:\/\/www.facebook.com\/chris.analysir","article_author":"https:\/\/www.facebook.com\/chris.analysir","article_published_time":"2013-11-22T17:48:17+00:00","article_modified_time":"2016-02-14T22:15:23+00:00","og_image":[{"url":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148-300x219.jpg","type":"","width":"","height":""}],"author":"User Two","twitter_card":"summary_large_image","twitter_creator":"@AnalysIR","twitter_site":"@analysir","twitter_misc":{"Written by":"User Two","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#article","isPartOf":{"@id":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/"},"author":{"name":"User Two","@id":"https:\/\/www.analysir.com\/blog\/#\/schema\/person\/16a6d94c57d4f2629096ab80a7b36e13"},"headline":"Constant current infrared LED emitter circuit","datePublished":"2013-11-22T17:48:17+00:00","dateModified":"2016-02-14T22:15:23+00:00","mainEntityOfPage":{"@id":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/"},"wordCount":1337,"commentCount":9,"publisher":{"@id":"https:\/\/www.analysir.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#primaryimage"},"thumbnailUrl":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148-300x219.jpg","keywords":["AnalysIR","Arduino","circuit","constant current","diode","Infrared","IR","IRforum","IRLib","IRremote","NPN transistor","schematic","USB IR Toy","zener"],"articleSection":["AnalysIR Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/","url":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/","name":"Constant current infrared LED emitter circuit - AnalysIR Blog","isPartOf":{"@id":"https:\/\/www.analysir.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#primaryimage"},"image":{"@id":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#primaryimage"},"thumbnailUrl":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148-300x219.jpg","datePublished":"2013-11-22T17:48:17+00:00","dateModified":"2016-02-14T22:15:23+00:00","description":"Constant current infrared LED emitter circuit using diodes explained with examples","breadcrumb":{"@id":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#primaryimage","url":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148.jpg","contentUrl":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2013\/11\/IRsignaltraceRectifierDiodeIN4148.jpg","width":640,"height":468,"caption":"Infrared signal oscilloscope tract"},{"@type":"BreadcrumbList","@id":"https:\/\/www.analysir.com\/blog\/2013\/11\/22\/constant-current-infrared-led-circuit\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.analysir.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Constant current infrared LED emitter circuit"}]},{"@type":"WebSite","@id":"https:\/\/www.analysir.com\/blog\/#website","url":"https:\/\/www.analysir.com\/blog\/","name":"AnalysIR Blog","description":"All about infrared remote control, IR decoding and more","publisher":{"@id":"https:\/\/www.analysir.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.analysir.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.analysir.com\/blog\/#organization","name":"AnalysIR","url":"https:\/\/www.analysir.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.analysir.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2015\/10\/AnalysIR_and_IRToy.png","contentUrl":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2015\/10\/AnalysIR_and_IRToy.png","width":200,"height":200,"caption":"AnalysIR"},"image":{"@id":"https:\/\/www.analysir.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/chris.analysir","https:\/\/x.com\/analysir"]},{"@type":"Person","@id":"https:\/\/www.analysir.com\/blog\/#\/schema\/person\/16a6d94c57d4f2629096ab80a7b36e13","name":"User Two","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8167f41ca01c8bf0646f87048aaf9e8f90e7d0b65650c0f8eaaf8002b288d6cb?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8167f41ca01c8bf0646f87048aaf9e8f90e7d0b65650c0f8eaaf8002b288d6cb?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8167f41ca01c8bf0646f87048aaf9e8f90e7d0b65650c0f8eaaf8002b288d6cb?s=96&d=identicon&r=g","caption":"User Two"},"sameAs":["http:\/\/www.AnalysIR.com","https:\/\/www.facebook.com\/chris.analysir","https:\/\/x.com\/AnalysIR"],"url":"https:\/\/www.analysir.com\/blog\/author\/analysir\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p42zhM-4n","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":779,"url":"https:\/\/www.analysir.com\/blog\/2014\/10\/03\/driving-infrared-led-directly-arduino-pin\/","url_meta":{"origin":271,"position":0},"title":"Driving an Infrared Led directly from an Arduino Pin","author":"User Two","date":"October 3, 2014","format":false,"excerpt":"A common question asked on forums is one about - Driving an Infrared Led directly from an Arduino pin.\u00a0 Although the answer may be obvious to anyone with at least a basic knowledge of Ohm's Law, many are confused about how to choose a resistor value for optimum performance. Often,\u2026","rel":"","context":"In &quot;AnalysIR Blog&quot;","block_context":{"text":"AnalysIR Blog","link":"https:\/\/www.analysir.com\/blog\/analysir-blog\/"},"img":{"alt_text":"ATmega328P voltages vs IR LED current","src":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2014\/10\/Atmega328P-CircuitVoltagesvsIRLedCurrent.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2014\/10\/Atmega328P-CircuitVoltagesvsIRLedCurrent.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2014\/10\/Atmega328P-CircuitVoltagesvsIRLedCurrent.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1638,"url":"https:\/\/www.analysir.com\/blog\/2015\/10\/02\/backdoor-upwm-hack-on-photon-for-infrared-signals-using-uart\/","url_meta":{"origin":271,"position":1},"title":"Backdoor uPWM Hack on Photon for Infrared signals using UART","author":"User Two","date":"October 2, 2015","format":false,"excerpt":"Since we received our Photon several months ago it has been difficult to find a working example of Hardware PWM on the Photon. Initially, we ported our softPWM approach to the Photon, which is excellent. However, we figured it must be possible to use at least one of the spare\u2026","rel":"","context":"In &quot;AnalysIR Blog&quot;","block_context":{"text":"AnalysIR Blog","link":"https:\/\/www.analysir.com\/blog\/analysir-blog\/"},"img":{"alt_text":"uPWM Circuit diagram for Photon","src":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2015\/10\/uPWM-Photon-Circuit.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2015\/10\/uPWM-Photon-Circuit.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2015\/10\/uPWM-Photon-Circuit.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2015\/10\/uPWM-Photon-Circuit.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":1682,"url":"https:\/\/www.analysir.com\/blog\/2015\/10\/12\/backdoor-upwm-hack-on-arduino-for-infrared-signals-using-uart\/","url_meta":{"origin":271,"position":2},"title":"Backdoor uPWM Hack on Arduino for Infrared signals using UART","author":"User Two","date":"October 12, 2015","format":false,"excerpt":"In this blog post we follow up on our recent article about generation of infrared PWM from the Photon's UART where we suggested that it may be possible to achieve something similar with the Arduino. In our previous attempt the Arduino was only able to generate PWM at 40 kHz\u2026","rel":"","context":"In &quot;AnalysIR Blog&quot;","block_context":{"text":"AnalysIR Blog","link":"https:\/\/www.analysir.com\/blog\/analysir-blog\/"},"img":{"alt_text":"Arduino uPWM Circuit Diagram","src":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2015\/10\/Arduino-uPWM-Circuit.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2015\/10\/Arduino-uPWM-Circuit.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2015\/10\/Arduino-uPWM-Circuit.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":2560,"url":"https:\/\/www.analysir.com\/blog\/2016\/07\/06\/esp8266-nodemcu-backdoor-upwm-hack-ir-signals-using-uart\/","url_meta":{"origin":271,"position":3},"title":"ESP8266 NodeMCU Backdoor uPWM Hack for IR signals","author":"User Two","date":"July 6, 2016","format":false,"excerpt":"We received our ESP8266 NodeMCU several months ago it has been difficult to find a working example of Hardware PWM to generate crisp Infrared carrier signals. Most posts we have read suggest that there is no PWM readily available on any of the supported platforms. As we have already shown\u2026","rel":"","context":"In &quot;AnalysIR Blog&quot;","block_context":{"text":"AnalysIR Blog","link":"https:\/\/www.analysir.com\/blog\/analysir-blog\/"},"img":{"alt_text":"ESP8266 NodeMCU uPWM NEC IR Signal","src":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2016\/07\/ESP8266-NodeMCU-uPWM-NEC-IR-Signal.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2016\/07\/ESP8266-NodeMCU-uPWM-NEC-IR-Signal.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2016\/07\/ESP8266-NodeMCU-uPWM-NEC-IR-Signal.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2016\/07\/ESP8266-NodeMCU-uPWM-NEC-IR-Signal.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":590,"url":"https:\/\/www.analysir.com\/blog\/2014\/05\/28\/poor-makers-infrared-receiver-2\/","url_meta":{"origin":271,"position":4},"title":"Poor maker&#8217;s Infrared receiver #2","author":"User Two","date":"May 28, 2014","format":false,"excerpt":"Our recent post about the silver bullet IR receiver proved very popular and we promised that we would follow-up with another variant of the poor maker's Infrared receiver. This time we are using an IR Led (emitter), 2 resistors and any standard Arduino. You will also need to download the\u2026","rel":"","context":"In &quot;AnalysIR Blog&quot;","block_context":{"text":"AnalysIR Blog","link":"https:\/\/www.analysir.com\/blog\/analysir-blog\/"},"img":{"alt_text":"Circuit Diagram: Poor maker's IR Receiver","src":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2014\/05\/PoorMansIRreceiver2_cc-300x218.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":455,"url":"https:\/\/www.analysir.com\/blog\/2014\/03\/05\/arduino-10-common-pitfalls-infrared-remote-control\/","url_meta":{"origin":271,"position":5},"title":"Arduino: 10 common pitfalls with Infrared Remote Control","author":"User Two","date":"March 5, 2014","format":false,"excerpt":"Over the last few months we have been regular contributors to the Arduino and other forums, answering questions about Infrared remote control projects. It became apparent that beginners typically trip up on many common 'pitfalls'. So we decided to list off our 'Top 10'. \u00a0 (Note a PDF of this\u2026","rel":"","context":"In &quot;AnalysIR Blog&quot;","block_context":{"text":"AnalysIR Blog","link":"https:\/\/www.analysir.com\/blog\/analysir-blog\/"},"img":{"alt_text":"Arduino: 10 common pitfalls with Infrared Remote Control","src":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2014\/03\/VideoThumbnail-300x168.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/posts\/271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/comments?post=271"}],"version-history":[{"count":10,"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/posts\/271\/revisions"}],"predecessor-version":[{"id":2123,"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/posts\/271\/revisions\/2123"}],"wp:attachment":[{"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/media?parent=271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/categories?post=271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/tags?post=271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}