{"id":17991,"date":"2016-12-12T10:35:46","date_gmt":"2016-12-12T18:35:46","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=17991"},"modified":"2021-06-11T11:00:26","modified_gmt":"2021-06-11T18:00:26","slug":"using-a-raspberry-pi-as-a-universal-remote","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/using-a-raspberry-pi-as-a-universal-remote\/","title":{"rendered":"Using a Raspberry Pi as a Universal Remote"},"content":{"rendered":"<p>Recently I have been working on a project that\u00a0would allow anyone to turn a Raspberry Pi into a universal remote. To do this I have been using <a href=\"http:\/\/www.lirc.org\">LIRC<\/a> (LINUX Infrared Remote Control), LIRC is a package that allows you to decode and send infra-red signals to many (but not all) commonly used remote controls.\u00a0This project provides a starting point for experimenting with an IR LED and the LIRC package on the <a href=\"https:\/\/digilent.com\/shop\/raspberry-pi-2\/\">Raspberry Pi<\/a> and extending the basic setup with new features and functionality, such as adding an IR receiver to generate\u00a0a LIRC\u00a0remote profile using an existing remote control.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-18013 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/Screen-Shot-2016-12-12-at-10.58.31-AM.png\" alt=\"\" width=\"428\" height=\"277\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/Screen-Shot-2016-12-12-at-10.58.31-AM.png 428w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/Screen-Shot-2016-12-12-at-10.58.31-AM-214x140.png 214w\" sizes=\"auto, (max-width: 428px) 100vw, 428px\" \/><br \/>\nTo build a universal remote with a Raspberry Pi you first need to build a simple circuit (shown below). The circuit consists of an IR receiver which will be used to program the RPI remote using a current remote. You also need an IR LED which will be used to send the infrared\u00a0signals. Below is a list of the materials I used in my circuit.<\/p>\n<ul>\n<li>940nm IR LED 20deg\u00a0&#8211; 20-degree viewing angle. Bright and tuned to 940nm wavelength<\/li>\n<li>38khz IR Receiver\u00a0&#8211; Receives IR signals at remote control frequencies<\/li>\n<li>PN2222 Transistor\u00a0&#8211; Transistor to help drive IR LED<\/li>\n<li>10k Ohm resistor\u00a0&#8211; Resistor that goes between RPI GPIO and the PN2222 transistor<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-19916 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/Screen-Shot-2017-04-11-at-9.20.55-AM-600x431.png\" alt=\"\" width=\"600\" height=\"431\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/Screen-Shot-2017-04-11-at-9.20.55-AM-600x431.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/12\/Screen-Shot-2017-04-11-at-9.20.55-AM.png 752w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>To control a device with an IR receiver, the IR LED transmitter must send a specific signal sequence. The LIRC package, which emulates the infrared signals of many remote controls, is the perfect tool for the job. LIRC is available in the Raspbian software repositories, so installing it on <a href=\"https:\/\/digilent.com\/shop\/raspberry-pi-2\/\">Raspberry Pi<\/a> is very simple.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-18008 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/IMG_8705-549x600.jpg\" alt=\"\" width=\"549\" height=\"600\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Currently, I am working on several\u00a0<a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW<\/a> VI&#8217;s that will act as a graphical interface for LIRC to make it easier to use. The first VI installs LIRC and configures the files which will simplify the process and make it easier for people who are less familiar with Linux. There will also be a VI for adding\/deleting\u00a0remote profiles and another VI for actually using those remotes. When I am finished, I will also create a data dashboard interface which will allow someone to control their <a href=\"https:\/\/digilent.com\/shop\/raspberry-pi-2\/\">Raspberry PI<\/a> remote from a tablet.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-18009 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/25656605754_bc67807bb8_o-600x545.png\" alt=\"\" width=\"600\" height=\"545\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/25656605754_bc67807bb8_o-600x545.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/25656605754_bc67807bb8_o-768x697.png 768w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/25656605754_bc67807bb8_o-800x726.png 800w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/25656605754_bc67807bb8_o.png 1000w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>Thank you for reading my blog post, check out my\u00a0<a href=\"http:\/\/www.instructables.com\/id\/Creating-a-Raspberry-Pi-Universal-Remote-With-LIRC\/\">Instructable<\/a>\u00a0where I give step by step instructions. If you are interested in making project yourself but don&#8217;t have the right supplies, you can purchase the LabVIEW computing kit for the <a href=\"https:\/\/digilent.com\/shop\/raspberry-pi-2\/\">Raspberry Pi 2<\/a>. This kit includes a copy of\u00a0<a href=\"https:\/\/digilent.com\/shop\/labview-home-bundle\/\">LabVIEW 2014 home edition<\/a>\u00a0and everything you will need to run\u00a0<a href=\"https:\/\/www.labviewmakerhub.com\/doku.php?id=learn:tutorials:libraries:linx:3-0:beaglebone-black-setup\">LINX 3.0<\/a>\u00a0and start making projects. Please comment with any questions or comments you may have.<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-17991 jlk' data-task='like' data-post_id='17991' data-nonce='ee750c7abc' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-17991 lc'>+4<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-17991 jlk' data-task='unlike' data-post_id='17991' data-nonce='ee750c7abc' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-17991 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-17991 status align-left'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>Turn your Raspberry Pi into a universal remote with this fun project!<\/p>\n","protected":false},"author":42,"featured_media":18008,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4322,4327,1561],"tags":[],"ppma_author":[4493],"class_list":["post-17991","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-accessories","category-projects","category-applications"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2016\/11\/IMG_8705-e1481569317303.jpg","authors":[{"term_id":4493,"user_id":42,"is_guest":0,"slug":"astanton","display_name":"Austin Stanton","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/056fddaefc60a1f99c226ea5757a8c41?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Stanton","last_name_2":"","first_name":"Austin","first_name_2":"","job_title":"","description":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/17991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=17991"}],"version-history":[{"count":0,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/17991\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/18008"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=17991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=17991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=17991"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=17991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}