Simple, Easy and Cheap Wireless Presenter
by Dimitris Platis in Circuits > Remote Control
20292 Views, 206 Favorites, 0 Comments
Simple, Easy and Cheap Wireless Presenter
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?
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.
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.
Create the Software
- Download the Arduino-IRremote library. (download as zip)
- 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.
- 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 } }
- 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).
- 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.
- 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 } }
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! :)