Thursday 13 May 2010

Basics Of Infrared Transmitter


38-kHz IR LED Circuit 

Infrared circuit lit up

The first project I posted to Robot Room involved a 
74HC00 NAND infrared oscillator. Nine months have passed and I'd learned a lot.

The power usage of my original NAND oscillator can be reduced without any loss of drive or functionality:




  • Swap in a Toshiba 74HC00A NAND
  • Switch the 10-kilohm pull-up resistor for 100 kilohms
  • Eliminate a whole inverting buffer gate by switching the 2N2222 NPN transistor driver to a 2N2907 PNP transistor driver.

Usage

The oscillator will be used to generate a square wave at a desired frequency. The wave is fed into a transistor that drives an infrared LED on and off very rapidly. Because the emissions are infrared and very fast, neither is visible to the human eye.

Inexpensive infrared receiver chips are available at 36 kHz, 38 kHz, and 40 kHz. The receivers are sensitive to oscillations several kilohertz to either side, although reception distance improves with a better signal to start with.

If used for 
object detection, the signal needs to travel the distance to the object, bounce off the object, and then travel the distance back to the receiver. So, distance becomes a factor.

Because infrared receivers amplify the signal to improve detection, electrical noise generated from the oscillator can leak into the receiver and trigger a false detection. This isn't a problem for VCRs or most consumer devices as they tend to contain either a transmitter (remote control) or a receiver (CD player), but not both.

Therefore, robot transmitter and receiver circuits must be carefully designed and positioned apart to be useful. Robots that chase electrical ghosts, spin in place, or jerk sporadically are initially amusing, but eventually frustrating.

The lower the power of the circuit, the more likely it will be lower in noise. Also, liberal use of decoupling capacitors and metal shielding helps a lot. Greater distance between the circuits makes an enormous difference.
The Popular 555

The 555 IC is an extremely popular timer. The low-power CMOS versions (TLC555, LMC555, and ICM7555) use less power than the older (555, NE555, LM555) versions and don't require a capacitor on the control pin. Although pin and functionally compatible, the component values differ between the low-power CMOS and older versions.

Just for fun, I tested three different manufacturers' CMOS 555 timers. Below are the results at 38 kHz and the prices I paid.


National Semiconductor LMC555National Semi
LMC555
Texas Instruments TLC555Texas Instruments
TLC555
Maxim ICM7555Maxim
ICM7555
Oscillator current when enabled0.651 milliamps0.655 milliamps0.564 milliamps
Oscillator current when disabled0.166 milliamps0.142 milliamps0.078 milliamps
IC Price
(quantity one)
$0.70$0.78$2.49
($1.88 from Maxim)

Notice the current usage of for each of these chips is less than one milliamp!
Infrared Emitter 555 Schematic

A portion of the configuration presented here is similar to an example in the Maxim ICM7555 datasheet. In this circuit, the 555 is used in astable multivibrator mode.
Schematic of 36 kHz to 40 kHz oscillator and infrared emitter

For maximum effect, over 60 milliamps pulses through the infrared LED. Adjust R3 as appropriate for your use and LED specifications.





