I have built the following circuit from trial and error:
The circuit is to change the 5V PWM signal from an Arduino digital pin to a 0-10V circuit to control industrial equipment. In this case a CNC spindle controller.
I tried using an op amp to boost the PWM signal then smooth it with a filter capacitor but wasn't successful. I threw this together with a pc fan as test load and it seemed to work well. I didn't want to keep the test fan so I switched to a 75ohm 25W resistor I had on hand. It seems to work really well, I just take the voltage across the resistor and send it to the motor controller 10V input.
I get to maximum voltage across the resistor at a PWM setting of only 80 of 255. Above 80 there is no change to the voltage output. How can I get the full range from this circuit. I have heard that gates can act as capacitors so thought my PWM signal might be just charging this up too. See the proposed 10k pulldown resistor that I thought may help this.