bigtreetech / BIGTREETECH-GTR-V1.0

BIGTREETECH GTR V1.0 motherboard is a high-performance 3D printer main control board with the core controller STM32F407IGT6, which was launched by the 3D printing team of ShenZhen BigTree Technology CO.,LTD ., aiming at solving some problems existing in the motherboard market. The BIGTREETECH GTR V1.0 is the motherboard, and the BIGTREETECH M5 V1.0 is the expansion board.
90 stars 55 forks source link

Fan MOSFET drivers not compatible with Marlin FAST_PWM_FAN #72

Open melslenstra opened 2 years ago

melslenstra commented 2 years ago

I'm posting this here mostly to document my findings and the modifications I applied, but also as a request to BTT to incorporate better fast PWM handling if and when they decide to design a GTR v2.0 board.

When I configure my Marlin firmware with FAST_PWM_FAN enabled to get rid of fan coil whining, my fans become more or less uncontrollable. When I set the fan to 0% it's off, when I set it to 1% it already gets what sounds like full power... This is at the default 31.4kHz PWM frequency. I personally wouldn't want to set the PWM frequency much lower either, because I'm pretty sensitive to high-pitched sounds.

Measuring with an oscilloscope shows that the voltage on the negative pin for the fan (they're switched on the negative side) exhibits a long ramp-up time, causing the fan to see much more "on time" in the PWM cycle than what was set. Checking the gate of the final MOSFET explains why; it's seeing the PWM "on" pulse go up nice and sharply, but then it's left to tail off very slowly back to ground. The voltage stays above the gate threshold voltage for the AO3400 for almost 75% of the cycle time. Sorry for not capturing a scope screenshot, you'll have to believe me.

The schematic of the GTR 1.0 board shows why; for some reason it contains an emitter follower which decouples the STM32F4 PWM pin from the MOSFET gate. This circuit is able to pull UP the gate quite quickly, but when the PWM signal from the uC goes low it's up to the 10k resistor (R90 for FAN0) to pull it down to ground. Considering the MOSFET has significant gate charge, this take almost half of the 31.4kHz cycle...

image

I successfully modified my board to deal with higher PWM frequencies like this by:

  1. Removing Q7, Q10 and Q11
  2. Removing R87, R75, R80
  3. Adding 215 ohm resistors across the base and emitter pads where Q7/10/11 used to be

This directly couples the PWM signal from the uC into the MOSFET gate, with the 215 ohm resistor value chosen to keep the peak gate charge current nice and civilized (a bit over 15mA). Differential measurement across the resistor after modification confirms the current doesn't peak higher than about 16mA in my case.

image

Please excuse the crudity of the model, didn't have time to build it to scale or paint it.

Disclaimer: Modify your board at your own risk, what works for me may not work for you. Don't blame me if you blow up your board.