I’ve been doing some experiments with the IR transmitters and receivers used on the comm board. One outstanding question is what the value of the series resistors (R1 and R2) for the transmitter should be. We want the message passing distance to be fairly short in order to keep the communications mainly between pairs of bots. But the IR power should still be sufficient to give reliable communications. Another question is whether or not the voltage from the batteries we are using will be sufficient for the IR receiver.
I made up the following test setup: For the receiver side, I took one of the IR receivers that we are using on the comma boards and mounted it in a solderless breadboard to make it easy to try resistor values. I also hooked up a variable power supply and used an ATMega328 LillyPad Arduino to drive the IR LED. The LillyPad was the only thing I had handy which would run at 8MHz and low voltage. The power supply was set to 2.75VDC which is pretty much as low as you can go with a 328 running at 8MHz and is around the voltage that the batteries can put out. I used a test program from the IRremote library (http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html) to repeatedly send out 0XD10 which is the Sony code for the ENTER key.
On the receiver side, I used a comm board hooked up to a variable power supply to test how the receiver coped with different voltages. Monty had written a test program for the receiver side which recognizes Sony ENTER and blinks the LEDs in a particular pattern (although the key codes in irrx.h need to all be decremented by one to be correct). With this program it is possible to move the comm board around and watch the LEDs to see where successful IR transmission occurs.
As a baseline test, I put in a 100 ohm resister into the IR transmitter circuit which gives about 20ma drive to the IR LED. Using 5VDC for the receiver, the IR transmission works successfully at quite a long distance (probably across a room).
However, lowering the receiver voltage to 2.85VDC or below results in a failure of the IR receiver to work. It still registers that an IR transmission is occurring but is unable to recognize the code. Since the batteries put out more like 2.72VDC, this is a big problem. After discussing it with Monty, we decided to short out R5, the resistor on the Vcc line into the IR receiver to try to get as much voltage into the receiver as possible. Fortunately, this seems to work and allows the receiver to work down to 2.53VDC. So I then hooked up the battery board to the comm board and (with R5 shorted) the receiver works. The rest of the result below are all done with battery power for the receiver.
I then examined how changing the transmittter series resistor affected the range:
1K ohm 18 inches
4.7K ohm 5 inches
10K ohm 2.5 inches
These distances are for on-axis communications. I’ll do some more experiments to see how the off-axis accuracy breaks down and update the table.