Re: Universal PIC switchmode status report
- From: Jan Panteltje <pNaonStpealmtje@xxxxxxxxx>
- Date: Thu, 05 Feb 2009 23:56:19 GMT
On a sunny day (Thu, 5 Feb 2009 14:34:49 -0800 (PST)) it happened JeffM
<jeffm_@xxxxxxxxx> wrote in
<0f91d129-3173-43a6-b772-30c0ce332e42@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>:
Jan Panteltje wrote:?
Universal PIC switchmode status report
Today added the cycle by cycle current limit,
it is working here, to limit the current to a low value.
cycle_by_cycle_current_limit_current_transformer_img_0891.jpg
You're going to need more of a path than that.
What do you mean by path?
Read my original postings for the steps planned.
Anyways, from here, there are 3 ways forward, with some sub solutions.
To add voltage feedback, the simplest way is to add a zener from output
to this same comparator I think, it will then limit the PWM as the output
voltage reaches the zener voltage.
How to add the PID part .. some RC perhaps, how stable that will be, etc,
no idea, will have to try.
The second way, is to use the second comparator for output voltage compare to
the programmable internal reference, and end up with 31 programmable output
voltages, the same PID problems apply.
The third way is to run the AD conversion in the main loop for Iout
and Uout, do the PID in software, and have it control the PWM register.
This is accurate, but slower (but not really that slow, as main is idle
it can run at max speed doing ADC and math).
The fourth way, and this is a little trick I thought of,
is to make a software PWM, and filter that to a precise DC (so DAC),
and use that as external reference for comparator 2, compare it to Vout.
The disadvantage is that interrupts cause then fluctuations in the soft PWM.
This can perhaps be solved by doing that PWM DAC in the clock interrupt.
That would make changing output voltages a bit slower, but give you max accuracy.
Of course soft start (the current limit starts at zero and the timer tick slowly
increases it to the requested value), is also needed, already wrote most of that.
pwr.asm is now 3341 lines long, and there is still plenty of of free space
in the chip.
The only really difficult factor in this, is the jingling with IO pins, if
I want to keep the LCD interface.
But, I still have 4 free pins now :-)
For me, it looks like I will not need a dedicated switcher IC, as the 16F690 is
in the drawer. I have used 3 of these now if different projects, and zero problems,
The features of this chip, like 4 PWM outputs, 3 timers, 2 analog comparators, EEPROM,
UART, SCC, brownout timer, watchdog, 4kB code space, 12 ADC channels, and much more,
make it a very nice thing to work with.
Microchip did a great job with this 16F690, my hat of to them :-)
.
- Follow-Ups:
- Re: Universal PIC switchmode status report
- From: Hammy
- Re: Universal PIC switchmode status report
- References:
- Universal PIC switchmode status report
- From: Jan Panteltje
- Re: Universal PIC switchmode status report
- From: JeffM
- Universal PIC switchmode status report
- Prev by Date: Re: OT IEEE Spectrum on Anthropogenic Global Warming
- Next by Date: Re: New sensor material 'Black silicon', 1000x more sensitive to light?
- Previous by thread: Re: Universal PIC switchmode status report
- Next by thread: Re: Universal PIC switchmode status report
- Index(es):
Relevant Pages
|