Upgrading an IR remote controlled RGB light to Wifi with an esp8266 - Page 1
Forum section: electronics / beginners

author: Swake
author_rank: Frequent Contributor
timestamp: December 25, 2021, 08:56:11 pm
content: Got a RGBW light orb. It is powered on a single Li-ion 16850 battery without any regulation and has an IR remote control. I want to be able to remote control the orb over Wifi connection. The board in the orb is simple: an IR LED receiver (TSOP1738 like, 3 pins) sends a signal to an unknown 8-pin chip. The chip drives the RGBW LED's over 4 transistors (or FET's).The easiest/cheapest solution I can come up with is to connect an ESP8266 I/O pin to the same input pin on chip as the IR receiver is connected to. The question I have is: can the ESP pin just be added directly or does it need a resistor or something else?Alternatively I could remove the IR receiver from the board and relocate it to an input on the ESP8266. This would require some more code of course.Alternative 2 is to have the ESP8266 control the LEDS directly but then it will looses the existing IR remote capability.ps1: Of course the existing IR signal will have to be recorded somehow so it can be played back from the ESP8266. I'll decode that with a scope. With a little luck someone else already documented it somewhere on the net.ps2: I will upgrade the unregulated Li-ion battery based power supply to something beefier and more stable at the same time.

author: Buriedcode
author_rank: Super Contributor
timestamp: December 26, 2021, 06:14:02 am
content: AFAIR those 3 pin IR recievers, tend to have open collector outputs, but with a weak pull up. So theoretically you could just use a diode, reverse biased (anode to input to 8 pin chip, cathode to ESP8266 IO).A 1k resistor won't hurt and should protect against any mistakes, just to limit current.With a suitable current limiting resistor, it won't matter if the IR reciever has a push-pull output or open collector, if the current is limited to prevent damaging the IO on any of the devices involved, it'll be fine.A couple of caveats:1. Too high a value of resistor might slow down edges, but as most IR signals are pretty low fequency, 1-5k should be fine. Too low value and IO's fighting could allow too much current to flow and you'll start popping IO drivers. 1k min I'd say.2. IR recievers aren't completely "quiet" when they're not recieving signals. Depending on how well filtered its power supply is, they can output glitches regularly, that might interfere with any signal you're injecting into the IO. With that said, unless you're constantly sending IR commands (I'm guessing not as most remote stuff is infrequent short bursts) it shouldn't make a difference at all.3. ESP8266 is a 3.3V device, and you mention that the 8 pin chip + IR reciever both run straight from a single lithium cell (3.1 - 4.2V). When the battery is full, and the chips VCC is 4.2V, the 3.3V from your ESP8266 might not be high enough to read as a '1'. I think it will be fine, but something to be aware of if you get intermittent results.I say, just try it with a simple resistor. If your ESP8266 is outputting the same signal as the IR reciever (you've just cloned the signal/bit stream) and it isn't working, then try a simple bipolar transistor buffer, but honestly, I think t'll be fine as is.

author: Swake
author_rank: Frequent Contributor
timestamp: December 26, 2021, 07:09:07 pm
content: Thanks, my electronics knowledge is running old as I only rarely use it anymore but your remarks woke some remembrance.I'll test with a 5k resistor to start and reduce it gradually if it does not have the expected outcome.The board is running from one Li-ion battery or from an external 4.2V power source labeled "Li-ion battery charger" that is directly in parallel with the battery. I have the impression there is a safety cut-off on the battery when it runs low but have yet to find out at what voltage it cut's of if it does. I'd like to run the board on 3.3V. As you rightly mention it might be 3.3V is not high enough to run satisfactorily, LED brightness might be too low for example. Will have to test that out. Using 3.3V would make the integration easier. As I also want to increase the capacity of the battery by adding more of them, I might as well put several in series and add a 3.3V buck converter.