Let's Make Robots!

IR Obot: Infrared remote controlled robot

Remote Control robot controlled with InfraRed Remote.
IRobot.zip10.76 KB

*Note: Fritzing Schematic, and Arduino Sketch attached as Zip.*

 This is a 2 motor robot controlled with an Infrared remote control. Arduino needs the IR Library included, you can get it from: http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html

There is no Fritzing part for the Motor Control shield I used, a freeduino that I got from NKC for $12. (http://store.nkcelectronics.com/freeduino-arduino-motor-control-shield-kit.html). The shield lets Arduino control the direction and speed of 2 DC motors with just 4 pins (9,10,12,13)

NKC Motor shield

The whole Robot is built into a nice cardboard box that used to hold stationary. The DC motors run two wheels, there is a castor wheel for balance. The IR sensor is mounted on top of the BOX. The IR Remote is from my ROKU, but any IR Remote control will do. A 6AA Battery pack provides 9v power. Connected to Arduino Vin.

The IR sensor reads the button press from the remote, I have a line in the sketch that prints that to the Serial output so you can watch it on your output. When you put this together, you have to modify the IR codes in the sketch to reflect the codes that you are getting from your own remote. For Example, upload the sketch to the Arduino, have the IR senso hooked up. Open the Serial Monitor, NOW when I press the UP button on my remote, i see that UP sends a HEX number: 57439867 So, you can see in the sketch, I include that in an IF statement: if (results.value == 0x57439867) { //UP forward Inside the IF statement, there are the speed and direction commands to make both motors go Forward. Use the serial monitor to decide what codes are associated with your remote. Then, replace my codes with your codes. You might find that the sensor can wiggle one digit either direction, just add more than one UP command to cover the different codes. 57439867, 57439866, 57439868 all come from the UP arrow and tell the robot to go forward.

Comment viewing options

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

Nice project,like the box idea too. Thanks for sharing with us. I always wondering how to use an IR remote. Did you use 38khz freq?

There is no need to choose the frequency. I am using a standard remote control, whatever freq it works on the IR decode library turns it's signal into a Hex number. 

Nice work. I love the stationary box too. I also have one of those NKC motor shields; they are pretty cool.

NKC was also very cool about answering a few questions I had. They even sent me some female headers for free. Next time, I will put this together with Female stacking headers, so that the shield does not block all the pins, even the ones that it doesn't use. 


I'm glad you had a good experience. But I'm pissed at NKC and will never buy from them again. It took 7 weeks for them to ship my last parts order. I got no communication or explanation of any kind from them as to why things took so long. Neither did I get any kind of expectation of when my order would be shipped if at all. They just sent me 2 smart ass emails asking me to rate my customer service experience. After having waited a few weeks I told them on their survey where to shove their products. Then after I gave up on ever getting my parts, they showed up 7 weeks later.

I like your robot, but had to share my bad experience as I know there are a few different robotics stores on here who do a great job making sure their customers are happy and get their products in a timely manor.