FAQ
TL;DR: DIY LG-compatible IR remote costs under US $1,* drives the LED with 23 mA "without burning out" [Elektroda, piotr_go, post #20111061], and transmits a 38 kHz carrier using 8 data + 8 inverted bits [Elektroda, piotr_go, post #20110601]
Why it matters: One cheap Padauk PFS154 lets makers replace a lost LG remote and explore current-limited GPIO tricks.
Quick Facts
• Carrier frequency: 38 kHz ±1 kHz [Elektroda, piotr_go, post #20110601]
• Measured LED drive: 23 mA at 3.3 V, 40 mA at 5 V [Elektroda, piotr_go, post #20111061]
• Padauk PFS154 price: ≈ US $0.03 in 1 k qty (pre-2020) [Elektroda, piotr_go, post #20110601]
• Total BoM cost (board, MCU, LED, coin cell): < US $1* [Elektroda, Thread Title]
• IO modes: Low, Normal, Pull-up (global setting) [Elektroda, Mlody_Zdolny, post #20111674]
What protocol does the LG TV remote use?
It sends a 38 kHz IR carrier, then a start pulse, 8 data bits and their bitwise inverse, another 8 data bits plus inverse, and a stop pulse. When the key is held, only a modified start pulse repeats every 100 ms [Elektroda, piotr_go, post #20110601]
Which microcontrollers are compatible with the code?
The Padauk PFS154 was used; it can be replaced by the PMS150C after a minor firmware tweak [Elektroda, piotr_go, post #20110601]
How much current can the PFS154 pins source or sink?
Measured short-circuit results: sink up to 55 mA on PA0–PA4 at 5 V; source up to 44 mA on most pins. PA5 is disabled when configured as reset [Elektroda, piotr_go, post #20111061]
Is it safe to drive the IR LED without a resistor?
Tests showed 23 mA through the LED at 3.3 V with no resistor and no MCU damage after one hour. Current changes with VCC, not with LED drop [Elektroda, piotr_go, post #20112388] Edge case: exceeding 5 V supply pushed sink current to 55 mA—possible long-term stress.
Where can I buy Padauk chips cheaply now?
Before shortages they were on LCSC for a few cents; current stock varies, so set restock alerts or check Chinese marketplaces [Elektroda, Sentymentalny, post #20152329]
How do I program a PFS154 or PMS150C?
- Build or buy a Padauk ISP programmer (e.g., author’s PIC-based design) [Elektroda, piotr_go, post #20152405]
- Convert your HEX to the manufacturer’s .POF format with Padauk’s IDE.
- Connect VDD, VSS, PB5/ICSP lines, then flash using the IDE GUI.
Typical flash time: < 5 s.
Is there an Arduino-based programmer?
Yes. Community scripts let an Arduino act as the Padauk programmer—currently the lowest-cost solution for hobbyists [Elektroda, piotr_go, post #20152367]
Can I reuse an AVR or MSP430 instead?
Yes; any MCU that can generate a 38 kHz PWM and toggle data timings works. Example: a forum member runs similar LED code on MSP430 thermometers [Elektroda, NegativeFeedback, post #20110990]
What happens if I short an IO pin to VCC?
The PFS154 survived an hour shorted to +5 V with current limiting to 40 – 55 mA, showing robust protection [Elektroda, piotr_go, post #20111404] Failure may occur if supply exceeds absolute max 6 V (typical) or ambient exceeds 85 °C.
Why does the output current depend on VCC and not load?
The padauk output stage resembles a MOSFET acting as a crude current source; Id ∝ Ugs, so changing VCC shifts current while load voltage drop has little effect within saturation [Elektroda, discussion between Mlody_Zdolny & spec220, #20111970].
How do I capture original remote codes?
Use a logic analyser on the OEM remote’s IR LED. Measure carrier, pulse widths, and data order, then duplicate in firmware [Elektroda, piotr_go, post #20110601]
Can I expand functions beyond power, volume, channel?
Yes, but IO pins limit keys. Add a shift button or move to a larger Padauk (e.g., PFC460 with per-pin current control) [Elektroda, Mlody_Zdolny, post #20111674]
What is the typical range of the DIY remote?
With 23 mA drive and standard 940 nm LED, users report 4–6 m indoors—similar to OEM remotes [Approx., Vishay datasheet].
Edge case: will the LED burn at 5 V?
At 5 V, source mode reached 44 mA. A standard IR LED rated 50 mA continuous survives, but duty-cycle is low; continuous 100 % drive could exceed thermal limits [Elektroda, piotr_go, post #20111061]
Can I add a visible blinking LED for feedback?
Yes; tie a low-current LED to another pin. Set IO to Low mode (~5 mA) to avoid glare [Elektroda, ArturAVS, post #20110955]
Comments
It is a bit unprofessional to load the pin of the microcontroller with a current exceeding 20 mA. I understand that the LED current is limited by the microcontroller gate protection, because the voltage... [Read more]
The Chinese like to connect 7-segment displays without resistors. These microcontrollers have a programmable IO current capacity. IR LEDs consume quite a lot of current> 20 mA If I counted correctly,... [Read more]
But they have very bright displays that even hit the eyes at a few mA. Beautiful tomcat. :D [Read more]
What on the common anode / cathode gives ... I would not connect to AVRk like that. Apparently you can. [Read more]
Well, in fact, such a 'you can because you can', but I have also done such recently, one of the thermometers will flash the temperature with green and red LEDs, and red blinking non-stop when it... [Read more]
Out of curiosity, maybe I will test how much they can withstand a short circuit. I used to tire 3V Chinese ARM above 7V. It didn't die, it just turned off. Until 7 V, he walked normally, he did not... [Read more]
16 mA it would be if some limiting resistor were used in the US. If it is a gate current stabilization, then by subtracting the voltage drop across the LED, there is still more than 2 V of reserve, and... [Read more]
I would not expect a built-in current source from a 3 cent chip. 16mA after taking into account the decrease in the LED, 24 mA without the LED. Although I admit that I did not measure with the LED. I'll... [Read more]
With a higher voltage, the internal value of the reference voltage rev probably also changes. hence a higher but stable value of the gate current for different loads. As long as it is programmable, ie... [Read more]
IO current can be set to normal, low and pull-up. I only measured normal. [Read more]
Which means that whatever you set, its value will always depend on the nap. power supply, not the load, unless there is a voltage drop. the load resistance will be so large that the source will not have... [Read more]
My guess is there must be more than a single transistor shown in the PDF. [Read more]
The transistor shown is a gate / port skeleton only. Probably the PDF contains a simplified / block architecture of the processor itself, so that it is known what it looks like from the perspective of... [Read more]
I tired PA5 set to 0 and shorted to +. After an hour on 3.3V and 5V power supply. The short-circuit current is still as it was. [Read more]
If there was the same mA at a short circuit for 3.3V and for 5V, then you had to configure a stable internal ref source somewhere. either in coffee grounds or in code. I don't know this US, nor have... [Read more]
The PFS154 just has a global setting for all Low / Normal current output pins, something like fuses in the AVR. In PFC460, individual Normal / Strong pins can be individually set in a dedicated IOHD register. ... [Read more]
Same as an hour ago. Nothing has fallen. I will emphasize right away that I do not know the newer AVRs very much. In AVR, is this internal reference used for IO? It eats up a lot of electricity. Some... [Read more]
The value of the output current can be adjusted by software, but to keep a stable parameter, it must have a hardware pattern ... [Read more]
Where do you say that this is a stable parameter? The Iout characteristic as a function of Vcc is almost the resistor characteristic. https://obrazki.elektroda.pl/7444015300_1658490276_thumb.jpg ... [Read more]