I'm building a boost converter from scratch and am planning to use an STM32 microcontroller to generate a PWM signal to regulate the output voltage. The power supply voltage of the circuit is 24 V, and I aim to adjust the output voltage from 24 V up to 100 V with a current of 100mA. Additionally, I want to read the output voltage value using the STM32 ADC input to adjust the PWM accordingly.
Initially, I calculated the converter values using an online calculator (input voltage 24 V, output voltage from 24 V to 100 V, PWM frequency 100 kHz, output current 100 mA). Then I simulated the circuit in Multisim, using a square wave generator in place of the microcontroller. For galvanic isolation between the STM and the gate driver, I considered using the ADUM4120CRIZ isolated gate driver (not included in the diagram). The simulation showed that by adjusting the duty cycle from 40% to 80%, the output voltage could be varied within the desired range (24-100 V).
Then I added an voltage measurement circuit for the microcontroller's ADC. It uses voltage divider R4 R5 to bring 24-100 V to 0-3.3 V, which can be read with the MCU, and a linear optocoupler HCNR200 for galvanic isolation. Simulation seems to be working, but I'm still not sure that it would work in real life. So here is a few questions:
Am I on the right track with the approach I've taken for creating a boost converter controlled by an STM32?
Is there any way to limit the maximum voltage to 100 V? Because adjusting the voltage with ADC feedback doesn't seem too reliable.
Are the chosen values for the voltage divider appropriate, or should I reevaluate them?
Is the PWM frequency value of 100 kHz is ok for my purposes? And how to choose it properly?
Any feedback will be appreciated!