1

So my goal is to operate my TCL Roku TV with my Raspi.

I'm using these LEDs: AIRSUNNY three Legs 5 pairs Infrared Diode LED IR Emission and Receiver and my setup is pretty much identical to this: Creating A Raspberry Pi Universal Remote With LIRC

If I'm holding the Pi ~3 ft from my TV it works just fine. so obviously my code is ok, my circuit is ok, and I'm sending valid signals (via LIRC, an awesome library BTW). However, if I go off-center or more then say 5 m, I get no results... and due to the layout of my room, it's not practical to keep it dead-center. I'm not on an extreme angle, however. I really need to have it work from about 3-4 meters and 20-30 degrees off-center.

So, a couple questions:

  1. Is this a reasonable application? I know tons of people have build remote controls from Raspis but I've found few details on what kind of range they have achieved.

  2. I'm a software guy, with very little circuitry experience. I'm currently working off the 3.3 V rail. should I change to 5 V? would that make a difference to the output strength?

  3. Same as (2) but regarding resistors. would a different resistor make a big difference?

  4. I thought about it afterwards, there was quite a bit of sunlight coming into the room while i was testing. would that have any impact on the TV's IR sensor?

  5. I'm not sure if I have the real-estate on my breadboard, but if I could hook up more LEDs in parallel, how helpful would that be?

I'm hoping this isn't too many questions; any help/insight would be hugely appreciated.

  • You'd be better off asking on an electronics site. – joan Aug 13 '18 at 17:15
  • Odd... my Roku TV (and my Roku box) use RF instead of IR. Have you checked the specs? – Seamus Aug 13 '18 at 17:57
  • @seamus yeah it's definitely IR, but good looking out! – mike Aug 13 '18 at 17:59
  • OK - just wondered... all of the IR remotes I've handled lately have only 1 or two AA or AAA batteries, which would tend to suggest that 3.3v would be enough "juice". And the IR receivers seem to be quite sensitive - I had an IR-controlled speaker mounted behind my TV, and I was able to reach it with IR after taping a piece of tinfoil on the bottom of the shelf above the TV & speaker. OTOH, P=V**2/R, so 5v is more than twice the power. If 5 V is easy to do, try it; if not, I'd look for something else first. – Seamus Aug 13 '18 at 18:09
  • And don't rule out the LEDs themselves unless you have some way to test them. The Amazon seller you bought from is not what I'd call knowledgeable about electronics! – Seamus Aug 13 '18 at 18:17
2

The electrical setup described in your link is defective by design: it relies on unspecified parameters of the transistor to regulate LED current. As a result, depending on the individual transistor you use, the current through the LED may be either excessive or not sufficient, so the circuit will work well for some people but not for others.

Using 5V line instead of 3.3V will only heat the transistor more. Incidentally, heating the transistor may increase the current trough it and somewhat improve your IR transmitter if the current was insufficient in the first place. But that's not going to solve the core of the problem.

I strongly suggest you use one of the schematics where the current-limiting resistor is in series with the LED (example). That way, the current through the LED is predictable, and the excessive voltage is dissipated by the resistor and not the transistor.

Bear in mind that good IR LEDs are designed for much larger current than visible light LEDs (typically 50-100mA), and that using 5V rail should allow you to put two LEDs in series, wasting less energy as heat in the resistor.

  • thanks dmitry! i realize this is totally a noob question; would you have an actual picture/diagram of the proposed setup on a breadboard? – mike Aug 15 '18 at 0:41
  • 1
    @mike Check out the upper part of this setup for example. I strongly suggest you learn how to read circuit diagrams though. – Dmitry Grigoryev Aug 15 '18 at 8:39
  • Wired it up as shown, but my LED is permanently lit. Does this look like a correct setup? blog.bschwind.com/2016/05/29/… – mike Aug 24 '18 at 14:16
  • 2
    i am marking this as correct, since the setup was indeed defective. however, the linked example did not work. the above link (mine) DID work, and as @Dmitry mentioned, only one resistor was needed. in case the link is broken, I have 5V going to the transistor's left pin, middle pin to capacitor to GPIO out, right pin to long leg of LED. short leg of LED to Ground. Range and angle are much, much better. – mike Aug 27 '18 at 1:02
1

You need to pump out as much power as the emitter can handle.

That means using the 5V line and an appropriate series resistor.

Make sure the transistor you are using can handle that current as well.

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.