Question on brushed DC motor voltage measurement
PWM maintains a constant voltage but varies in pulse width. Narrow pulses average out to less continuous drive current. Wide pulses close to 100% have little OFF time so the motor 'sees' almost continuous current.

Try using a DVM like a Fluke 87-5 series which has filters to accurately measure both PWM and VFD motor controller outputs. An oscilloscope gives the best picture of what is going on but they have a very high cost and you need to do differential measurements to avoid common ground shorts.

This schematic using an AC type opto-coupler can feed an isolated version of your PWM signal to the motor phases to the MPU. Use a timer or clock input to measure pulse width and calculate motor average voltage by using the 50% pulse width as a 50% average voltage marker. Remember that the voltage peaks at the phases will still be 127 volts. Only the width will vary.

From there you can use the MPU to control the motor speed and/or torque and set speed and current limits to protect the controller and the motor.







simulate this circuit &ndash; Schematic created using CircuitLab