# Power & Performance

All of the irons are PWM controlled 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.

Both 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 `Current (I) times Volts (V)`.
Current through the resistor is `Volts (V) divided by Resistance (R)`.
Combining these two gives the common equation, power is `Volts (V) squared / Resistance (R)`.

The resistance of the tip is fixed, ~7.5 ohms for the TS100/Pinecil and ~4.5 ohms for the TS80(P).

This means that for both irons, the power delivered to the soldering tip is proportional to the voltage used, squared.
This is why the TS100 performs poorly when run off 12V power supplies.

## Output Control & Regulation

Both 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 STM32. The STM32 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, this is setup to measure the voltage across the same terminals that are used the power the tip. In order to be able to read the small voltage generated by the thermocouple junction, the irons output must be turned off.
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 STM32 ADC 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 stable tip temperature control and sampling less often to increase the maximum power deliverable to the tip
