News:

Let's find out together what makes a PIC Tick!

Main Menu

How to use feedback voltage

Started by Amod, Apr 09, 2023, 09:56 AM

Previous topic - Next topic

Amod

Sir,

I want to get a constant output of 115vdc if input voltage varies from 115vdc to 155vdc.How can I use feedback?I want to regulate pwm according to output voltage.kindly guide.

david

You could use an ADC to measure a scaled version of the input voltage and use it to adjust the pwm duty cycle.  This is effectively line regulation where it holds a constant output when the input changes.
You could also measure the output voltage with an ADC and provided you can tolerate a small variation in output you could again adjust the pwm duty cycle.  You will need a higher system gain for the second approach as you're measuring only a small change in a large voltage.  In a switching regulator this would be done by the error amplifier.  Rather than dividing down the output voltage with a resistor network you could try using a high voltage zener and a lower ratio resistor network to preserve the error signal.  The advantage of the second approach is that it can also provide load regulation provided you have some input overhead.  For example if the output load drops the voltage below 115V then the duty cycle can be increased to compensate.
You will have to work out how much to change the duty cycle for a given change in output but pwm is very predictable.  It may also be possible to use any on-board comparators as error amplifiers but this may result in something more like ppm.
Just be aware that a software control loop with integrated pwm may have significant delay and hence the transient behaviour of the system may allow overshoot.

Cheers,
David

Amod


Amod

Sir,can you give me an example?

david

Sorry, you'll need to invest your own time to learn the basics. Start with measuring the scaled output voltage and then how to control the pwm duty cycle and finally how to relate the voltage change to the pwm duty change.   There will be various examples in the samples folders of both these requirements but you will need to adapt them to your particular application.  Good luck.

David