Monday, January 9, 2012

Upgraded IR LED Driver Circuit for the Voice-Controlled Arduino Uno TV Remote

I recently wrote about creating a Voice-Controlled TV remote using an Arduino Uno.  One limitation of that design is very short range which is caused by the relatively small current flowing through the LED.  This limits its range to just over a foot.  This can be improved by increasing the current through the IR LED closer toward its rated maximum.  However, the Arduino can only source about 40 mA of current from digital output pins (and has a total microcontroller source limit of 200mA) while the rated maximum of the IR LED I picked up can take about 100 mA.

The general solution is to use an N-type (NPN) BJT transistor as a current amplifier.  This improved the range of the IR transmission to at least across my (small) study.  The circuit diagram is given below:

Schematic of an improved IR LED driver circuit utilizing a NPN transisitor as a switch.

Current flow through the emitter and collector is controlled by the current applied to the base.  This is accomplished by raising Arduino Pin 8 high (= Vcc = 5 [V]).  Resistor R2 limits the current through the LED below the rated maximum.  Resistor R1 is chosen such that the current entering the base (Ib) is related to the current through the LED (Ic) by:

    Ic / Ib < beta

Where beta is the DC current gain (sometimes called hFE).  Usually Ic / Ib is chosen to be less than beta by a factor of 2 to 10.  This ensures the transistor is at saturation when Arduino Pin 8 is set high.

This circuit is limited only by the maximum NPN transistor collector current (see datasheet; 600 mA; which would require Ib to be minimally 12 mA, which is within the ability of the Arduino to source) and the maximum rating of the IR LED (100mA for the LED I bought).

I also used a free circuit simulator from Linear Technology called LTSpice to simulate some circuits to make sure my calculations were correct.  There is a great tutorial with a link to the download page (tutorial link).  Give it a try for your projects!

Standard disclaimers and statements
I am not affiliated Arduino or any of the retailers mentioned above.  I have not accepted compensation in any form from any organization in support of this project.  Use this information at your own risk.  I am not responsible for any adverse effects your use of this information causes.