loading

During presentations, I avoid being stationary and generally like to walk around in order to increase the interaction between me and the audience. However, I am constantly being faced with the burden of having to go back to the laptop, in order to change a slide or tell a person sitting by the laptop to do that. Not cool!

This problem is usually solved by devices, called remote clickers or wireless presenters, which consist of a handheld controller with buttons that sends signals to a USB dongle plugged in the computer. After looking around to buy one, I could not find any decent option costing less than 10$. So why not make one?

Step 1: Components

In order to build this low cost wireless presenter you will need:

  • An infrared remote control (any common TV control should work)
  • An Arduino Pro Micro or a Leonardo (both based on the ATmega32u4 microcontroller)
  • An infrared receiver (I used the really cheap VS1838B)
  • A perfboard or a breadboard
  • Female pin headers (optional)

An ATmega32u4 based Arduino is crucial for this tutorial, since the said microcontroller can emulate a keyboard or a mouse very easily, through the use of the standard Mouse & Keyboard libraries. We will use it, to make our computer think that we are pressing specific keyboard buttons, therefore controlling the presentation from a distance.

Step 2: Create the Hardware

The circuit is as easy as it can get. You just have to connect the SIGNAL pin to any digital pin on the Arduino, the GND to ground and the VCC to 5V. You can either do this on a breadboard or even on a perfboard, if you like things more stable. I used a perfboard along with some female pin headers, so I will not have to permanently solder the Pro Micro or the IR receiver on the circuit board.

Step 3: Create the Software

  1. Download the Arduino-IRremote library. (download as zip)
  2. Install the library. If you downloaded it as a zip file, locate the downloaded file (Arduino-IRremote-master.zip) and from the Arduino IDE (1.6.1. and above) go to Sketch > Import library > Add library > choose the zip file.
  3. Upload the following sketch which will print in your console window whatever value it receives from the IR control at the press of each button: (original source)
    /*  HX1838 Infrared Remote Control Module and Receiver
      Test Program
      Requires IR Library from https://github.com/shirriff/Arduino-IRremote
    */
    #include <IRremote.h>
    int RECV_PIN = 12;
    IRrecv irrecv(RECV_PIN);
    decode_results results;
    
    void setup()
    {
      Serial.begin(9600);
      irrecv.enableIRIn(); // Start the receiver
    }
    
    void loop()
    {
      if (irrecv.decode(&results))
      {
        Serial.println(results.value);
        irrecv.resume(); // Receive the next value
      }
    }
    
  4. Write down the numbers you get when you press down the buttons on your remote control, which you are interested in using (i.e. navigational arrows, OK, Back).
  5. After you know which values you are getting, from each button press on the remote controller, it is time to tell the Arduino to send the equivalent keyboard button presses to the computer, whenever it receives one of the specified signals. We utilize the default Mouse & Keyboard Arduino libraries to do that.
  6. Adjust the following code and upload it to your Arduino. In the beginning of the file inside the comment, you can see the values I received from my remote controller. Adjust those values to the ones you got during the previous step.
    #include <IRremote.h>
    /*
    left	765534440
    right	858397508
    up	697006884
    down	3536429796
    ok	3842404744
    esc	601410692
    home	373699500
    */
    int RECV_PIN = 12;
    IRrecv irrecv(RECV_PIN);
    decode_results results;
    
    void setup()
    {
      irrecv.enableIRIn(); // Start the receiver
      Keyboard.begin();
    }
    
    void loop()
    {
      if (irrecv.decode(&results))
      {
        switch (results.value) {
          case 765534440:
          Keyboard.press(KEY_LEFT_ARROW);
            break;
          case 858397508:
          Keyboard.press(KEY_RIGHT_ARROW);
            break;
          case 697006884:
          Keyboard.press(KEY_UP_ARROW);
            break;
          case 3536429796:
           Keyboard.press(KEY_DOWN_ARROW);
            break;
          case 3842404744:
           Keyboard.press(KEY_RETURN);
            break;
          case 601410692:
          Keyboard.press(KEY_ESC);
            break;
          case 373699500:
         Keyboard.press(KEY_F5);
          default:
            break;
        }
        delay(70);
        Keyboard.releaseAll(); //release the key, you don't need it continuously pressed
        delay(20);
        irrecv.resume(); // Receive the next value
      }
    }

Step 4: Job Well Done!

That was it! In less than an hour and with a cost around 5$ (if everything is ordered from China) you made a very cool and handy gadget that can make your life easier during presentations and will also most likely attract positive attention on your resourcefulness!

The wireless presenter has been tested to work in Windows 7,8 and Ubuntu 13.10, without the user needing to install any additional drivers manually. It should be plug 'n play in other operating systems too.

This instructable was based on the article I wrote for my blog. Check it out if you want to read more about it! :)

That is extremely cool! You could also use this for a host of other things like a video game controller or controller for a robot. I can't wait to try it on my mac.
<p>Yeap, the &quot;wireless presenter&quot; is just one of the many use cases. I am also using it to control Kodi (XBMC) on my Raspberry Pi. :P</p>
It is done?
<p>Nice! Does it work as expected too? :D</p>
I'm having a bit of a problem here...<br>I'm trying to use an android phone to upload sketch and obtain numbers from my IR controller...<br>I did import the IR Receiver library to arduino IDE (android version) but while compiling the code an error occurs...<br>Would you please help me around?<br>The hardware end up pretty cool by the way ;D<br>
<p>I feel like such an idiot posting this, BUT... could I get clarification on what I'm doing here? Something odd seems to be happening...</p><p>Looking at your photo of the IR emitter, it appears that it has OUT | Ground | VCC - in that order from left to right, looking at it from straight on. I uploaded the sketch (which I adjusted to pin 9, instead of 12- because I'm on a Pro Micro), and then wired everything up to this board: https://images-na.ssl-images-amazon.com/images/I/4...). I hear USB connect to the board, and then about two seconds later, the entire thing turns off. BUMMER.<br><br>So, removing all of that logic, I then tried connecting the center pin to VCC, the one marked with the &quot;-&quot; to Ground, and the one with the &quot;S&quot; to Pin 9. So, I wire the damn thing up like that, and when I press my remote, I get a flashing red light (wich I assume means it's reading it). The problem though is that when I open up Serial Monitor I'm not having any of the values show up. This is super weird, and seems like it should be REALLY easy, but I'm clearly just missing something that happening here. Any thoughts would be GREATLY appreciated.</p>
<p>Your problem seems sort of irrelevant to the specific project indeed. Can you do a sanity check and verify you can receive strings from the Arduino? Are you using the same code as the one posted here?</p>
<p>Thank you for the reply! I certainly appreciate your help with this. <br><br>So, I sort of figured it out for the most part. I ended up following the pin layout from this video: <iframe allowfullscreen="" frameborder="0" height="281" src="//www.youtube.com/embed/iFpAqG90zY0  " width="500"></iframe><br>...which goes NEGATIVE | VCC | SIGNAL. Also, I believe one of the contacts had been damaged on the board I was using, so I switched out the board to a new one, and then I was able to start receiving data through Serial Monitor- which was AWESOME. <br><br>When I pressed my remote, I wasn't getting a consistent HEX value though, but more like a rolling code. You know what I mean? That being the case, I took the value that appeared more frequently than the others, and converted it to its decimal value, and inserted it into your keyboard Sketch. So, it's working, BUT, I do have a question. Do you ever have a problem where the value repeats itself over and over until a new button is pressed? That's what's happening on my end. I will press the button I have programmed to move the keyboard cursor left, let's say, but it just keeps going left and won't stop until I press a different button. Have you had that happen?<br><br>Thanks again!!</p>
<p>Hi, I am glad you got it (kinda) working!</p><p>Regarding the &quot;rolling&quot; values, I don't think I had that problem myself, even though I don't always get a 100% consistent value. However using the &quot;most common one&quot; like you did, works well enough.</p><p>I have not noticed the &quot;drifting&quot; after you stop sending an IR signal. It sounds really strange. This could always be a hardware issue, so try it with a different remote control if possible.</p><p>However, this sounds awfully lot like a code bug. Have you verified that you are actually receiving the same value over and over instead of just forgetting to release the key/mouse after you are done with it? To put it simply, are you using the resume() and the releaseAll() functions in the appropriate section of your code?</p>
<p>Eeesh... So here's what I ended up doing. I added the releaseAll() function like you mentioned, and that fixed the continuously typing issue. After that, I used the first sketch to receive several of the codes each button (since they were constantly changing/rolling), pasted all of those into an Excel doc, grouped the codes together for each (to find patterns), and then assigned those multiple instances to their respective text strings/button commands I wanted. <br><br>I can't recall if I mentioned this, but if I held down any of the buttons, the code would repeat the same value: &quot;4294967295&quot; over and over gain. I ended up just deleting out any instances of it. IDEALLY, I would make it so that if it recognizes that value after a code that it just keeps repeating itself until it's released... but... I'll maybe save that for a future revision. </p><p>It was a decent amount of work (and unfortunately not having the accuracy I was hoping for), though still works &quot;okay&quot; now (maybe 70% of the time).<br><br>If you want to check it out, here's a link to the new code I created: <a href="http://pastebin.com/cRkxWai6" rel="nofollow">http://pastebin.com/cRkxWai6<br><br></a>Thanks!</p>
<p>Well, whatever works... Try also different IR transmitters. Maybe some other are more consistent.</p><p>By the way, you can drastically decrease the lines of your code by doing this: (in this case for the right arrow and similarly for the rest)</p><p>case 16607383:</p><p>case 21871754:</p><p>case 975146095:</p><p>case 2246090081:</p><p>case 2292190138:</p><p>case 2321333080:</p><p>case 2844203703:</p><p>Keyboard.press(KEY_RIGHT_ARROW);</p><p>break;</p><p>Also, I'd also suggest adding some small delays (e.g. 20 ms) between sending the keystroke, releasing it and continuing, so to give the system some &quot;breathing&quot; time. Hopefully the consistency might get improved that way as well.</p>
<p>Thanks buddy! Yeah, it was def getting a little cluttered. That helped a lot! Much appreciated. </p>
<p>I'm glad that I helped! :)</p>
<p>Sorry- don't think that link works, but here is the image to the circuitboard.</p>
<p>cool. It will be even good if remote radio instead of ir.</p>
<p>Cool,i wonder if it's OK to replace the Arduino Micro to say an Arduino Nano.</p>
Unfortunately it is not OK, in the essence that only the ATmega32u4 emulate, out of the box and as easily a keyboard (or a mouse). If you want to use a nano regardless, check https://code.google.com/p/vusb-for-arduino/
<p>Very nice. Thanks for sharing.</p>
<p>Cool!</p>
Very well executed. Good job man!! :)

About This Instructable

11,822views

202favorites

License:

More by Dimitris Platis:A Christmas-tree PCB Ornament My Physical Web Space Marketing with simple IoT devices 
Add instructable to: