{"id":236,"date":"2015-12-03T23:26:23","date_gmt":"2015-12-03T23:26:23","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=236"},"modified":"2019-10-20T18:27:17","modified_gmt":"2019-10-20T18:27:17","slug":"arduino-how-to-build-your-own-universal-ir-remote-control","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=236","title":{"rendered":"ARDUINO how to build your own universal IR remote control"},"content":{"rendered":"<h2><\/h2>\n<h2>Infrared remote controls are every where today, this tutorial will show you how to build your own IR remote control \u00a0using a ARDUINO board and a simple circuit..<\/h2>\n<p>For a video version of this tutorial please watch the VIDEO below.<\/p>\n<p><iframe loading=\"lazy\" title=\"ARDUINO how to build your own universal IR remote control\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/YktBtC3Xci8?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h1><a href=\"https:\/\/www.facebook.com\/zarduino\/\" target=\"_blank\" rel=\"noopener noreferrer\">Check us out on facebook!<\/a><\/h1>\n<h1><strong>The library.<\/strong><\/h1>\n<p>First you will need the ARDUINO IRremote library and that can be downloaded at the following link:\u00a0\u00a0\u00a0<a href=\"https:\/\/github.com\/z3t0\/Arduino-IRremote\/releases\" target=\"_blank\" rel=\"noopener noreferrer\"> IRremote<\/a><\/p>\n<h1><strong>Building the Circuit.<\/strong><\/h1>\n<div id=\"attachment_245\" style=\"width: 720px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/img_5190.jpg\" rel=\"attachment wp-att-245\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-245\" class=\"wp-image-245\" style=\"border: 5px solid #000000;\" title=\"ARDUINO how to build your own universal IR remote control\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/img_5190.jpg?w=300\" alt=\"IMG_5190\" width=\"710\" height=\"703\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/img_5190.jpg 3248w, https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/img_5190-150x150.jpg 150w, https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/img_5190-300x297.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/img_5190-768x761.jpg 768w, https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/img_5190-1024x1015.jpg 1024w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/><\/a><p id=\"caption-attachment-245\" class=\"wp-caption-text\">ARDUINO how to build your own universal IR remote control<\/p><\/div>\n<h2>Parts List:<\/h2>\n<p>affiliate links:<\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=button arduino&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=627afc31e3a399629c886e09d2dab3f5\" target=\"_blank\" rel=\"noopener noreferrer\">Push button switches.<\/a><\/p>\n<p><a href=\"http:\/\/www.dx.com\/p\/12-x-12-x-7mm-tact-switches-20-pcs-394897?Utm_rid=99156049&amp;Utm_source=affiliate\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" style=\"border: 3px solid #000000;\" src=\"http:\/\/img.dxcdn.com\/productimages\/sku_394897_1.jpg\" alt=\"\" width=\"144\" height=\"144\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=ir receiver arduino&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=636d3c31c981d40db5eb39ed07fc8749\" target=\"_blank\" rel=\"noopener noreferrer\">IR receiver.<\/a><\/p>\n<p><a href=\"http:\/\/www.dx.com\/p\/universal-ir-infrared-receiver-module-black-20-pcs-169048?Utm_rid=99156049&amp;Utm_source=affiliate\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" style=\"border: 3px solid #000000;\" src=\"http:\/\/img.dxcdn.com\/productimages\/sku_169048_1_small.jpg\" alt=\"\" width=\"140\" height=\"140\" \/><br \/>\n<\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=ir led&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=d89ec411d684a0cd64794d270832dbe0\" target=\"_blank\" rel=\"noopener noreferrer\">IR LED (transmitter).<\/a><\/p>\n<p><a href=\"http:\/\/www.dx.com\/p\/5mm-ir-led-emitters-20-pack-2399?Utm_rid=99156049&amp;Utm_source=affiliate\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" src=\"http:\/\/img.dxcdn.com\/productimages\/sku_2399_1_small.jpg\" alt=\"\" width=\"140\" height=\"140\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=2n2222&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=974a5e284dc0dccfe182025c436cfc90\" target=\"_blank\" rel=\"noopener noreferrer\">2N2222 or similar transistor.<\/a><\/p>\n<p><a href=\"http:\/\/www.dx.com\/p\/diy-transistor-components-pack-black-18-x-10pcs-362992?Utm_rid=99156049&amp;Utm_source=affiliate\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" style=\"border: 3px solid #000000;\" src=\"http:\/\/img.dxcdn.com\/productimages\/sku_362992_1_small.jpg\" alt=\"\" width=\"140\" height=\"140\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=resistors&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=e7d4f9734c2ad2b0eee21bcc54f0fc83\" target=\"_blank\" rel=\"noopener noreferrer\">Resistors.<\/a><\/p>\n<p><a href=\"http:\/\/www.dx.com\/p\/diy-universal-metal-film-resistors-set-silver-blue-355927?Utm_rid=99156049&amp;Utm_source=affiliate\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" style=\"border: 3px solid #000000;\" src=\"http:\/\/img.dxcdn.com\/productimages\/sku_355927_1_small.jpg\" alt=\"\" width=\"140\" height=\"140\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino board&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=88600d760f8defec9aa1b7bd463f89e0\" target=\"_blank\" rel=\"noopener noreferrer\">ARDUINO board.<\/a><\/p>\n<p><a href=\"http:\/\/www.dx.com\/s\/arduino?Utm_rid=99156049&amp;Utm_source=affiliate\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" style=\"border: 3px solid #000000;\" src=\"http:\/\/img.dxcdn.com\/productimages\/sku_340374_1_small.jpg\" alt=\"\" width=\"140\" height=\"140\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino bread board&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=92a2626e09b896a990f838f2d23b0cd7\" target=\"_blank\" rel=\"noopener noreferrer\">Bread board.<\/a><\/p>\n<p><a href=\"http:\/\/www.dx.com\/s\/breadboard?Utm_rid=99156049&amp;Utm_source=affiliate\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" src=\"http:\/\/img.dxcdn.com\/productimages\/sku_118354_1_small.jpg\" alt=\"\" width=\"140\" height=\"140\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=arduino jumper wires&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=6f7847941dbc143289b867177ebcf66a\">Jumper wires.<\/a><\/p>\n<p><a href=\"http:\/\/www.dx.com\/s\/jumper+wires?category=499&amp;Utm_rid=99156049&amp;Utm_source=affiliate\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft\" style=\"border: 3px solid #000000;\" src=\"http:\/\/img.dxcdn.com\/productimages\/sku_80208_1_small.jpg\" alt=\"\" width=\"140\" height=\"140\" \/><\/a><\/p>\n<p>The picture below shows the simple circuit you will need to build, After you map out your remote the IR receiver can be removed.<\/p>\n<div id=\"attachment_243\" style=\"width: 750px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/ir_schem.jpg\" rel=\"attachment wp-att-243\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-243\" class=\"wp-image-243\" style=\"border: 5px solid #000000;\" title=\"ARDUINO how to build your own universal IR remote control\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/ir_schem.jpg?w=300\" alt=\"ir_schem\" width=\"740\" height=\"385\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/ir_schem.jpg 1545w, https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/ir_schem-300x156.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/ir_schem-1024x531.jpg 1024w\" sizes=\"auto, (max-width: 740px) 100vw, 740px\" \/><\/a><p id=\"caption-attachment-243\" class=\"wp-caption-text\">ARDUINO how to build your own universal IR remote control<\/p><\/div>\n<h1><strong>Mapping your remote.<\/strong><\/h1>\n<h1><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/10\/fjo4w22ieqxtudw_medium.jpg\" rel=\"attachment wp-att-106\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-106\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/10\/fjo4w22ieqxtudw_medium.jpg?w=300\" alt=\"FJO4W22IEQXTUDW_MEDIUM\" width=\"300\" height=\"240\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/10\/fjo4w22ieqxtudw_medium.jpg 620w, https:\/\/thezhut.com\/wp-content\/uploads\/2015\/10\/fjo4w22ieqxtudw_medium-300x240.jpg 300w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/h1>\n<p>Mapping your remote is not hard to do,\u00a0\u00a0 Start by opening the IRrecvDump under examples &#8211; IRremote.\u00a0 Make sure if your not using pin 11 for your\u00a0IR receiver to change it,\u00a0By default it is set to 11.. \u00a0Next\u00a0open your serial monitor,\u00a0Then\u00a0point your remote at the IR receiver and push one of the buttons you want to map&#8230; The results should look like this.<\/p>\n<p>482C10EF<br \/>\nDecoded NEC: 482C10EF (32 bits)<br \/>\nRaw (68): -25784 8850 -4400 550 -500 600 -1600 600 -500 600 -500 600 -1600 600 -500 550 -550 550 -500 600 -500 600 -500 600 -1600 600 -500 550 -1650 600 -1600 600 -500 550 -550 550 -500 600 -500 600 -500 600 -1600 600 -500 550 -550 550 -500 600 -500 600 -1600 600 -1600 600 -1600 600 -500 600 -1600 600 -1600 600 -1600 600 -1600 600<\/p>\n<p>The only two numbers we are going to need are the HEX # and the bit #. In this example the hex number is 482C10EF and the bit number is 32, also right down what kind of remote it is, in this case it is a NEC.\u00a0 After you map all the buttons you are going to use you can move onto the next step.<\/p>\n<h1><strong>The sketch.<\/strong><\/h1>\n<p>Now that you have your remote mapped you can put them into a sketch to control your device.\u00a0 To start with open up the IRsendDemo in the IRremote examples, It will look like the picture below.<\/p>\n<div id=\"attachment_256\" style=\"width: 823px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/irsenddemo-arduino-1-6-5.png\" rel=\"attachment wp-att-256\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-256\" class=\"wp-image-256\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/irsenddemo-arduino-1-6-5.png?w=263\" alt=\"IRsendDemo Arduino 1.6.5\" width=\"813\" height=\"927\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/irsenddemo-arduino-1-6-5.png 500w, https:\/\/thezhut.com\/wp-content\/uploads\/2015\/12\/irsenddemo-arduino-1-6-5-263x300.png 263w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><\/a><p id=\"caption-attachment-256\" class=\"wp-caption-text\">ARDUINO how to build your own universal IR remote control<\/p><\/div>\n<p>The two numbers we want to change is the 0xa90 (the HEX number) and the 12 after that(the bits number), also if your not using a sony delete the for loop and replace the word sony to NEC, RC5 or whatever remote type you are using (irsend.sendNEC(0xHEX, BIT);)<\/p>\n<p>Remember to add the 0x to the beginning of your remotes code to make it a HEX number or it will not work&#8230;<\/p>\n<p>Now if you send a positive number to the ARDUINO over the serial monitor it will send the IR code to your device..<\/p>\n<p>all that is left is to add your buttons into the sketch to finish things off, Ill leave that up to you it is easy and will allow you to configure it the way you want.<\/p>\n<h2><a href=\"https:\/\/zhutarduino.wordpress.com\/arduino-projects\/\" target=\"_blank\" rel=\"noopener noreferrer\">You can check out our other arduino projects here.<\/a><\/h2>\n<h2><a href=\"https:\/\/www.facebook.com\/zarduino\/\" target=\"_blank\" rel=\"noopener noreferrer\">Check us out on Facebook.<\/a><\/h2>\n<h6>ARDUINO how to build your own universal IR remote control<\/h6>\n","protected":false},"excerpt":{"rendered":"<p>Infrared remote controls are every where today, this tutorial will show you how to build your own IR remote control \u00a0using a ARDUINO board and a simple circuit.. For a video version of this tutorial please watch the VIDEO below. &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=236\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":10,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-236","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=236"}],"version-history":[{"count":3,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/236\/revisions"}],"predecessor-version":[{"id":1493,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/236\/revisions\/1493"}],"up":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/10"}],"wp:attachment":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}