Let's Make Robots!

As seen in the picture there is an Arduino Uno with a protoshield on top with an IR receiver and IR LED. I undertook this project to learn how we used infra red light to control everyday devices and why it was used so often. I found that the process behind it is actually quite simple and I now have a better understanding of what is happening in the invisible infra red world. The basis of the code was taken from adafruit as this is where I mainly learnt how it all worked. I used their code to read the commands from the remote control when I pressed frequently used buttons and I pasted these into a notepad file. I took adafruits IR sending code and modified in my remote codes but also added serial control so that when cases where received it would execute the IR commands. Using GlovePIE (which has to be one of my favourite programs) I mapped voice commands to letters on the keyboard, GlovePIE would type characters into the serial monitor and send them to the Arduino. The end product, a voice controlled TV remote. This was a really fun and irritating project as I learnt how IR control worked and learnt how many signals remotes send and how they sometimes send the same signal a few times to make sure that it was received. The project cost includes the arduino and IR components. The time to build included my learning how it all works so for someone smarter than me, which is probably everyone, could pick this up much quicker and have the project up and running in a hour tops.


The code I used to read the IR signals was from adafuit: https://github.com/adafruit/Raw-IR-decoder-for-Arduino. This gave the on/off signals and how long each one was for, funny how its like an evolution in morse code.

The code to send the signals is based of that same tutorial. In the tuturial they send one signal used to control a digital slr camera to take photos. I changed this code however and added all my IR decodes using the previous code and added 'case' functions so that when I send the letters through the serial monitor it will execute the signals.

Arduino code: https://www.dropbox.com/sh/g8p55mpnrvw5i1b/oz2TLMjN7P/tv_remote_control.ino

After all this was done and tested to be shown it actually worked I began to work on the GlovePie code.

GlovePIE code: https://www.dropbox.com/s/vtva19ql3pclfp6/tv%20remote.PIE

The Idea is to connect the Arduino to the computer and open up the serial monitor. Open GlovePIE and run the program. Click back on the serial monitor and thats it. GlovePIE will listen for the voice commands, after being told to listen, and then type the letter into the serial monitor and the Arduino will send the IR code. If you had a voice recognition shield or something simlar you could bypass GlovePIE entirely and have a standalone setup. I dont yet have a job so most of the things I make are lots of little things combined to make a big thing because of lack of materials, I also do find it more fun that way. 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chickenparmi's picture

As LMR is experiencing difficulties currently displaying videos here is the video link: http://www.youtube.com/watch?v=NaQ5spfkeJA&feature=plcp

rogue's picture

Nice project, it would be great if you posted the glovePIE and arduino code and some some of the basics of getting it up and running.  I have messed with glovePIE in the past, mainly for mapping a wiimote as a remote control for a computer and it is a cool tool.

chickenparmi's picture

Ok I will get right on that! Yer I love it! On my YouTube channel there is a video of me using it to control my computer, kind of like a cheap and nasty JARVIS or Siri, using keyboard shortcuts and stuff. I will just post the link :) http://www.youtube.com/watch?v=i5S1H1nogpI&feature=plcp

rogue's picture

Thanks, appreciate the code update! I'd like to make something embedded when I get the time.  Perhaps a beaglebone will do the trick.

chickenparmi's picture

If you wanted to make a standalone system an Arduino and this : https://www.sparkfun.com/products/10963 would work quite nicely.

Maxhirez's picture
Does TV dialogue ever trigger the voice commands?
chickenparmi's picture

It could theoritically, but is highly unlikely. The chances of a program saying "TV channel up" are quite slim. GlovePIE also has a confidence integer that you could increase as to avoid accidental acitvations. Lowering the confidence interval just picks up a word or two, increasing the confidence integer makes it listen to the whole sentence and match each word with a adequte volume. Thanks for the question.