Re: Universal PIC switchmode status report



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 :-)






.



Relevant Pages

  • Universal PIC switchmode status report
    ... Today added the cycle by cycle current limit, ... This voltage is fed to the PIC analog comparator 1 input via a 6k8 resistor, ... have a direct way to stop the PWM output pulse in hardware, ... On the other side of the comparator is an on chip reference voltage generator, ...
    (sci.electronics.design)
  • Re: Pwm to Voltage circuit
    ... I need a circuit to vary a voltage with a 3.3V PWM signal. ... One amp for the saw or triangle wave to drive the comparator which in turns creates a PWM signal that drives a logic fet ...
    (sci.electronics.design)
  • Re: Voltage Monitor
    ... to monitor battery voltage on my motorcycle, showing a normal, overvoltage ... one of those two-lead LEDs that are actually back-to-back LEDs, ... The output of that oscillator goes to the two ... R3, R4, and R5 to make it so the switching point of the high comparator ...
    (sci.electronics.basics)
  • Re: QBASIC racetrack timer glitch
    ... When a sensor is conducting, ... They all showed a change of voltage. ... The voltage at the comparator should be 0 ... all have a common reference voltage and that there would be ...
    (comp.programming)
  • Re: Floating local ground?
    ... held to some reasonable voltage level with respect to earth/chassis. ... > I am nearing completion of a PWM amplifier design based on the Apex SA60. ... > The power amp will contain it's own 4W DC-DC converter to generate local ... > two banks of 2 PWM amps, each supplied by its own high power supply. ...
    (sci.electronics.design)