STM32 PWMing PWM & Injected ADC

In the new release of firmware for the TS100, I have moved the system from using a software-driven bit-bang of the output to hardware-based timers. The issue here is that we cannot just use normal PWM! Why can’t we just use normal PWM? Soldering Iron drive Schematic The above image shows a small extract from the TS100 schematics, with the PWM signal from the STM32. The soldering iron tip is driven by the back to back MOSFETs(Q1A/B). These are P channel MOSFETs, so they are on when the gate is pulled low relative to the battery input. R11 acts as a pullup to ensure the gate is high whenever it is not being actively pulled down via Q2 and R29. When Q2 is turned on it will pull the gate to half of VBatt (R11/R29 form voltage divider). The filter capacitor in parallel to Q2 acts to provide a turn-off delay on the gate so that the gate will stay low for a period of time after Q2 turns off. (Time constant is approximately 1 millisecond). ...

September 21, 2017 · 9 min · Ben V. Brown