Forums

A PIC based boost converter

Started by Jan Panteltje November 24, 2011
Updated the diagram for the 'on' and 'off' touch button MOSFET added.
 http://panteltje.com/pub/sc2_pwr_diagram_2_img_3235.jpg
This MOSFET is in a funny place, between the 2 batteries,
this is to get enough drive once it is on.
The BLACK button bridges the MOSFET, this starts the boost converter,
then the PIC comparator senses if the battery is higher than 2.0V,
if so it gives +5V to the MOSFET gate,
and the system stays on.
If not, releasing the black button disconnects the battery again.
The RED button shorts the MOSFET gate against the source,
this cuts the power, the boost converter stops,
and the +5V drive to the MOSFET becomes 0V, and things stay off.

I added some info on that mysterious current transformer:
primary 1 turn (loop through).
secondary 11 turns.
Load resistor 5 Ohm.
No idea what the core material is, but I have a lot of those,
for $$$$$$$$$$$$$$$$$$$++ a piece I am willing to part from these,
but I could tell you where I got those from for much less.
 
To put an end to speculations about waveforms that I do not understand,
here is the voltage over the 5 Ohm load resistor of the current transformer versus
the MOSFET drain voltage, externally triggered from the gate drive:
 http://panteltje.com/pub/sc2_pwr_drain_versus_CT_output_voltages_img_3230.jpg
So the trace timing shown is the real timing.

You can see that when the MOSFET is ON, so the rectangular waveform low,
the current in the drain *sorry in the inductor* almost linearly rises with time,
until it reaches the PIC comparator's reference voltage causing the gate drive to reverse,
and the MOSFET goes off, 
and its drain voltage goes high.

The little spikes on the triangular wave are mostly scope probe pick up
as it was sitting against the 33 uH inductor.

It is altogether a nice clean switch with  just a little bit of RF on the
start of the ON waveform, considering also the rather 'free' layout, then this is REALLY good:
 http://panteltje.com/pub/sc2_pwr_red_and_black_button_test_setup_img_3227.jpg
The PIC is in the programmer in this picture, just with 3 extention pins, to
tap the RS232.
The software turned out to be correct, no changes from the last release,
 http://panteltje.com/pub/sc2_pwr-0.2.asm
Battery and output voltage display correctly via RS232.
 http://panteltje.com/pub/sc2_pwr_rs232.jpg
The '491' is debug output, comment out line 1599 to 1609 to disable it.
PWM max is fixed, but can be set via RS232 with PnnnENTER
PWM is always the same as PWMmax after soft start ends.

This is it folks, hope it is of use to you.
Those who want to prove it does not work,
I am sure I will hear about it :-)






"Jan Panteltje" <pNaonStpealmtje@yahoo.com> wrote in message 
news:jalu22$lj6$1@news.datemas.de...
> This is it folks, hope it is of use to you. > Those who want to prove it does not work, > I am sure I will hear about it :-)
I never consider an SMPS even marginally tested, let alone done, until I've done some line and load variation and step response testing. For instance, how does it respond under short-circuit conditions? Ok, so a perfect short takes over from the MOSFET more or less, then the supply gives out. But what about a marginal short? A load with a voltage higher than the battery but lower than nominal output. That will load it, saturating the voltage feedback, and commanding whatever maximum PWM is. Current feedback with no DC reference might as well be disconnected to save that pesky transformer! Tim -- Deep Friar: a very philosophical monk. Website: http://webpages.charter.net/dawill/tmoranwms
On a sunny day (Fri, 25 Nov 2011 19:16:06 -0600) it happened "Tim Williams"
<tmoranwms@charter.net> wrote in <japelu$nc5$1@dont-email.me>:

>"Jan Panteltje" <pNaonStpealmtje@yahoo.com> wrote in message >news:jalu22$lj6$1@news.datemas.de... >> This is it folks, hope it is of use to you. >> Those who want to prove it does not work, >> I am sure I will hear about it :-) > >I never consider an SMPS even marginally tested, let alone done, until >I've done some line and load variation and step response testing. > >For instance, how does it respond under short-circuit conditions?
Tim ???? A perfect short in this sort of setup without the battery switch as in the last diagram, would ALWAYS give a high current due to the inductor-diode path.
> Ok, so >a perfect short takes over from the MOSFET more or less, then the supply >gives out.
In the MOSFET battery switch configuration the battery is switched off http://panteltje.com/pub/sc2_pwr_diagram_2_img_3235.jpg Maybe you had not seen that one yet.
>But what about a marginal short? A load with a voltage higher >than the battery but lower than nominal output.
I have tested with 200 % overload even in the design without battery switch. When output drops due to overload, below some point even the comparator reference drops, and in some limited way there is fold back, but this is irrelevant irre elephant well whatever, the battery switch will have done its work.
>That will load it, >saturating the voltage feedback, and commanding whatever maximum PWM is.
Sure, that is the whole idea of a regulator. But nothing saturates, as the current limit prevents that, to a point.
>Current feedback with no DC reference might as well be disconnected to >save that pesky transformer!
Wrong, you do not understand this architecture. It is very much the same as ones I previously discussed with Jamie, if you short the current transformer secondary then the whole things turns into a hysteretic voltage controlled regulator (on /off control). In the latest incarnation I have added some more cools stuff. You can now set the output voltage via RS232, I moved the MOSFET battery switch to the + (no longer in between batteries), and I used PIC outputs to generate a 10V DC control for that battery switch MOSFET gate now the battery switch MOSFET only drops 30 mV at double load. Next thing I will remove the 2 resistors that are now low voltage cutoff sense to a PIC comparator, and use the ADC, and allow low voltage cutout to be specified via RS232 too for different battery types. All is saved in EEPROM of course. Oh, and did I mention it displays battery voltage and output voltage via RS232 too? So it is becoming as close as perfect as it can be, good enough to incorporate it into my nice gamma scintillators. I did a NiMH battery lifetime test yesterday, and I can run just 10 hours from 2 NiMH, with LCD back light on. Not bad. And output stays constant within a few mV over the full battery range, It did cut off at exactly 1.99 V on the Chinese multimeter. So, perfecting the design, better than perfect is not possible. Sure it has more components than your joule thingy, but is is way more accurate, reliable, foolproof, and most of all I designed it, as opposite to buying a stupid module from ebay that does not even have a RS232 interface, and probably uses obscure parts. Hey :-)