2022-02-27 09:35 PM
STM32 TIMER PWM (10KHz) very duty cycle for very output voltage.
now i want (0 - 10V DC) analogue output voltage is very by changing duty cycle of TIMER PWM (0 - 100 % duty).
what is the circuit diagram for PWM IP to ANALOGUE OP?
so for example: 10V DC external supply
duty cycle and output analogue voltage (0% 0V), (50% 5V), (100% 10V)...
2022-02-27 11:22 PM
What do you mean with "very" ?
If you have a 10V voltage supply, then it's not too hard, though for getting exactly 0 V and 10 V might need some extra switches.
If you don't have the 10 V, then start with looking for "diode capacitor voltage multiplier".
For the PWM to DC circuit you need at least: a transistor connected to the STM-pin for the high voltage, a resistor and a (probably BIG) capacitor, used as a simple low pass filter. For less ripple add another RC low pass, or use an active filter.
And don't forget that this will be a high impedance voltage, so buffer it with an amplifier.