It could work much better than igot it to run but in the end there is a very small selection of smd coupled inductors, its a pain to select one and they are almost never rated 500+V and i dont like to use parts out of spec any more. ... Maybe in the future ill try again.
Fair point. In fact, I'm sorry I brought it up again, as you'd already discussed it up-thread.
-The diodes im using right now for all the steps are GSD2004S. They arerated 50ns but at full current which they will never see in my case and a nominal leak of 100nA@ 300V. Since i only do 50kHz and for the "checkvalve" on the storage cap i use two pair of them (150V per diode = turns out to be less than 10nA) there is no real problem.
The catch with diodes in series is that they may not share off voltage evenly...
Your Idea using a FET is interesting, it may come in handy later... Though in this case it will be a Problem since even using logic level with 2Vth when adding the 1.5-2V divider voltage i wont be able to turn it on using a 3-3.3V battery.
Yes, the downside is that you might only be able to count on a 1V full scale output, which might sacrifice some ADC resolution.
... voltage up to 20kV 1.5A 3phase ...
Yowza. I was nervous enough about 5kV...
Im actually not even sure im in ccm, never calculated or bothered to measure the timing. Though using the multiplier im not sure if its actually ok since no matter if pushing or pulling on it, there will always be one set of diodes conducting and the other ones isolating. by now everything seems to work nicely, so maybe ill start playing with such detail soon, its just software after all.
DCM / CCM will still be relevant for the main switch and some of the multiplier diodes. Could you maybe post a schematic?
The nice thing about DCM in a low power converter is that you can load a measured amount of energy into your inductor (proportional to (Ton * Vin)^2), then wait for this energy to flow out into the output stage.
There are two possible control aims on the input side: limiting peak inductor current to avoid saturation, and limiting average input current to avoid crashing the battery supply rail (considering a cold, discharged battery).
To limit peak inductor current
in DCM:
Vin = L dI/dt
=> Vin = L Ipk / Ton
=> Ton = L Ipk / Vin (1)Where Vin = input voltage, L = inductance, Ipk = peak inductor current
We have now loaded some energy into the inductor, and need to let it out into the assorted capacitor banks:
Vc = L dI/dt
=> Vc = L Ipk / Toff
=> Toff = L Ipk / (Vc-Vin)
=> Toff' = Toff + Tmargin (2)Also:
T = Ton + Toff'Where Vc = bus capacitor voltage scaled by number of charge pump stages, Toff = time for inductor to discharge, Tmargin = extra time to leave some margin, T = total switching period.
We see that Toff' will vary a lot with Vcap. When Vcap is empty, Toff' will be long. As Vcap fills up, Toff' gets shorter. (This is why old school camera flashes make the wheeee sound with increasing pitch.)
We can relate Toff' to Ton:
Ton * Vin / L = Ipk = Toff * (Vc - Vin) / L
=>Ton * Vin = Toff * (Vc-Vin)
=> Toff = Ton * Vin / (Vc-Vin)Vc and Vin should change fairly slowly, so we can calculate Toff. (Note, initially Vc - Vin = 0 and Toff is allegedly infinite, but resistances and diode drops will take care of this.). Helpfully, L disappears from this equation (assuming you don't saturate it!).
Now let's look at average
input[/t] current Iavg:
Iavg = (1/2 * Ton * Ipk + 1/2 * Toff * Ipk) / T
=> Iavg = 1/2 (Ton + Toff) * Ipk / T
Hmm. With some rearranging:
Ton + Toff = Ton + Ton * Vin/(Vc-Vin)
=> Ton + Toff = Ton (1 + Vin/(Vc-Vin))
=> Ton + Toff = Ton ((Vc-Vin)/(Vc-Vin) + Vin/(Vc-Vin))
=> Ton + Toff = Ton ((Vc-Vin+Vin)/(Vc-Vin))
=> Ton + Toff = Ton (Vc/(Vc-Vin))
=> Iavg = Ton^2 * Vc/(Vc-Vin) * Vin / (2*L*T)
So, if we just set T = constant (i.e. fixed frequency), we see that Iavg varies a lot (and we can't make it arbitrarily high or the inductor will saturate). (In this case Tmargin varies a lot.)
But what if we set Tmargin to be small, i.e. Tmargin = 0 (note, in practical designs Tmargin must be > 0 so we don't enter CCM!)?
=>T ~= Ton + Toff
=> Iavg ~= (1/2 * Ton * Ipk + 1/2 * Toff * Ipk) / (Ton + Toff)
=> Iavg ~= 1/2 * (Ton + Toff) * Ipk / (Ton + Toff)
=> Iavg ~= 1/2 * Ipk
=> Iavg ~= Vin * Ton / (2*L)
Solving for Ton, we get:
Ton = 2 * L * Iavg / Vin
And:
Ipk ~= 2 * Iavg
Toff = Ton * Vin / (Vc-Vin)
Tmargin = constant
As a practical matter, you could round Vin into a few bins and use a small lookup table (maybe 8 - 16 entries) to get Ton (scaled directly to clock cycles). A similar approach would probably work for Toff.
This method gets you reasonable control of the input current (good for battery) without saturating the inductor or requiring a current sensor. I think it could reasonably be implemented using an 8 bit MCU. Also note that because no current sensor is required, you probably don't need to update every switching cycle.
If your MCU PWM unit includes a one-shot mode, this would be perfect. Your software can request the one-shot (duration Ton) from the PWM unit, then configure a timer interrupt to go off at (Ton+Toff) at which point you calculate the next step. If the software hangs on something, the PWM unit will push out one pulse and then stop, so nothing blows up :-)
I did a lot of unnecessary algebra below...Substituting for T:
T = Ton + Toff + Tmargin
=> T = Ton (Vc/(Vc-Vin)) + Tmargin
=> Iavg = [Ton^2 * Vc/(Vc-Vin) * Vin] / [2 * L * (Ton * Vc/(Vc-Vin)) + Tmargin)]
If we want to solve for Ton, this is an unmanageable mess. Let's make some assumptions:
Tmargin is small. This means variable switching frequency!!
Vc >> Vin
=> Vc / (Vc-Vin) ~= 1Now we can simplify a bit:
Iavg ~= [Ton^2 * 1 * Vin] / [2 * L * Ton]
=> Iavg ~= Ton * Vin / (2*L)Solving for Ton:
Ton ~= 2 * L * Iavg / Vin (3)
For a control algorithm, we can use the minimum of equations 1 and 3. This provides limited peak inductor current when Vc is small (i.e. startup) and approximately limited input power when Vc is large.
Ton ~= min(L * Ipk / Vin, 2 * L * Iavg / Vin)
=> Ton ~= min(Ipk, 2*Iavg) * L / VinDammit, I could have save a lot of work!