When calculating current through the resistor, don't forget to first subtract the voltage drop across the LED and transistor. Let's say the LED uses 1.8 V (1.6 V to 2.2 V wouldn't be unheard of). Let's say the collector-emitter drop of the transistor uses 0.2 V.

5 V (total) - 1.8 V (LED) - 0.2 V (transistor) = 3 V remaining to drop across the resistor.

3 V / 47 ohms is about 64 mA. Because there's only one path, the current going through the resistor must be the same as what's going through the LED.

Now for the other trick: the word "pulses". The LED is only on half the time because it is blinking. If you use an ohmmeter, the average current is 32 mA (half).

Aside: The LED heats up faster than it cools off. As such, it's not possible to drive 100 mA through a 50 mA LED even though the average current is half. Depending on ambient temperatures, it's usually safe to drive only 125% or 133% of rated maximum at 50% duty. With smaller duty cycles and frequent pauses, it's possible to drive a lot more current in very short bursts.


From: Peter
Sent: Sunday, June 03, 2001 11:01 AM
Subject: 38-kHz IR Advice

Hi ,

I am a real beginner at electronics, but I built your 555-based IR emitter. It only has a range of about 30 cm. I would like to boost that to about 10 m. I can get this range using normal household remotes. Do you have any suggestions for increasing the range I can get?

FYI: I am trying to build a Go-Kart timer, and wish to build an IR emitter that can be used to automatically trigger a timer when it is passed.

Thanks for your site and time.

Cheers
Peter
 replies:

Hi Peter,

Good question.

I assume you're using a decent IR detector module. For example, the Panasonic 38-kHz IC Photodetector (PNA4602M or PNA4612MOOYB available from DigiKey). The 4612 has a greater range than the 4602, but is usually not appropriate for robots that also emit 38-kHz IR. The emissions generate electrical noise that causes false detections. However, because your emitter and detector circuits are not connected, the 4612 would be a superior solution for you.

Don't forget to attach a 0.1 µF capacitor directly across the power leads on the detector module. This dramatically reduces false signals.

As for the emitter portion:




  1. Obtain the datasheet for the infrared LED you're using. Look for the angle of emission. Common IR LEDs range from 6 to 120 degrees. For remote controls, the angle is usually between 15 and 25 degrees. For an interrupter beam, you want the smallest angle you can get.
  2. Consider using several IR LEDs bunched together. This will improve range. In the 555 circuit, if you drop the R3 resistor value down, you can get a second IR LED in series for free (same current flowing through a pair of LEDs).
  3. Use lenses to focus the beam. This is how detection systems on garage door obstacle detectors achieve such range. This may not be acceptable for your application, because the detector isn't in a fixed position.
  4. Use a laser pointer to line up the emitter and detector. Even a slight deviation can sap range. Or, instead of a laser pointer, put a light or buzzer on the detector and adjust the emitter until you receive the maximum detection. For your use, you may want to use a collecting lens on the detector only.
  5. Believe it or not, about half an amp (500 mA) pours through the infrared diode of an ordinary remote control! The trick is that the diode is on for 0.000025 seconds or less, with rests of at least that long, spelling out 13 bits before resting for 25 milliseconds or more. So, the LED has plenty of time to cool between bursts.

    If you decide to push more current through your IR LEDs, remember that the resistor (R4) on the base of the transistor needs to be lowered so that the transistor can supply more current. You'll then need to re-tune the variable resistor (R2).
Hope this helps


Even if you could find a 18796.9 ohm resistor, it turns out the capacitance and resistance of the wiring and the wide tolerance (even at 1%) of the parts means a variable resistor (potentiometer) is a must! Also, the current being used to drive the transistor (Q1) alters the timing a bit.

Using a 1-nF (C1) [1 nF is same as 0.001 µF] capacitor and a 15-kilohm fixed resistor (R1) plus a 5-kilohm potentiometer (R2) does the trick. Not only does the potentiometer allow for hand tuning, but also the frequency can be varied from about 32 kHz up to about 42 kHz. The margin means the desired values of 36 kHz to 40 kHz should be attainable even with variations in parts and wiring.


38-kHz infrared emitter on solderless breadboard

Theoretical frequency can be calculated by:
f=1/(1.4 RC)

where f is frequency in kilohertz, R is resistance in kilohms, and C is capacitance in microfarads.

38 kilohertz = 
1/(1.4 * 18.7969 kilohms * 0.001 microfarads)Solderless Breadboard

There's a slight change from the official schematic presented above. On the breadboard, the timing capacitor (C1) is connected to +5 V rather than ground. Testing indicates the same frequency, voltage range, and power consumption regardless. Still, you should use a connection to GND.

Multiturn potentiometer vs. single turn

On the left is a multiturn potentiometer. The small brass-colored screw rotates many times to perform the same adjustment as the white single-turn dial on the right. The multiturn allows for more precise adjustments and is less prone to shift out of position. Even if it does shift, less change results because it needs to take multiple turns around.

Multiturn potentiometers are more expensive, but worth it for timing circuits.