2
\$\begingroup\$

I have an infrared emitter connected to a Raspberry Pi which allows me to send signals to my air conditioner so that I can turn it on / off / set settings etc.

The problem with my current electric setup (which I found somewhere in the Internet) is that the range of the IR emitter is very limited (<10cm). However, I would like to place the Raspberry Pi incl. IR emitter somewhere further in my room (<5m distance). Currently, I have to mount the Raspberry Pi and IR emitter in such a way that the emitter is very close to the AC IR receiver area.

Does someone know which parts I need to rewire / change so that the range increases?

I’m using the following parts:

  • IR Emitter (e.g. 940nm IR LED 40deg - 40 degree viewing angle. Bright and tuned to 940nm wavelength)
  • Transistor (e.g. PN2222 Transistor - to help drive IR LED)
  • Resistor (10k Ohm resistor - goes between RPI GPIO and the PN2222 transistor)

And here is a link to the repo where I documented the setup and code: https://github.com/SilverJan/rpi-ac-control

enter image description here enter image description here enter image description here

\$\endgroup\$
8
  • 2
    \$\begingroup\$ Replace your IR emitter with a 10-degree half-angle 940mm LED. \$\endgroup\$ – DKNguyen Apr 17 at 5:17
  • \$\begingroup\$ Thanks for the comment @DKNguyen. Do you have a link to an example of such a device? \$\endgroup\$ – SilverJan Apr 17 at 5:25
  • \$\begingroup\$ Product recommendations are off topic here. Just search Digikey or Mouser. \$\endgroup\$ – DKNguyen Apr 17 at 5:27
  • \$\begingroup\$ I can’t find a 940mm but only nm. Is this a typo? By the way, why does the viewing angle make a difference on the range? \$\endgroup\$ – SilverJan Apr 17 at 5:43
  • 1
    \$\begingroup\$ Insensitivity to an emitter could mean aim/lensing, or color (there's some rage of IR emitters and receive-end filters), or could be a modulation frequency mismatch. Consider experimenting on slightly different modulation frequencies. \$\endgroup\$ – Whit3rd Apr 17 at 6:50
4
\$\begingroup\$

That circuit is not very good for driving the LED. In fact it is very likely to damage it and too slow to drive the LED with the required carrier frequency. As anyone can try to copy your design, you should fix the circuit as most likely people don't understand why the circuit works poorly or burns up LEDs.

The poor range can be due to LED being already damaged as it is driven without a current limiting resistor in series. Replace the LED and this time use a resistor in series to prevent damage to the LED.

If that does not help, another issue can be that the transistor might not be able to turn on and off quickly enough at the necessary carrier frequency. The transistor can be extremely slow to turn on and off with only 10k at the base. Also the 10k can be too high a value even at DC to drive the base hard enough to get enough LED current - it is possible that you would get better range without transitor and only the LED with 100 ohms in series. In an actual circuit, you would use smaller base resistor to get fast enough LED drive and then use a series resistor with LED to keep current high but not too high - IR LEDs are typically pulsed at 100mA or so.

Also check that you are using the correct IR carrier frequency for your device. There can be a significant reduction in the range if the carrier frequency is wrong.

\$\endgroup\$
-1
\$\begingroup\$

Increase the led current by paralleling two 2N2222 transistors.

I did it in the past and it worked.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.