0
\$\begingroup\$

I have built a simple prototype for a circuit attached to a Wemos D1MINI for a DIY thermostat application. I've confirmed that it works (I can turn it on and off from my software), when I hold the breadboard (and thus the LED) very close to my a/c (less than 1 m) but any further and it fails to register.

Unfortunately I'm very new to this but will try to describe my situation as best I can.

The IR led being used is this, I have had no luck finding a datasheet https://www.amazon.co.jp/-/en/gp/product/B07W4JP1YR/ref=ppx_od_dt_b_asin_title_s00?ie=UTF8&psc=1.

Could a different wavelength LED result in a significantly different range? Or do I just need to fashion up some kind of reflector box? As is it's extremely sensitive to direction. Is this all a problem with the LEDs I have or is there something else I can improve? The radiation distance was supposed to be 7 m but I'm getting a meter at best. I'm not really sure what I should be considering when selecting an LED for this application

The other components are an S8050 NPN resistor with the base connected(via 10 kohm resistor) to the D1MINI D2 pin and the collector going to the LED (and 220 ohm resistor which I've added back since taking the photo), the DHT11 in the photo is working fine and not really relevant to the question. Everything is powered(temporarily) off a 9 V battery through a HW-131 power supply set to 5 V.

I have also recreated the circuit without the d1mini, just the npn, resistors and led and I'm getting 1.26v and 22mA over the LED, which should be the correct amounts.

lolin sells an IR shield(which I wanted to avoid using due to size) for the d1mini, which includes https://www.onsemi.com/pdf/datasheet/bss138-d.pdf . This advertises itself as minimizing on-state resistance. A comment has mentioned how the large resistor could cause lag. Would it be reasonable that this lag would be made worse by distance, thus something like this could fix it?

By combining several suggestions from comments this now works.

  • The transistor base resistor was reduced to 1Kohm and had a 1K pull-down resistor added to ground.
  • The LED resistor was removed entirely, resulting in a higher voltage passing through. This however isn't damaging since the IR signal is very short and is also pulsed at a 50% load.

I still don't entirely understand why this works but I presume it's a combination of higher voltage-> stronger signal and the pulldown resistor cutting it off faster, is this reasonable? Are there any resources I can review to better understand this?

pardon the mess, I intend to eventually solder everything together

\$\endgroup\$
19
  • 3
    \$\begingroup\$ Why did you buy it if you couldn't find the data sheet. Data sheets for emitter and receiver are required to make any engineering judgement plus schematics of both ends. \$\endgroup\$
    – Andy aka
    Mar 27, 2021 at 13:24
  • 1
    \$\begingroup\$ Have you verified with an ohmmeter that those two resistors are 10k, 220 ohm? I have been fooled more than once with these 1% tolerance resistors which end is which. \$\endgroup\$
    – glen_geek
    Mar 27, 2021 at 13:35
  • 2
    \$\begingroup\$ What device you are controlling with IR? What protocol it uses? What IR carrier frequency you use? Have you tried different carrier frequencies? \$\endgroup\$
    – Justme
    Mar 27, 2021 at 13:36
  • 2
    \$\begingroup\$ Typical IR control works by pulsing the IR LED with some 40 (ish) kHz carrier frequency with a low duty cycle. Because of this pulsing action the LED can be fed much more current. In a typical TV RC, for example, you'll find something like a few ohms to limit LED current. \$\endgroup\$ Mar 27, 2021 at 13:39
  • 2
    \$\begingroup\$ Reflector boxes have been important in my experience, specifically that purchased ones greatly outperformed most of what I cobbled together. It's not easy to reflect something you can't see using random scrap. \$\endgroup\$
    – Abel
    Mar 27, 2021 at 14:05

1 Answer 1

2
\$\begingroup\$

You can try to gradually lower the 220ohm resistor to increase the Led power. Currently it's around 5mA guessing a voltage of 2V,usually leds like this can run at at least 20mA.

If you go too low with the resistor you will kill the Led, but given you don't have a datasheet, it's not a big loss and you can just buy one that you know the characteristics of, eventually of higher power.

If you buy another led of higher power, the 10k resistor will limit your current to about 130mA as the bjt has a gain of 300,you can lower that resistor to 1k if your new led needs more than 130mA.

Yes spectrum is important, you need to make sure the receiver has a good spectral response at your emitter emission peak to have the best sensitivity.

\$\endgroup\$
3
  • \$\begingroup\$ Thank you for the response. I isolated the system to a simple circuit with no d1mini, just the resistors, the transistor and led. The LED was showing 1.26v and 22mA which seems about correct. Could being underpowered result in working but worse range? \$\endgroup\$
    – juhanic
    Mar 27, 2021 at 14:19
  • 1
    \$\begingroup\$ Higher power = higher range but it also depends on the Led emission angle, the spectral match and the sensitivity of the receiver. Check your receiver is not dusty or dirty BTW. Our days you can find IR leds that can literally get amps of current for like 1$, you should try one of these. \$\endgroup\$
    – Damien
    Mar 28, 2021 at 3:26
  • \$\begingroup\$ thanks, I'm going to get a shield and some other higher power led's and just experiment with what works from how far \$\endgroup\$
    – juhanic
    Mar 28, 2021 at 6:27

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.