Thursday, February 28, 2013

IR Emitter Design

Brian "TagFerret" Farley, the lead designer for Lazer Tag at Shoot The Moon, has shared with us detailed information on a better circuit design for IR emitters. This was originally posted on the Facebook Lazer Tag Modders group page.



From Brian...
This is an example of how to deal with I/O pins that can be in unknown states during or immediately after reset. The two I/O pins should be from the same port. The idea is that one (I/O1) must be HIGH while the other I/O2) is LOW in order to turn on Q2 and generate current through the IRLED. Generally a processor will assert a consistent configuration across ALL pins of an I/O port when it is reset, even if that condition is not clearly documented. This circuit uses that fact to ensure that you don't have an uncontrolled surge of IR current at power-up, which could damage the IRLED and cause problems for the MCU trying to come out of RESET with a heavy load on the power supply.

I/O 1 is an output set to HIGH (1) and I/O 2 is an output set to LOW (0) to generate IR. Normally you would have one or the other be a constant 38 KHz output, and the other would be the data to be modulated onto the 38 KHz carrier.

I/O 1 would be the existing Arduino output, and I/O 2 would be a new output to gate the actual IR generation. You would have it set to HIGH until you were ready to generate IR, bring it LOW while generating IR, and return it HIGH again when done. 

And by using a low-ESR capacitor as C1 (I like this one from Digikey but anything with less than 100 milli-ohms ESR will do fine) lets the capacitor take the brunt of the sudden surge currents from the IR generation. Vdrv should ideally be direct to battery + by the way.

R5 is used to make the emitter stop generating IR quickly -- it is a "snubber" resistor and as far as I know is an original contribution of mine to the world of lazertaggery (at least I've never seen anyone else use it). It just helps to generate a cleaner IR signal that can be more easily received at a greater distance. C1 is used to provide a little instantaneous extra power when the IR current switches on (38,000 times a second when transmitting IR!) so that the electrical noise from this does not propagate all through the circuit via the power supply lines.  
Thanks Brian!

No comments: