{"id":3038,"date":"2017-01-29T21:27:50","date_gmt":"2017-01-29T21:27:50","guid":{"rendered":"https:\/\/www.analysir.com\/blog\/?p=3038"},"modified":"2017-03-04T20:55:36","modified_gmt":"2017-03-04T20:55:36","slug":"updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals","status":"publish","type":"post","link":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/","title":{"rendered":"Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals"},"content":{"rendered":"<p>In our previous post we showed how to generate stable IR carrier signals using the ESP8266 NodeMCU module. A feature of the original approach was that the output IR signal was inverted and required some additional circuitry to invert it again before transmission. Since the original post we have figured out a method to output a non-inverted or standard IR signal thus removing the need for the additional circuitry. This is achieved by using what turned out to be a very simple setting hidden deep in the ESP8266 UART registers which is covered below. Like all simple solutions it also threw up some other quirks of the ESP8266 NodeMCU, which were eventually overcome with the addition of a simple resistor. The Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals is detailed below &#8211; including updated source firmware, new circuit diagram and explanation of the &#8216;quirk&#8217;. Read on&#8230;.<\/p>\n<figure id=\"attachment_3040\" aria-describedby=\"caption-attachment-3040\" style=\"width: 640px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.analysir.com\/blog\/photo-1a\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3040\" src=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/photo-1a.jpg\" alt=\"Esp8266 NodeMCU and MakeIR SendIR module from AnalysIR\" width=\"640\" height=\"478\" \/><\/a><figcaption id=\"caption-attachment-3040\" class=\"wp-caption-text\">ESP8266 NodeMCU and MakeIR SendIR module from AnalysIR<\/figcaption><\/figure>\n<p><!--more--><\/p>\n<p>In this post we will focus only on the new information that is relevant. To understand the background to the uPWM hack please refer to <strong><a href=\"https:\/\/www.analysir.com\/blog\/tag\/upwm\/\" target=\"_blank\">our previous posts<\/a><\/strong> which go into more detail.\u00a0 Most users can simply upload the provided sketch for testing and thereafter amend it for their own purposes.<\/p>\n<p><em>The SendIR module shown above is now available from our <strong><a href=\"https:\/\/www.analysir.com\/blog\/product\/sendir-advanced-infrared-emitter-module\/\">webshop<\/a><\/strong>.<\/em><\/p>\n<p><strong>The non-inverted Infrared Output<br \/>\n<\/strong>In the original uPWM hack the IR output is inverted because we are using the UART to generate (or hack) the IR carrier PWM signal. In an effort to find a workaround for this we recently began studying the <strong><a href=\"https:\/\/espressif.com\/sites\/default\/files\/...\/esp8266-technical_reference_en.pdf\" target=\"_blank\">Espressif ESP8266 Technical Reference manual <\/a><\/strong>and noticed some entries in the UART registers that seemed to suggest that all UART related pins could be individually set to operate in inverted form. For our needs this meant that we might be able to achieve &#8216;non-inverted&#8217; IR output using our\u00a0 uPWM hack. The next step was to figure out how to achieve our objective in code using the Arduino IDE for ESP8266, which took some time. In the end it was a simple piece of code, as follows:<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n#include &quot;uart_register.h&quot;  \/\/ Place this at the top of the sketch \r\n\r\n#define SET_PERI_REG_MASK(reg, mask) WRITE_PERI_REG((reg), (READ_PERI_REG(reg)|(mask)))\r\nSET_PERI_REG_MASK(UART_CONF0(UART1) , BIT22);\r\n\r\n\/\/\r\n<\/pre>\n<p>This effectively sets bit 22 of the UART_CONF0 register of UART1 (Serial1 in Arduino) which tells the ESP8266 to invert the TX pin for UART1. Users should note that in order to get the best results the <em>initUPWM<\/em>, <em>mark<\/em> &amp; <em>space<\/em> functions should be followed closely &amp; where possible unchanged.<\/p>\n<p><strong>The updated IR Emitter Circuit<\/strong><\/p>\n<figure id=\"attachment_3047\" aria-describedby=\"caption-attachment-3047\" style=\"width: 800px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.analysir.com\/blog\/esp8266_nodemcu_upwm_ir_circuit_3v3\/\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3047\" src=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/ESP8266_NodeMCU_uPWM_IR_CIRCUIT_3V3.jpg\" alt=\"ESP8266 NodeMCU uPWM IR CIRCUIT 3V3\" width=\"800\" height=\"688\" srcset=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/ESP8266_NodeMCU_uPWM_IR_CIRCUIT_3V3.jpg 800w, https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/ESP8266_NodeMCU_uPWM_IR_CIRCUIT_3V3-300x258.jpg 300w, https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/ESP8266_NodeMCU_uPWM_IR_CIRCUIT_3V3-768x660.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><figcaption id=\"caption-attachment-3047\" class=\"wp-caption-text\">ESP8266 NodeMCU uPWM IR CIRCUIT 3V3<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>The uPWM Circuit diagram above for ESP8266 NodeMCU using UART shows the IROUT signal on pin D4 (GPIO2). You will notice that this circuit is much simpler than the previous one. R2 can be any resistor value from 4K7 to 10K or possibly less. Good values for R3 are from 22R to 100R with the smaller values producing more IR. If necessary you could try values lower than 22R, but be careful not to draw too much current from the 3V3 regulator. The value for R1 should be set such that after installation the resistance between D4 and 3V3 is between 3K and 4K. (See the &#8216;Quirk&#8217; note below for more explanation). We suggest using either a <strong><a href=\"https:\/\/www.analysir.com\/blog\/product\/ir-led-emitters-vishay-tsal6100\/\" target=\"_blank\">TSAL6100<\/a><\/strong>, <strong><a href=\"https:\/\/www.analysir.com\/blog\/product\/infrared-led-emitters-tsal6200\/\" target=\"_blank\">TSAL6200 <\/a><\/strong>or TSAL6400 as the IR LED. These Vishay LEDs are quality components. The transistor can be any NPN transistor like the 2N4401or similar.<\/p>\n<p><strong>SendIR<\/strong><\/p>\n<p>In the photo at the top we wired up one of our <strong><a href=\"https:\/\/www.analysir.com\/blog\/product\/sendir-advanced-infrared-emitter-module\/\" target=\"_blank\">SendIR <\/a><\/strong>modules which features dual IR emitters, a constant current IR driver and selectable x1, x2, x3 IR output power (via jumpers). It can also operate via 5V or 3V3 supply. The SendIR module will be added to our <strong><a href=\"https:\/\/www.analysir.com\/blog\/shop\/\" target=\"_blank\">shop <\/a><\/strong>in the near future and in the meantime you can contact us via the <strong><a href=\"https:\/\/www.analysir.com\/blog\/contact\/\" target=\"_blank\">contact <\/a><\/strong>form at the top for instructions on how to purchase. Note that in the photo at the top we connected SendIR to the 5V USB supply instead of the 3V3 supply to ensure we could draw maximum current for the IR emitters and to avail of the extra IR power from the dual IR LEDs.<\/p>\n<p><strong>&#8216;The Quirk&#8217;<br \/>\n<\/strong>The ESP8266 uses a number of pre-defined pins to signal<a href=\"http:\/\/www.instructables.com\/id\/ESP8266-Using-GPIO0-GPIO2-as-inputs\/\" target=\"_blank\"> how the boot up process should operate<\/a>. Unfortunately D4 or GPIO2 is one of those pins and must be kept HIGH during the boot up process. On my system the pull-up resistor on GPIO2 is circa 10K and other modules use 3K. Depending on your particular module and the IR circuit you connect to GPIO2 the default pull-up may not function properly during boot up. If you experience an issue where the device does not boot up or allow firmware flashing after you connect your IR circuit then you need to do the following. Set the value for R1 such that the resistance between 3V3 and GPIO2(when powered off) is between 3K and 4K). On my test systems setting R1 to 5K or 5K8 worked fine. I suspect the more common 4K7 would also work fine. Of course you should only install R1 of you see problems with booting or flashing firmware. In the photo at the top, we have soldered an 0805 SMD resistor directly between D4 and 3V3 header pins for convenience &#8211; just where the white wire is soldered to D4\/GPIO2.<\/p>\n<blockquote><p>Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals<\/p><\/blockquote>\n<p><strong>The updated sketch<br \/>\n<\/strong>You can get a copy of the updated firmware sketch by <strong><a href=\"https:\/\/www.analysir.com\/blog\/sketch_upwm_esp8266_nodemcu_non-inverted-ino\/\" target=\"_blank\">clicking here<\/a><\/strong>. The sketch shows how to send a range of IR signals from NEC to long Air Conditioner signals using both HEX and RAW formats. It sends a signal every 5 seconds and varies the carrier frequency between 30, 33, 36 ,38, 40 and 56 kHz.<\/p>\n<p>If you find an interesting\u00a0 use for this firmware or embed it into a library then do let us know via the <a href=\"https:\/\/www.analysir.com\/blog\/contact\/\" target=\"_blank\">contact form<\/a> linked above or our <a href=\"https:\/\/www.AnalysIR.com\/IRforum\" target=\"_blank\">IRforum<\/a>. Remember to credit AnalysIR as the original author and to include a link back to our website.<\/p>\n<p><strong><a href=\"http:\/\/www.analysir.com\/blog\/get-analysir\/\" target=\"_blank\">Get your own copy of AnalysIR here<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In our previous post we showed how to generate stable IR carrier signals using the ESP8266 NodeMCU module. A feature of the original approach was that the output IR signal was inverted and required some additional circuitry to invert it again before transmission. Since the original post we have figured out a method to output &hellip; <a href=\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals<\/span> <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":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[197,272,334,7,33,171,259,85,335,273,9,356,260,343,39,133,336],"class_list":["post-3038","post","type-post","status-publish","format-standard","hentry","category-analysir-blog","tag-air-conditioner","tag-carrier-frequency","tag-esp8266","tag-infrared","tag-ir","tag-ir-led","tag-makeir","tag-nec","tag-nodemcu","tag-pwm","tag-remote-control","tag-rf","tag-sendir","tag-upwm","tag-vishay","tag-wifi","tag-wireless"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals - AnalysIR Blog<\/title>\n<meta name=\"description\" content=\"Firmware sketch &amp; circuit to Send for IR remote control using Esp8266 NodeMCU WiFi module with our Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals\" \/>\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\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals - AnalysIR Blog\" \/>\n<meta property=\"og:description\" content=\"Firmware sketch &amp; circuit to Send for IR remote control using Esp8266 NodeMCU WiFi module with our Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/\" \/>\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=\"2017-01-29T21:27:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-03-04T20:55:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/photo-1a.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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/\"},\"author\":{\"name\":\"User Two\",\"@id\":\"https:\/\/www.analysir.com\/blog\/#\/schema\/person\/16a6d94c57d4f2629096ab80a7b36e13\"},\"headline\":\"Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals\",\"datePublished\":\"2017-01-29T21:27:50+00:00\",\"dateModified\":\"2017-03-04T20:55:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/\"},\"wordCount\":1053,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/photo-1a.jpg\",\"keywords\":[\"Air Conditioner\",\"Carrier frequency\",\"ESP8266\",\"Infrared\",\"IR\",\"IR LED\",\"MakeIR\",\"NEC\",\"NodeMCU\",\"pwm\",\"Remote control\",\"RF\",\"SendIR\",\"uPWM\",\"Vishay\",\"WiFi\",\"Wireless\"],\"articleSection\":[\"AnalysIR Blog\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/\",\"url\":\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/\",\"name\":\"Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals - AnalysIR Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/photo-1a.jpg\",\"datePublished\":\"2017-01-29T21:27:50+00:00\",\"dateModified\":\"2017-03-04T20:55:36+00:00\",\"description\":\"Firmware sketch & circuit to Send for IR remote control using Esp8266 NodeMCU WiFi module with our Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals\",\"breadcrumb\":{\"@id\":\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#primaryimage\",\"url\":\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/photo-1a-rotated.jpg\",\"contentUrl\":\"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/photo-1a-rotated.jpg\",\"width\":640,\"height\":478,\"caption\":\"Esp8266 NodeMCU and MakeIR SendIR module from AnalysIR\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.analysir.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals\"}]},{\"@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":"Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals - AnalysIR Blog","description":"Firmware sketch & circuit to Send for IR remote control using Esp8266 NodeMCU WiFi module with our Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals","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\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/","og_locale":"en_US","og_type":"article","og_title":"Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals - AnalysIR Blog","og_description":"Firmware sketch & circuit to Send for IR remote control using Esp8266 NodeMCU WiFi module with our Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals","og_url":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/","og_site_name":"AnalysIR Blog","article_publisher":"https:\/\/www.facebook.com\/chris.analysir","article_author":"https:\/\/www.facebook.com\/chris.analysir","article_published_time":"2017-01-29T21:27:50+00:00","article_modified_time":"2017-03-04T20:55:36+00:00","og_image":[{"url":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/photo-1a.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#article","isPartOf":{"@id":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/"},"author":{"name":"User Two","@id":"https:\/\/www.analysir.com\/blog\/#\/schema\/person\/16a6d94c57d4f2629096ab80a7b36e13"},"headline":"Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals","datePublished":"2017-01-29T21:27:50+00:00","dateModified":"2017-03-04T20:55:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/"},"wordCount":1053,"commentCount":0,"publisher":{"@id":"https:\/\/www.analysir.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#primaryimage"},"thumbnailUrl":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/photo-1a.jpg","keywords":["Air Conditioner","Carrier frequency","ESP8266","Infrared","IR","IR LED","MakeIR","NEC","NodeMCU","pwm","Remote control","RF","SendIR","uPWM","Vishay","WiFi","Wireless"],"articleSection":["AnalysIR Blog"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/","url":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/","name":"Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals - AnalysIR Blog","isPartOf":{"@id":"https:\/\/www.analysir.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#primaryimage"},"image":{"@id":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#primaryimage"},"thumbnailUrl":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/photo-1a.jpg","datePublished":"2017-01-29T21:27:50+00:00","dateModified":"2017-03-04T20:55:36+00:00","description":"Firmware sketch & circuit to Send for IR remote control using Esp8266 NodeMCU WiFi module with our Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals","breadcrumb":{"@id":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#primaryimage","url":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/photo-1a-rotated.jpg","contentUrl":"https:\/\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/01\/photo-1a-rotated.jpg","width":640,"height":478,"caption":"Esp8266 NodeMCU and MakeIR SendIR module from AnalysIR"},{"@type":"BreadcrumbList","@id":"https:\/\/www.analysir.com\/blog\/2017\/01\/29\/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.analysir.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Updated ESP8266 NodeMCU Backdoor uPWM Hack for IR signals"}]},{"@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-N0","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":2560,"url":"https:\/\/www.analysir.com\/blog\/2016\/07\/06\/esp8266-nodemcu-backdoor-upwm-hack-ir-signals-using-uart\/","url_meta":{"origin":3038,"position":0},"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":1996,"url":"https:\/\/www.analysir.com\/blog\/2016\/01\/14\/esp8266-nodemcu-infrared-decoding-added-to-analysir\/","url_meta":{"origin":3038,"position":1},"title":"ESP8266 NodeMCU Infrared decoding added to AnalysIR","author":"User Two","date":"January 14, 2016","format":false,"excerpt":"A few months ago a new user to AnalysIR, from Canada, asked us to assist in adding ESP8266 NodeMCU Infrared decoding over WiFi into\u00a0 AnalysIR. We set about making some upgrades to AnalysIR for this and in double quick time he had AnalysIR accepting IR signals from the ESP8266 over\u2026","rel":"","context":"In &quot;AnalysIR Blog&quot;","block_context":{"text":"AnalysIR Blog","link":"https:\/\/www.analysir.com\/blog\/analysir-blog\/"},"img":{"alt_text":"AnalysIR supports ESP82266 NodeMCU","src":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2016\/01\/NodeMCU.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2016\/01\/NodeMCU.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2016\/01\/NodeMCU.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3445,"url":"https:\/\/www.analysir.com\/blog\/2017\/08\/23\/preview-ir-shield-esp8266-trx-high-end-ir-shield\/","url_meta":{"origin":3038,"position":2},"title":"Preview: A.IR Shield ESP8266 TRx, a high-end IR Shield","author":"User Two","date":"August 23, 2017","format":false,"excerpt":"The latest member of our MakeIR series of devices & kits is the A.IR Shield ESP8266 TRx. This shield works out of the box with AnalysIR and is essentially plug & play, with additional custom Firmware options. The shield plugs into a Wemos D1 Mini (ESP8266) with headers or any\u2026","rel":"","context":"In &quot;AnalysIR Blog&quot;","block_context":{"text":"AnalysIR Blog","link":"https:\/\/www.analysir.com\/blog\/analysir-blog\/"},"img":{"alt_text":"A.IR Shield block diagram ESP8266 TRx","src":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/08\/A.IR-block-diagram-ESP8266TRx.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/08\/A.IR-block-diagram-ESP8266TRx.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/08\/A.IR-block-diagram-ESP8266TRx.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":3530,"url":"https:\/\/www.analysir.com\/blog\/2017\/10\/03\/preview-ir-shield-esp8266esp32-tx-high-end-ir-shield\/","url_meta":{"origin":3038,"position":3},"title":"Preview: A.IR Shield ESP8266\/ESP32 Tx, a high-end IR Shield","author":"User Two","date":"October 3, 2017","format":false,"excerpt":"The latest member of our MakeIR series of devices & kits is the A.IR Shield ESP8266\/ESP32 Tx. This shield works out of the box with AnalysIR and is essentially plug & play, with additional custom Firmware options. This shield is a 'sibling' to our related TRx shield, and features IR\u2026","rel":"","context":"In &quot;AnalysIR Blog&quot;","block_context":{"text":"AnalysIR Blog","link":"https:\/\/www.analysir.com\/blog\/analysir-blog\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/10\/A.IR-block-diagram-ESP8266_ESP32Tx.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/10\/A.IR-block-diagram-ESP8266_ESP32Tx.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2017\/10\/A.IR-block-diagram-ESP8266_ESP32Tx.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1964,"url":"https:\/\/www.analysir.com\/blog\/2016\/01\/11\/preview-a-ir-shield-photon-a-high-end-infrared-shield-for-photon-2\/","url_meta":{"origin":3038,"position":4},"title":"Preview: A.IR Shield Photon, a high-end Infrared Shield for AnalysIR","author":"User Two","date":"January 11, 2016","format":false,"excerpt":"The final member of our first MakeIR series of devices & kits is the A.IR Shield Photon. This shield works out of the box with AnalysIR and is essentially plug & play, with additional prototyping options. The shield plugs into a (Particle) Photon with headers or pin-compatible clone. Although designed\u2026","rel":"","context":"In &quot;AnalysIR Blog&quot;","block_context":{"text":"AnalysIR Blog","link":"https:\/\/www.analysir.com\/blog\/analysir-blog\/"},"img":{"alt_text":"A.IR Shield Photon block diagram RevA","src":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2016\/01\/A.IR-Photon-block-diagramRevA.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2016\/01\/A.IR-Photon-block-diagramRevA.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2016\/01\/A.IR-Photon-block-diagramRevA.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":525,"url":"https:\/\/www.analysir.com\/blog\/2014\/03\/27\/infrared-receivers-signal-lag\/","url_meta":{"origin":3038,"position":5},"title":"Infrared Receivers &#8211; signal lag and distortion","author":"User Two","date":"March 27, 2014","format":false,"excerpt":"Many electronics enthusiasts will be familiar with how Infrared receivers demodulate IR signals. In this post we show a visualisation of the time lag and distortion of the signals as they pass through the IR receiver for demodulation and noise filtering.\u00a0 Most DIY projects use the raw timings from 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":"Infrared Signal, Modulated & De-modulated","src":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2014\/03\/IR_Signal_lag-1024x704.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2014\/03\/IR_Signal_lag-1024x704.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.analysir.com\/blog\/wp-content\/uploads\/2014\/03\/IR_Signal_lag-1024x704.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/posts\/3038","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=3038"}],"version-history":[{"count":11,"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/posts\/3038\/revisions"}],"predecessor-version":[{"id":3059,"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/posts\/3038\/revisions\/3059"}],"wp:attachment":[{"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/media?parent=3038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/categories?post=3038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.analysir.com\/blog\/wp-json\/wp\/v2\/tags?post=3038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}