Let's Make Robots!

Homemade IR remote

AttachmentSize
tsal5100.pdf111.64 KB
ifrared_receiverZD-1952.pdf156.88 KB
IR_remote_MkII.bas1 KB
PICTOMATIX_MKII_V1.2.BAS1.55 KB

This is a walkthrough on how to make a simple IR controller. It is relatively cheap and easy to make. Programming is simple since the picaxe basic already has commands supporting IR communication.

I found an old PS2 clone controller with those wicked little joysticks in it. I would have loved to use the entire controller for a remote except it has way more buttons than I need or want plus it wasn't really designed to hold batteries as well.

This is what I ended up with after some debautury (desoldering and butchery :)

 As you can see these little beauties have two 10K linear pots (103 is 10K and B means linear) and as a bonus that I wasn't aware of, a button thats activated by pressing down on the stick (far left on the left joystick). I've used a picaxe 14M to keep the cost down but a 18X or 28X1 could also be used. This now gives me 4 analog inputs for the joysticks and 4 buttons for future camera hacking possibilities. Since I'm using 4x AAA NiMh batteries (4.8V) I've done away with a regulator and will disable the brownout detect in the chip (see disablebod command).

I want to have one joystick set up as a normal up/down left/right and the other set up for skid steer which is normally done with 2 seperate up/down controls. This means I'll need to show you a little trick ;)

Instead of the 14M trying to translate the forward/reverse/left/right movement of the joystick into the equivalent of two forward/reverse joysticks I'm going to turn that joystick 45 degrees. Now when you push forward both the X axis and the Y axis move forward together. Pull backwards and they both move backward together. pull to one side and one motor will go forwards while the other goes backwards etc. 




































































This is how it looks so far.


The 15mm nylon spacers I'm using give just enough clearance for the batteries and poke the sticks about the right height above the lid. I can always add a few washers to fine tune the height as it needs to be right otherwise the sticks won't get full movement.

Below is the finished remote.

I've fitted two sockets, one for the program cable and the other is to recharge the batteries from a 6V power supply.

I've used two Vishay TSAL5100 IR LEDs designed specifically for IR remotes. They can handle 200mA and have a narrow viewing angle to improve range. This means that up close you need to be pointing directly at the receiver. I may add some additional LEDs with a wide viewing angle later to help at close range.

The IR receiver is from a local electronics store and has the same frequency as the picaxe version. I've attached datasheets for both the LEDs and the IR receiver.

I've found that due to limitations in the IR protocols the response can be a bit slow. The IR only works indoors as bright sunlight swamps the signal. Guibot is building a similar remote using an Xbee transmitter. I think that is a better way to go as you'll have more range and it can be used outdoors. I suspect it will also have a superior data transfer rate.

Comment viewing options

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

what is the part of the circuit to the far right that has 1 2 and 3

Chris the Carpenter's picture

That is the sync cable for the picaxe chip (the headphone jack).

Chris the Carpenter's picture

Ah! Such an oldie but a goodie. 

Thanks for reposting, Oddbot. I think I got too fancy-schmancy for myself and forgot that you don't need $50 worth of X-bees to talk to a robot. IR signals... 3 bucks worth of parts...  Hmmm.... Yeah, I'm gunna play with IR stuff tonight. I think I might even have to dust off an old 08M for this guy. Back to the basics, yo!

Woo Hoo!

OddBot's picture

I had not intended to bring this to the front page. I just attached the code used because someone asked about it.

The IR is great for indoors if you don't need to transmit tons of data. This was a bit slow transmitting analog signals because of the protocol. If you write your own protocol to eliminate the unused device signature it will be much faster.

Anyway, I'm glad to help any way I can, even if it was an accident :D

GeneralGeek's picture

Turing the joystick 45 degrees was a clever idea... that'll simplify programming quite a bit!

what is the program for this?

OddBot's picture

These programs were written about 3 years ago so I cannot tell you too much about them. I have attached the latest versions in hopes they are the matching transmitter / receiver codes.

The data transmission rate was very low because of the IR protocol being used. If you upgrade to Xbee modules then it would be much better.

The_Black_Cat's picture

Thank you for this tutorial I am maing something similer but with these transmitter and reciever http://www.sparkfun.com/products/8948 and http://www.sparkfun.com/products/8945

echorobotics's picture
flippin' awesome
fritsl's picture

Brilliant, this is a walkthrough that I always wanted to make. People should know how much it helps development to have made a good remote, it will always return to you as a good idea.

On my controller, that was one of the first things I made when I got into robotcs, I use

* An old Joystick (placed on top of the box) - but only one joystick, that then has 2 buttons (fire)

* 2 potmeters

* An LCD-screen

* Easy Radio modules

I write this to inspire anyone consiedering making something like this. To my experience it is a really nice development / debugging tool to have:

2 fire-buttons joystick provides so many posebilities: One can be down, both can be down, one can be pressed but released, left button down while joystick moved to right etc etc.

2 potmeters is very nice, because you can then send any number to your robot, and mix: Left button down; send value of potmeter A. Right potmeter changes value; send new value to robot etc etc.

LCD-screen is extremely nice as well; Turn your potmeter till robot is holding arm right, read on the LCD what the value is, write it into code of the robot etc..

Easy radio modules do not take anything but a single input-port on the robot. Click on, and your robot is remotecontrolled in 2 seconds, no soldering or modifications - and no worries of line-of-sight. IMG_6156.jpgIMG_6154.jpg

Examples:

http://letsmakerobots.com/node/101 (Video made by controlling robot. Click on "fire"; Robot spins 360 and similar tricks)

http://letsmakerobots.com/node/35 (at the end of the video)