logo elektroda
logo elektroda
X
logo elektroda

System for 1 USD * - TV remote control by piotr_go

piotr_go 10557 68

TL;DR

  • A minimalist LG TV IR remote uses a PFS154 microcontroller and supports power, channel, and volume control.
  • The IR protocol was decoded with a signal analyzer, then the 38 kHz carrier was generated entirely in software.
  • The handset sends a long start bit, 8 data bits plus their inverted copy, then another 8 data bits plus inverted copy, and a short stop bit.
  • Holding a key repeats a slightly different start bit every 100 ms; the design also skips a series resistor because the pin measured 24 mA at 3.3 V.
  • The feature set stays limited because the microcontroller has too few IOs, though the PFS154 can be replaced by a PMS150C after a small program change.
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • #31 20112414
    Mlody_Zdolny
    Level 31  
    spec220 wrote:
    Even if you want to switch on individual branches, you still have to refer to something to maintain the set current. By the way, there are 3 branches, because there are 3 different thresholds for the load capacity of the output itself, while the same current stability in a given threshold is responsible for the source that will prevent the maximum current value from being exceeded for this threshold.

    I don't have to refer to anything - each transistor can act as a current source in a certain operating range.
    It is enough for it to have the appropriate output characteristics.
    Example: BS170
    System for 1 USD * - TV remote control by piotr_go
    At a certain voltage Ugs, the Id current is constant, regardless of whether the diode is on or not.
    The voltage at the gate changes in proportion to Vcc and the current Id changes.
    spec220 wrote:
    I specialize in analog.

    As an analog specialist, you should know this.
  • ADVERTISEMENT
  • #32 20112418
    Anonymous
    Level 1  
  • #33 20112437
    Mlody_Zdolny
    Level 31  
    spec220 wrote:
    Power up the gate and connect different loads with the same voltage. while

    I see that a specialist in the analog of the basic characteristics of a transistor cannot read.
  • #34 20112444
    Anonymous
    Level 1  
  • #35 20112464
    BOOM i ZONK
    Level 22  
    piotr_go wrote:
    I will repeat again. After an hour, the current was the same as at the beginning of the test, not the same for 5V as 3.3V.

    I was suggesting this and I missed it:

    piotr_go wrote:
    And one more test. When powered by 5V, the current on the 40mA pin, with and without LED.
  • ADVERTISEMENT
  • #36 20112489
    piotr_go
    DIY electronics designer
    BOOM i ZONK wrote:
    I was suggesting this and I missed it:

    I don't quite understand where is the contradiction?
  • #37 20112580
    BOOM i ZONK
    Level 22  
    I guess I'm making an idiot of myself: I understand it that stabilization of the current is because; Regardless of whether the current flows through the LED or not (short-circuit), its value is comparable, however, it is different at different VCC voltages. Yes?

    I was reading on my head, not seeing that there is a measurement on the LED and a short circuit.
  • #38 20112605
    piotr_go
    DIY electronics designer
    BOOM i ZONK wrote:
    I understand it like that the stabilization of the current is because; Regardless of whether the current flows through the LED or not (short-circuit), its value is comparable, however, it is different at different VCC voltages. Yes?

    Exactly.
  • #39 20113114
    djfarad02
    Level 19  
    spec220 made a mess in the thread and yet these outputs are ordinary, simple current sources with one field effect transistor. What is the copy here to crush? In short, the current depends on Ugs (that is, on Usas) and on the type of transistor.
  • ADVERTISEMENT
  • #40 20113347
    Mlody_Zdolny
    Level 31  
    spec220 wrote:
    Characteristics where the dependence on the different Robc is not shown.
    Dude, this is pure saturation characteristics of the transistor, not the so-called dynamic.

    A load of crap. You read the current for a given Vgs and a load resistance of zero ohms.
    spec220 wrote:
    I'm finishing

    Good decision, the next time you jump out of something, find out how a transistor works, and in particular what is a transistor saturation state and the basic characteristics of a transistor.
  • #41 20113674
    Anonymous
    Level 1  
  • #42 20114513
    Mlody_Zdolny
    Level 31  
    spec220 wrote:
    anyway, drive the gate of such a transistor with 5V and you will see what happens when the drain is fully shorted

    Which means what?
    As for the system discussed in the topic, I dare to assume that the drain current of the output transistor will have a value of about 23 mA at Ugs equal to 5 V #twenty
  • #43 20114945
    Anonymous
    Level 1  
  • #44 20118898
    PiotrPitucha
    Level 34  
    Hello
    Spec220, there is nothing to fight for.
    First, primo :) when you power the 3.3V or even 5V system, you will not get Ugs 10V, maybe 4.5V in gusts.
    Secondly, take a look at the characteristics of low-power transistors, once I wanted to use BS138 to control displays and I had to throw a series resistor from the display segments, because Rdson for some pieces was several dozen ?.
    Thirdly, simple current sources on Mosfets are made by throwing a resistor into the drain and connecting the gate to ground, but you probably know this from analog circuits (of course, the transistor must conduct at zero voltage on the gate, in amplifiers, for example, BF245 is often used as a source for a differential pair ).
    I don't remember many of the US technologies, but there is usually a problem with obtaining high resistances, in the times when I was learning it, it was common to use sources on Mosfets instead of resistors, which results in a non-linear output characteristic.
    Regards
  • #45 20119260
    Anonymous
    Level 1  
  • #46 20133204
    SylwekK
    Level 32  
    How I like your projectors on strange little procks :) I envy you, because I can only do that at tiny13 :)
  • ADVERTISEMENT
  • #47 20133270
    Anonymous
    Level 1  
  • #48 20133285
    ArturAVS
    Moderator
    spec220 wrote:
    Maybe it's high time to switch to a different programming environment?

    What for? If the current one meets the requirements and is sufficient, what will the change give? Anyway, ATtiny is not the environment, but the uC family.
  • #49 20133427
    Anonymous
    Level 1  
  • #50 20133443
    ArturAVS
    Moderator
    @ spec220 the fact that you use a strictly graphic environment dedicated to a specific group / family of uK does not mean that others too. C + / C ++ allows you to write software independently of the "family" of uK.
  • #51 20133451
    piotr_go
    DIY electronics designer
    ArturAVS wrote:
    What for? If the current one meets the requirements and is sufficient, what will the change give? Anyway, ATtiny is not the environment, but the uC family.

    Availability, price .... progress.
    These new attinas look interesting, but somehow not very popular. I bought a few pcs, made a programmer, but there was no opportunity to use them.
  • #52 20133674
    Anonymous
    Level 1  
  • #53 20134400
    ArturAVS
    Moderator
    spec220 wrote:
    And how does someone, for example, write in Bascom?

    Bascom is an environment closed to uK Atmel.
    spec220 wrote:
    What is the support here in terms of libraries or unusual microcontrollers?

    After all, in each environment you can write your own libraries and definitions of new layouts, most of the libraries available with a given environment are only examples, often they are inefficient and contain errors. Writing your own library is a piece of cake for a good programmer.
    piotr_go wrote:
    Availability, price .... progress.

    And curiosity about the new :D .
  • #54 20134523
    Anonymous
    Level 1  
  • #55 20134531
    ArturAVS
    Moderator
    spec220 wrote:
    A team or a group of programmers often works on serious libraries ...

    Rather not in the amateur sphere.
  • #56 20134534
    Mlody_Zdolny
    Level 31  
    spec220 wrote:
    one line of code may contain from several to several hundred or even thousands of lines of code

    It must be some monstrous macro or an inline function.
    Otherwise, the line of code is the line of code. It may be a function call, but that is done by the compiler and linker.
  • #57 20134615
    Anonymous
    Level 1  
  • #58 20134624
    ArturAVS
    Moderator
    spec220 wrote:
    And tell me if even if someone could make a simple software for such a smartphone, would he write libraries from scratch, e.g. related to the system processor or graphics?

    It depends on the programmer, if he wants to run it easily and quickly use ready-made libraries, and if he wants a proprietary solution, he will create his own. Possibly available libraries would be treated as a model or modified as required.
  • #59 20134643
    piotr_go
    DIY electronics designer
    spec220 wrote:
    And tell me if even if someone could make a simple software for such a smartphone, would he write libraries from scratch, e.g. related to the system processor or graphics?

    I wouldn't even write if I wanted to. The manufacturers do not provide documentation.
    For a change, there is documentation for raspberry pi and there are projects without OS.
  • #60 20134646
    Mlody_Zdolny
    Level 31  
    spec220 wrote:
    you set the developer mode, download the finished ROOT, upload, fire and now. It should be remembered that the phone loses its certification irreversibly and will not make any banking transactions, etc.

    You can do and with root.
📢 Listen (AI):

Topic summary

✨ The discussion revolves around the development of an IR remote control for LG TVs using a microcontroller (PFS154) sourced from Taiwan. The remote can perform basic functions such as power on/off, channel changing, and volume control, although its capabilities are limited due to the microcontroller's I/O constraints. The participants analyze the current limitations of the IR LED, discussing the importance of not exceeding 20 mA to avoid damage. They also explore the microcontroller's programmable I/O current settings and the implications of using different voltage levels. The conversation includes technical details about the signal transmission protocol, current measurements, and the potential for using alternative microcontrollers like PMS150C. Additionally, there are inquiries about sourcing microcontrollers and programming methods for the project.
Generated by the language model.

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]

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?

  1. Build or buy a Padauk ISP programmer (e.g., author’s PIC-based design) [Elektroda, piotr_go, post #20152405]
  2. Convert your HEX to the manufacturer’s .POF format with Padauk’s IDE.
  3. 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.

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]
Generated by the language model.
ADVERTISEMENT