Mosfet gate voltage

Ok, I just scanned the thread rather quickly so maybe I'm missing something, but there may be a fundamental problem with how you are trying to measure the gate voltage on the mosfet. The value can only be accurately read with a DMM if the analogWrite(pin, value) command is sending a value of 0 or 255, and the gate voltage will read 0vdc and +5vdc respectively.

At any other PWM value your DMM will not respond to the PWM signal in any meaningful way, the number it displays is pretty meaningless, it's just not designed to read a digital switching signal. A scope is the only way to look at the gate signal while being controlled with a PWM signal.

Lefty