# Power & Performance

All of the irons are [PWM controlled](https://www.digikey.com/en/blog/pulse-width-modulation#) resistive heating elements.
This means that the electronics in the handle can only turn the heating element on and off.
This *means* that the power provided in the tip is 100% controlled by the supply voltage used (higher voltage PSU = higher performance).

Irons at their simplest are just a resistor (Ω) connected to your power source via a switch.

- When the switch is on, the power in the resistor is: $P(watts) = V(volts) \times\ I(current=amps)$
- Current through the resistor is:  $I(amps) = V(volts) ÷ Ω (resistance)$
- Combining these gives some common equations for Power

   $P(watts) = V(volts) * I(amps)$ or $P = V^2 ÷ Ω$

The resistance of the tip is a fixed constant in ohms (Ω):
- 6.2 Ω  Pine64 short tip
- 8.0 Ω  TS100/Pinecil long tip
- 4.5 Ω  TS80(P)

This means the power delivered to the soldering tip is proportional to the voltage squared.
Therefore the Pinecil and TS100 perform poorly when run off 12V power supplies and may issue a `Thermal Runaway` message (weak power supply).



#### Use an [Ohm calculator](https://www.rapidtables.com/calc/electric/power-calculator.html#dc) to quickly derive watts.

| Type       | Volts| / | Tip Ω | = |  Amps | * | Volts | = | Watts |
| :--------: | :--: |:-:| :---: |:-:|:-----:|:-:| :---: |:-:|:-----:|
| USB QC3.0  | 9V   | / | 4.5 Ω | = |  2.0A | * |  9V   | = |  18W  |
| USB-C PD   | 12V  | / | 4.5 Ω | = |  3.0A | * |  12V  | = |  32W  |
| USB-C PD   | 20V  | / | 8.0 Ω | = |  2.5A | * |  20V  | = |  50W  |
| USB-C PD   | 20V  | / | 6.2 Ω | = |  3.2A | * |  20V  | = |  64W  |
| DC Barrel  | 24V  | / | 8.0 Ω | = |  3.0A | * |  24V  | = |  72W  |
| DC Barrel  | 24V  | / | 6.2 Ω | = |  3.8A | * |  24V  | = |  92W  |
| EPR PD3.1  | 28V  | / | 8.0 Ω | = |  3.5A | * |  28V  | = |  98W  |
| EPR PD3.1  | 28V  | / | 6.2 Ω | = |  4.5A | * |  28V  | = |  126W |



## Output Control & Regulation

These soldering irons use a FET to switch the power to the soldering iron tip. This is a P-MOSFET and its controlled via a small transistor circuit, which in turn is controlled via the MCU (i.e., STM32). The MCU controls this PWM output proportional to the output from the PID control loop running in the software.

To measure the tip temperature in the iron, the iron has a small op-amp connected across the terminals at the cold end of the tip. This is setup to measure the voltage across the same terminals that are used to power the tip. In order to read the very small voltage generated by the [thermocouple cold junction](https://ralim.github.io/IronOS/Temperature/), the iron's output must be turned off for a moment.
                                                                                                                                                                                                             
Once the output is turned off (via the FET), the system has a recovery time as the tip capacitance discharges and the op-amp exits saturation. After this delay period, the MCU's ADC (analog-to-digital converter) samples the output of the op-amp 8 times quickly and then sets a flag to turn the PWM output back on.
This enforces a small dead time in the output signal while this occurs, so there is a balance between sampling the temperature often to maintain a stable tip temperature control and sampling less often to increase the maximum power deliverable to the tip ([see Complexity of measurement](https://ralim.github.io/IronOS/Temperature/#complexity-of-measurement)).



## Power sources

Supported by IronOS hardware may use different power sources (chargers/powerbanks/battery packs) with different standards & protocols (QC/PD/etc). For more information collected by the community on that, please, [see the related documentation section](https://ralim.github.io/IronOS/PowerSources/).
