avr based smps
Hi Itp,
it is possible to do so.
But you should be aware that you will
1. not achive the same regulation speed like with a analog design. For that your SMPS is stable you must achive a phaseshift of less than 125deg at unity gain frequency. With a µC you need an AD-converter, lets say 5µs conversion time. Until you can calculate the next PWM value with the AD value it takes you another 5-50µs. So the minimum time delay is 10µs. Because a µC is much too slow to calculate an IIR low pass filter this you will have to add in analog domain. So on the hole I think the maximum corner frequency of you regulation will be 20kHz.
2. If your µC just hangs once there is no security mechanism. If the PWM continues running or stops running and keeps one (pair of) switch(es) on everything will blow up.
3. the resolution of you PWM is probably not good. when LP filtering the PWM signal you will get an analog voltage. The quotient of the PWM clock frequency and the output base frequency gives a "virtual" voltage resolution. e.g. 1MHz clock and 100kHz output frequency means a resolution of 10 steps or 3,3 bits. 10MHz to 100kHz -> 100 steps or 6,6bits. 100MHz to 100kHz means 1000 steps or 9.9bits resolution.
May be you should think that your µC should do sometimes more than just controlling the feedbackloop.
My suggestion is, make an analog SMPS because of speed and relyability reasons and control the required value with a DA converter.
-aOxOmOx