How do I deal with acoustic noise from a transformer under PWM load?
The operation of the schematic would be a bit hit and miss if the grounds of the 12V PSU is not connected to the Ov of your PWM source.