Author Topic: Toasted my new MPPT booster  (Read 17209 times)

0 Members and 1 Guest are viewing this topic.

elt

  • Sr. Member
  • ****
  • Posts: 328
Toasted my new MPPT booster
« on: October 05, 2007, 02:44:02 PM »
Thank you!


This is where I write "I'm not an electrical engineer." I like to build and I try to learn how things work but I think that learning how they fail is even harder.


What happened?


I've a few diary entries on building a low-wind MPPT booster for my 10' mill. I finally got one built and connected up.


I tested the booster first on a fairly calm day with my batteries set up for 12 volts. The booster pulled a little power out of the mill below cut in and it worked very well getting nice power out of the mill in that region around cut-in where the peak volts are above cut in but the RMS volts aren't. We had two calm days and I left it working like that.


I woke up early on the third day and switched the batteries over to 24 volts because higher winds were forecast. I reprogrammed the booster with double the voltages I was using at 12 volts. (And that may have been a mistake that allowed the booster to stay on too long since there wouldn't be twice the voltage drop in the diodes.)


As a 24 volt system, cut in is about 250 rpm. As the wind began rise, I noted the booster was making about 3 amps at 170 rpm and 75 watts is just about what Alton's blade calculator says a 10' mill should make at that speed. Great! But I didn't see any more wind and I'd been so eager to play with the mill that I hadn't even had any coffee so I head back to the house. I'd only gotten a few feet when I heard the wind pick up so I went back; when I entered the shed I smelled the "magic smoke." The boost led LED2 was out, the user interface LED1 was stuck on and the unit was unresponsive to button presses. Poking fingers at it, the heat sinks were only very slightly warm but the microcontroller was warm almost to the point of being hot. Darn...


I've tested out the board and found three failures:



  1. Q1, the main MOSFET was "slightly" cracked and shows a 20 ohm gate to drain resistance.
  2. Given that, I understand that R1 carbonized beyond recognition. 20 ohms at 27 volts is more than an amp. R1 cooked and ended up with about a 200 ohm resistance (which apparently was high enough to keep the FET driver transistors from blowing.
  3. The microcontroller isn't running and doesn't respond to the programmer.


(I pulled all the caps so I could test them and tested all the resistors and diodes and didn't find any other problems.)


I've highlighted the failed components in the schematic:






(MILL+ and MILL- are really battery+ and battery-.)


I'll add that I didn't have a .22uF polypropylene cap for C7 and put a .1uF metal film cap in there instead... maybe that wasn't up to the job?


Well, even though I don't know what happened, I can "see" a few things (including bad software) that might have blown the FET... what stumps me is how the microcontroller blew. The voltage regulator is still working and dead on it's output voltage.


The current sense wires are connected one each end to the ground cable from the mill to the battery. There's no filtering there. I expect millivolts on those inputs but they are rated to 6 volts; could there be spikes there large enough to toast the chip?


The input voltage from the mill is divided by 16 and (at least it's my intention) is well filtered...  I don't have a clue how the micro processor blew so I'm stumped as to how to protect it better?


Any ideas and comments are greatly appreciated!


Thanks again,

- Ed.

« Last Edit: October 05, 2007, 02:44:02 PM by (unknown) »

Flux

  • Super Hero Member Plus
  • *******
  • Posts: 6275
Re: Toasted my new MPPT booster
« Reply #1 on: October 05, 2007, 09:54:26 AM »
Chicken or egg?. Did the processor fail and kill the mosfet or did the mosfet fail and kill the processor.


I will leave it to the digital experts to decide if you can get away with your current feedback. I strongly suspect that the rot started there. You only have mV of signal but you will likely have loads of nasty common mode spikes on the inputs to that processor.


If the processor failed and kept the pulse on then the mosfet would die.


The other significant worry I have is what happens at the point where you come off the converter and the main bridge should take over. I suspect you have a lower volt drop via the converter than via the main rectifier and without gate pulses you may have a significant current going directly through the converter. If this saturates the inductors then the mosfet will be in trouble if you gate it as there may not be enough inductance to limit the current during the gate pulse. Failed mosfets usually backfeed via the gate and blow up the drive circuit, this could go back as far as the processor.


You look to be using commercial inductors that may be toroids with no air gap, I just don't know anything about them. If they have no gap they will saturate at some point.


Often failure is voltage breakdown on the mosfets due to severe ringing in the circuit inductance. With your compact board layout that seems less likely but your choice of capacitor for C7 is not a good one.


I suppose anything is possible if you know how to do it, but I have had no luck with shunts for current feedback in any circuits involving current pulses. Using long bits of wire instead of discrete shunts seems even more likely to be a problem. I hate the hall effect things, they all take about 20mA or more but they do take all the risk out of current measurement with their common mode isolation.


Flux

« Last Edit: October 05, 2007, 09:54:26 AM by Flux »

Boondocker

  • Full Member
  • ***
  • Posts: 193
Re: Toasted my new MPPT booster
« Reply #2 on: October 05, 2007, 10:01:35 AM »
First, I have no electronic background.  This project has been a complete learning experience.   I felt more comfortable trying to adapt an "off the shelf" boost converter then building one from scratch.   I appreciate and commend you efforts.


For what this information is worth, on the test stand, the boost converter would blow a fuse when turned up at higher rpms. (around 280 rpm).    


Notice the commercial model has ZNR surge protector ahead of the inductor.

« Last Edit: October 05, 2007, 10:01:35 AM by Boondocker »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #3 on: October 05, 2007, 01:21:52 PM »
Hi Flux,


Thanks for looking at this. Some more info...


You wrote:


I suspect you have a lower volt drop via the converter than via the main rectifier


That's was my concern for the first booster I made. This time I picked rectifier diodes that have about 10% more voltage drop than the main rectifier. I still have a Schottky on the output. Including the Schottky, I figure that once it gets up to about 15 amps that they'll be about 1.5 volts dropped by the booster vs. 1 volt dropped by the main regulator so my guess was that the booster would never have more than 40% of the system current. Having targeted the rest of the controls at 50 amps, I targeted the booster for 20 amps. (The rectifiers are 30 amps @ 200v, the Schottky is 60 amps at 45v.)


You look to be using commercial inductors that may be toroids with no air gap,


Those are a pair of Renco 100uH coils in parallel; each is rated at 12 amps with saturation at 9 amps. If I did my coil math correctly, that should be 50uH with 20 amps (plus or minus) capability. I don't really have any more info than that.


Also, I did find a .22uF polypropylene cap in my project box so I'll put than in for try two.


I have had no luck with shunts for current feedback in any circuits involving current pulses


BTW: I am running the PWM at 60 kHz. That's probably on the order of magnitude of the analog sampling time so maybe I should increase or decrease the PWM frequency?


I really don't like the wire-shunt set-up the way I have it now. I have both the boost amps and main rectifier amps going through the same wire. Once the mill gets to cut in, the MPPT code thinks whatever it was doing was really good since it sees a large rise in current. That's why I need to sense in input voltage (or something) and use that to turn off the boost. Searching the board, I've see others say that the input voltage will lag at high currents since the coil will drain the input cap. I saw that with the mill setup for 12 volts but got a good cut-out setting the trip point at 10.5 volts. Its easy for me to think, though, that doubling that voltage when I reprogrammed for 24 volts set the cut-out too high...


I still want to give the shunt cable one more try (because it's free) but I do have some hall effect sensors in the project box as well. I figure I'll put one of your 47kohm/.22uF filters on it and maybe check the values as they come in and throw out any recognizable spikes. But...


Why would the microprocessor blow? The FETs in my first dump controller exploded and caught fire (literally) and the processor still worked fine. The only thing I can think of (and it's not based on any understanding of electronics) is that somehow the diodes and caps on the input side worked like a charge pump and developed a really, really high voltage. If not in a design mode, perhaps in a failure mode? ...


At any rate, I'll upgrade the pulse cap and put some filtering on the shunt line but I don't think I'm likely to know "chicken or the egg" unless I'm there and see it if it fail again.


 - Ed.

« Last Edit: October 05, 2007, 01:21:52 PM by elt »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #4 on: October 05, 2007, 01:40:22 PM »
Hi Boondocker,


Can you tell me more? (I did notice something with a coil on it in your pictures but couldn't find more info.) ... I can't see a zener handling real power but maybe a high voltage one acting as a spike suppressor?


Thank you,

 - Ed.

« Last Edit: October 05, 2007, 01:40:22 PM by elt »

Flux

  • Super Hero Member Plus
  • *******
  • Posts: 6275
Re: Toasted my new MPPT booster
« Reply #5 on: October 05, 2007, 01:45:49 PM »
Not being a digital man, I may be wrong about this, but I somehow I think you will have to synchronise the sampling to the pwm. I assume this must be possible using the internal clock in some way. Dreadful things happen with digital things unless frequencies are tied together, just like the crap you get out of a digital scope when you don't have an analogue one to see what you should really be looking at.


I think you need to be very careful with any inputs to the processor, I am not sure how well they are protected but most cmos stuff violently objects to outputs or inputs being driven below 1 diode drop below ground or 1 diode drop above supply rail. These may be different but most of this stuff is designed for the computer world and when you throw a lot of power electronics into the vicinity things don't always work out too well. You can easily push fast high voltage spikes between the ends of a bit of wire.


The fact that you have blown resistors on your gate driver makes me think that you may have killed the processor back through the pin that gives the pulse out. That pin will almost certainly object to anything above 5.6V and you may have hit it with about 15v when the mosfet gate broke down.


If what you say about the diode drops is true then the inductors may not be a problem.


I think your idea of sensing total output current is ok. When the main bridge adds current it should force the boost pwm back to zero. Sensing voltage is not going to work I suspect as state of charge of the battery will muck things about. I use total current with my analogue schemes and the converter is forced off even if it is not phased fully back as soon as the main bridge contributes much current.


Flux

« Last Edit: October 05, 2007, 01:45:49 PM by Flux »

boB

  • Sr. Member
  • ****
  • Posts: 389
  • Country: us
    • boB
Re: Toasted my new MPPT booster
« Reply #6 on: October 05, 2007, 02:54:14 PM »
Chicken or egg was my first thought too. (even before reading Flux's post)


Do you have a good software limit on your PWM duty cycle ??  Make sure the

booster can't out-boost itself and blow its own FET.

I've had this happen before.  That FET failure mode is the normal way they

seem to go when the die dies.


boB




« Last Edit: October 05, 2007, 02:54:14 PM by boB »

Ungrounded Lightning Rod

  • SuperHero Member
  • ******
  • Posts: 2865
Re: Toasted my new MPPT booster
« Reply #7 on: October 05, 2007, 08:06:25 PM »
Here's my bet:


 - In high winds you started getting serious output.

 - The FET turned on - probably due to software failure.

 - Current in the inductors went over 9 amps in one of them (about 18 amps total) and one of the inductors saturated - essentially becoming a dead short.

 - This left the FET trying to short the mill to ground.  The power dissipation slagged the FET.

 - The slagged FET disconnected from ground, allowing the mill output to spring back.  (It also created a spike when the current was interrupted but I don't think that's an issue...)

 - The hard connection to mill voltage overpowered the complimentary emitter-followers' drive.  The next time the software drove the output high, current through T2's emitter-base junction pulled it higher and overvoltaged the output pin of the computer chip.

 - That caused the computer chip to "latch up" - the substrate junction and the transistors above it acted like a big SCR that fired, driving current across its whole volume as it tried to short out its own power supply.  This (as is typical) slagged the whole chip.

 - The slagged chip held its output pin to ground.  T2 turned on and saturated (which is why it survived).

 - T2 pulled one end of R1 to within a couple tenths of a volt above ground.  The other end was pulled up to mill output voltage by the gate-drain short in the FET.  24V across 220 ohm is a tad over 100 ma and about 2.5 W - exceeding the power rating of R1 and charring it.

« Last Edit: October 05, 2007, 08:06:25 PM by Ungrounded Lightning Rod »

Ungrounded Lightning Rod

  • SuperHero Member
  • ******
  • Posts: 2865
Re: Toasted my new MPPT booster
« Reply #8 on: October 05, 2007, 08:08:43 PM »
Lost a step:


- The slagged FET disconnected from ground, allowing the mill output to spring back.  (It also created a spike when the current was interrupted but I don't think that's an issue...)

 - The slagged fet also shorted the gate to the drain, pulling the gate up to mill output voltage.

« Last Edit: October 05, 2007, 08:08:43 PM by Ungrounded Lightning Rod »

Boondocker

  • Full Member
  • ***
  • Posts: 193
Re: Toasted my new MPPT booster
« Reply #9 on: October 05, 2007, 08:39:20 PM »
Elt,


Hope this will help.   My eyes are weary from following traces.   Will double check what is documented and filled more details latter.  A better, large, image is in my file.


Boondocker







« Last Edit: October 05, 2007, 08:39:20 PM by Boondocker »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #10 on: October 06, 2007, 05:25:10 AM »
Thanks for that. I googled; the ZNR is a "transient/surge suppressor." I searched Digikey, etc and found them in a range of values for the a couple of bucks... seems like a good idea. I have to admit though, that I don't understand the range of voltages that can appear in the booster so I don't know what value I'd want to use... on more thing to learn!


 - Ed.

« Last Edit: October 06, 2007, 05:25:10 AM by elt »

Boondocker

  • Full Member
  • ***
  • Posts: 193
Re: Toasted my new MPPT booster
« Reply #11 on: October 06, 2007, 06:23:16 AM »
The markings on the component are:


ZNR

V20270

F4


I think it matches  Digi-key part P7232-ND


The diameter is approximate 20mm, corresponding with the first two digits on the markings.  27 would be the nominal varistor voltage.


http://www.panasonic.com/industrial/components/pdf/awa0000ce2.pdf

« Last Edit: October 06, 2007, 06:23:16 AM by Boondocker »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #12 on: October 06, 2007, 07:15:29 AM »
I don't really have a good handle on transistors yet and I didn't know that PNP transistors would conduct through the base. (Though I do see now that I have a diode drop in both directions across the driver and I've Googled a little on PNP's and NP junctions and have seen it explained.) Given that, I can see that high voltage would develop on the gate pin and cause the microprocessor to fry.


... that explains it.


Thank you,

- Ed.

« Last Edit: October 06, 2007, 07:15:29 AM by elt »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #13 on: October 06, 2007, 07:41:28 AM »
Sensing voltage is not going to work I suspect as state of charge of the battery will muck things about


I didn't think of that... the mill's been floating the batteries mostly because I built it for back up power for when the mains go down. I've been using it for lighting the shop but that's not a big load and I didn't think ahead that once I need to really use the batteries that the voltage will change significantly.


The first version also read the the battery voltage so it could compare input to output... maybe I'll put that back in because switching (off) based on rpm or current requires a priori knowledge about the mill and it looks like having one less setting that I can mess up would be better...


Thanks again!

- Ed.

« Last Edit: October 06, 2007, 07:41:28 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Toasted my new MPPT booster
« Reply #14 on: October 06, 2007, 01:17:57 PM »
Hello elt,


5.5v is dangerously close to Vcc limit. Should use 5.0v.


When Q1 fried as stated it can punch through to gate. If they explode it might not.

Transistor: basically the Base to emitter junction is a diode, hence the symbol.

Look at T2, when Q1 gate is pulled high the current flows through to base to R1 to micro.

You have a simulator give it a try!

At 14v this is 8.5v - diode = 8ma into micro. 8ma in it self may or not be enough to damage it.

If not the substrate diodes on all I/O pins will steer this current into Vcc. Thus Vcc will raise if no other loads on the power supply. Once the voltage goes above the micros break down voltage (6-8v) it will be destroyed! Very important you understand this point, many do not. Tell me why Vcc goes up?


Inputs of ADC must be above ground of micro. With the sense input to mill- and batt-, the voltage input will be neg. Must be pos according to p126 of Data sheet. I remember another part you were using that could handle neg voltage?? Opamp can add gain and reverse the voltage, as we know the opamp will cost near as much as the micro!


All pins to micro must be protected.

Using higher resistances helps along with diodes. Due to cost rarely use transient suppressors.

The sense (ADC) inputs should have series resistors with diodes on micro side for protection.

Voltage divider resistances is too low (R4, R5), if nothing else it draws near 1ma for no good reason, get the current down to 100ua. A three resistor network does not add any value to a two resister of slightly higher resistances. Remove R2. Use diodes to Vcc and Gnd to protect ADC input.


Next get rid of T1 and T2, they do not add any value. They are need if your using high frequency. 60Khz is not. Use micro IO to drive directly with a series resister and diodes at micro side.

The LED may load the pin too much, so drive LED with transistor if needed.


PWM

8 bit timer the clock frequency of 60Khz has a repartition rate /256 or 235hz.

Checking up on the unlabeled inductor, its 220uh. The inductor current rises about 50a in just under 1ms. May want to use a higher PWM frequency about 4x, will depend on just how high you want the current to go. What is the current rating of the inductor? I saw something about 10a on the other drawing. If two L brings it to 20a then the on time should be limited to 350us or if total is 10 then half.

The off time must equal the voltage boost ratio, so if doubling it then the inductor will take almost as much time to discharge into the battery before you repeat the cycle. The inductor control can be working on continuous current, where you recharge the inductor current before it goes to zero. The average current can be much higher this way, allowing more power to boosted!


Software

monitor Boost+ if below 7v do not run. LM317 does not regulate below this voltage. To get accurate ADC readings the LM317 must be in regulation.

To know the inductor current you must read the current at the end of the MosFet on time or use RC to filter to get the average...


I could say more, been couple hours writing this up!


Have fun,

Scott.

« Last Edit: October 06, 2007, 01:17:57 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #15 on: October 06, 2007, 09:18:44 PM »
Hi Scott, hope all is well with you.


>5.5v is dangerously close to Vcc limit.


Is that a problem? The electrical section gives lots of characterization at 5.5v (6v is "Absolute limit") I picked 5.5v trying to get the most volts I can to the FET gates; w/o the transistors, though, that'll even be a little bit more!


> At 14v this is 8.5v - diode  = 8ma into micro


I don't quite get those numbers. Mill volts were probably more like 30v or 35v, but r9 and r3 (btw, I lowered r3 to 470 ohms) is a voltage divider so the volts at the uP pin would have been less. Actually, when I put this into the simulator, only about 9 volt came back through the base; I had the uP pin still sourcing 4ma and not sinking any mill power at all. (So now I'm confused again.)


> Tell me why Vcc goes up?


Because the lm317 will not sink voltage! (I'm slow but I learn eventually :) But, oh! when I add the npn into the simulation, it conducts too. In fact, if the volts though the pnp can turn the npn on, then 35 volts goes to Vcc and the lm317 will just float up! ... does that sound right? ... if so, that had to hurt and I'll bet that's what blew the microprocessor.


> 8 bit timer the clock frequency of 60Khz has a repartition rate /256 or 235hz.


I'm not familiar with the term "repartition rate" but I can tell we're talking different things. I may not be using the correct terminology but in my terms, the PWM frequency is 60Khz, the clock frequency is 8Mhz with a counter reset match set to "132" to give 60Khz frequency. (And a duty cycle resolution of 7.1 bits)  So, for example, the minimum pulse would be 128 nS and a 50% duty cycle pulse would be 8uS. (So do I need to put the gate drivers back in?)


... the timer has two match registers so even though the ADC clock is much slower I can arrange the "sample and hold" to occur shortly after the PWM turns off but I'm not sure I'd know what to do with peak current; I think the big output cap and a filter is easier for me to understand.


> With the sense input to mill- and batt-, the voltage input will be neg


That was my first thought too but the battery and its cables are a load when the mill is sourcing so all the voltages in the cables and battery are positive with respect to mill- (and negative with respect to mill+.)


However! I don't think the dump load kicked in in those few seconds I was out of the shack but I can see now that having it connected to the main rectifier and not the battery will cause problems later on. (I've realized that my charge controller will need cables ordered from mill to battery to loads and dumps but hadn't considered that the booster would need that too...)


> All pins to micro must be protected.


All the pins have internal clamping diodes to both vcc and ground; I'll put in series resistors... there's a comment in the data sheet that more than 10k will effect the ADC sample time so I don't want to go too high...


... so here's what I think is the answer to the "the chicken or the egg?"


I was in the mill shed today as a front was coming in. I saw the mill speed up from tickling around with a few amps near cut in (about 250 rpm) to about 25 amps at 350 rpm in less than a second. I know people write about mills being sluggish changing speed; mine seems very fast compared to what I read. (Inertia keeps it spinning so it takes a longer to slow down but it accelerates very quickly.)


Well, with a 1% step in duty cycle and ten MPPT dithers a second, it might take several seconds for the MPPT code to turn off the PWM... which I guess was plenty of time to boost the output FET into failure. (I'll reprogram the dither to something like 500/sec when decreasing the duty cycle and 10/sec when increasing it.)


The 35 volts across the little 1/8 watt 22 ohm resistor cooked it until is was a 200 ohm resistor. At 200 ohms, the current was small enough that the npn-pnp driver pair wasn't cooked but reverse bias on the pnp transistor turned on the npn resistor and that put 35 volts on Vcc and destroyed the microprocessor... how's that sound?


Thank you!

- Ed.

« Last Edit: October 06, 2007, 09:18:44 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Toasted my new MPPT booster
« Reply #16 on: October 06, 2007, 11:55:12 PM »
Hello elt,


Best to stay away from limits if you can. With direct drive to FETs 5.0v is good.

Micro IO drive is 10ma with 4.3v out, this implies 70 ohms output drive.

With 3v on gate drive it can source 20a. 3V is 1 RC time. p4 DS

The gate is 1350pF * 70 ohms = 94.5ns turn on time. p2 DS.

With the turn on time less than 1%, little efficiency is lost or heat generated.


Voltage divider

I have R5, R4 and R2, not sure what schematic your using...?

Using resistances higher in R5/4 do not need R2. Should reduce this current to below 100ua, do not need any higher. See next section.


ADC

Important ideas about source impedance. Yes good to keep low for ADC.

When the ADC takes a reading it samples with a small cap. 10pf does not sound like much, it creates a RC network which must be charged. With high source resistances the input may not have enough time to get a good reading. Place a cap 100 times larger on the input, when sampled it transfers its charge to the sample cap, only 1% error. If not good enough then use a bigger cap to get accuracy you want. Now large source resistances can be used. Often a filter is needed, so combine the needs of both.


PWM

60k is faster than you need. 128ns per bit is too fast. The inductors charge at 1a per 15us (assuming 14v, will be faster with larger voltage). I don't think you need a bit to be worth more than half an amp? (64x slower) This slows everything down so the turn on/off is well removed from a bit time.


I made an error about the on off times. If the boost is 2x, then the off time is half the on time to discharge the current in the inductor.


When the generators output is above battery shut down the booster circuit.

Control loops, should be two loops, slow and fast. Slow for MPPT, fast for when the world changes faster than you expect. CYA.


Your last paragraph is good.

Time to hit the sack. Good night!


Have fun,

Scott.

« Last Edit: October 06, 2007, 11:55:12 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #17 on: October 07, 2007, 04:02:41 PM »
Hi Scott,


> Voltage divider - I have R5, R4 and R2,


That divider was by design. What I meant was that when voltage appeared on the base of the transistors, that the microprocessor pin driving the driver pair (pin 6) would see less voltage because R9 and R3 (and the LED) would act like a voltage divider.


Last post:

> 94.5ns turn on time. p2 DS. With the turn on time less than 1% [...]

Previously to that:

> 235hz. [...]  May want to use a higher PWM frequency about 4x,


Okay, a 1Khz PWM with a 7 bit resolution fits both constraints. Sounds audible to me...


> Micro IO drive is 10ma with 4.3v out, this implies 70 ohms output drive.


Micro IO drive is 20ma with 4.5v out, this implies 25 ohms output drive. So 1350pF * 25 ohms = 33.8 ns turn on time. I could run the PWM a little bit higher...


Do I care? I started out some time ago with this page from Coilcraft -

http://www.coilcraft.com/apps/selector/selector_2.cfm

and what I learned (right or wrong) playing with the parameters was that just about any inductor that would handle the current would work but that the output would be "smoother" with either a larger inductor or a higher frequency ... and that for a larger boost factor with a fixed inductor, that the output would be smoother with a higher PWM frequency (and that an equivalent ripple with the same inductor at lower boosts could be had with a lower frequency PWM.)


In the first booster I made, I actually changed the PWM frequency from 30Khz at small (low duty cycle) boosts, to 60 KHz and then to 120Khz at larger (higher duty cycle) boosts. Thinking about that, I guess that lowering the frequency at lower duty cycles improves the on-time percentage number a little... but am I chasing grains of sands, should I just rely on a big cap on the output to smooth things out?


Honestly though, I'm not planning on making another PCB right now. So far all the suggestions can be cobbled onto the existing copper (including going to a hall effect current sensor if I have to go that far...) so given that the driver transistors are already in there, should I cut them out or just skip putting them in next time?


> I don't think you need a bit to be worth more than half an amp? (64x slower)


If the ADC were getting full resolution then I'd be sensing 1/8 amp bits so maybe 16x slower? (4Khz?) and maybe limiting the lower duty cycle to "4" percent so that I don't reduce the pulse width too close to the FET on-time ...


Thanks again,

- Ed.

« Last Edit: October 07, 2007, 04:02:41 PM by elt »

commanda

  • Hero Member
  • *****
  • Posts: 731
Re: Toasted my new MPPT booster
« Reply #18 on: October 08, 2007, 10:13:42 PM »
Elt,


Sorry to hear you blew it up.


18 months ago I built a prototype analog mppt controller, it's over in my diary http://www.fieldlines.com/story/2006/3/12/14840/1315


You might be interested in this line from that article.

There's also an input from the tacho, to quickly push the control voltage in the right direction as the wind changes.


And don't rely on any devices internal protection diodes. Those silicon dies are very tiny, and those internal diodes spit the dummy at anything more than static discharge levels.


Amanda

« Last Edit: October 08, 2007, 10:13:42 PM by commanda »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #19 on: October 09, 2007, 07:36:30 AM »
> Sorry to hear you blew it up.


I appreciate that. I certainly was disappointed that it went so quickly.


Of course, it's been a learning experience. Some of the good ideas I'm getting from folk probably won't see light until I have to build v3 of the board but most of them can be worked onto the existing pcb. I have given some though to putting a diode on the ADC  measuring the input voltage and connecting it to an alternator leg to measure RPM instead. That'll require some experimentation and verification. I have had a DVM dedicated to reading hertz almost from day one. It has seemed to be completely reliable after I put an RC input filter on it and I'm at the point where I consider it authoritative with regard to what the mill is doing. I am hopeful that I can reproduce something like that for the uP.


I did get the booster back on the mill yesterday with a few changes: I decreased the PWM to 4 Khz. I put a real pulse cap on the output of the FET. I put an input filter on the current sense line. I realized that my big caps were on traces so I moved them so that they connected directly to the high current plains. I changed the control loops (software) so that it increments by one when increasing the load, but it decrements by five when it is unloading the mill. Also, I added a high-current cut-off condition. (I only had a high voltage cut-off before.)


That all worked but we didn't have any big wind gusts so I didn't see the conditions that blew it the first time. I remove the booster, though. The "-5" when unloading made it impossible to find the MPP in low wind; it ramped up, cut out, ramped up, cut out, etc.


Well, that was just a quick software hack. Next try is to run the control loop at 5x the speed and go back to unloading by one but only increasing the load every five (or every "x" times.)


I've also looked at minimum on times for the FET and charging times for the inductor like Scott suggested. I've figured out that I shouldn't need to go less than a 15% duty cycle so putting a bottom limit on the duty cycle (as well as the top limit) will let me go back to a higher frequency PWM and still maintain a 1% on time limit for the minimum pulse width.


 - Ed.

« Last Edit: October 09, 2007, 07:36:30 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Toasted my new MPPT booster
« Reply #20 on: October 10, 2007, 01:23:57 AM »
Elt,


skip T1/2, wire past them. Use one to drive the LED.


Good to balance the turn on time to actual time on.

Try to keep turn on time to less than 1%. Use that as your key to determine PWM.


Battery is a big cap, not sure how much the output cap will do.

The considerations of ripple and such I just do not see there value.


For a power supply they are very important, here charging a battery I do not see that it matters unless the ripple is so big to disturb something.


The inductors at 20a at 12v is boosting 240watts, will this be enough?


Have fun,

Scott.

« Last Edit: October 10, 2007, 01:23:57 AM by scottsAI »

commanda

  • Hero Member
  • *****
  • Posts: 731
Re: Toasted my new MPPT booster
« Reply #21 on: October 10, 2007, 04:07:17 AM »
That all worked but we didn't have any big wind gusts so I didn't see the conditions that blew it the first time. I remove the booster, though. The "-5" when unloading made it impossible to find the MPP in low wind; it ramped up, cut out, ramped up, cut out, etc.


Consider scaling the negative steps. When the numbers are high, decrease by 5. As the numbers approach zero, decrease by less than 5.


If you're using 8 bits, max = 255.

If over 100, decrease by 5

else if over 50 decrease by 3

else if over 20 decrease by 2

else decrease by 1.


Just a random thought.


Amanda

« Last Edit: October 10, 2007, 04:07:17 AM by commanda »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #22 on: October 11, 2007, 11:36:10 AM »
Hi Scott, hope all is well.


> skip T1/2, wire past them [...]


Done!


> The inductors at 20a at 12v is boosting 240watts, will this be enough?


Not that you can tell by looking but it's designed as a 24 volt mill ... it's just that I've been wiring the batteries at 12v during the summer when the winds are dead to get what power I could. Now we're getting in-between winds, typically 8 to 30 volts from the mill so I think it's a good time to get the booster working.


24 volt cut-in is between 220 and 300 watts, but there the volts are higher so the amps are less. I think that the boost should cut out around 12 amps.


Thanks again!

- Ed.

« Last Edit: October 11, 2007, 11:36:10 AM by elt »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #23 on: October 11, 2007, 12:07:21 PM »
> Consider scaling the negative steps.


That's a really good idea! I think that might help keeping the boost going through the cut-in region. Right now, though, I'm constrained from adding complexity as I'm out of 8k chips and am squeezing partial functionality into 4k versions until I can get some more... I'll let you know how that works out.


Thanks again,

- Ed.

« Last Edit: October 11, 2007, 12:07:21 PM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Toasted my new MPPT booster
« Reply #24 on: October 11, 2007, 08:25:53 PM »
Hello Elt,


Yes, I understood. Cut in is at 12 volts.


The real math is inductor charges at 12v * 20a = 240w

Inductor discharges into the battery at 24v * 20a / 2 = 240w. (half the time)

Thus charging of the inductor takes twice the time it takes to discharge at the higher voltage.

Add a third coil will get you up to 360w.


As the input voltage rises the power into the inductors will rise, the current will peak out faster to.

With the higher voltage in the ratio in / out becomes closer, so the relative discharge time will become longer.


You should consider continuous current in the inductor for control.


Have fun,

Scott.

« Last Edit: October 11, 2007, 08:25:53 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #25 on: October 12, 2007, 06:44:17 PM »
> You should consider continuous current in the inductor for control.


I've thought about that for some later version; the plan is that this mill is set up to be more efficient at high voltages (26v or more) so that the alternator would heat less (and not melt) in high winds ... that's why is has such a high cut-in RPM and why I need (planned for) a booster for low RPMs.


I think I've almost figured out the inductor charging times, the second to the last hurdle was the the discharge voltage isn't the battery voltage but (since there's "mill voltage" on one side of the coil) it's the battery voltage minus the mill voltage. That makes my power-based duty cycle calculations give the same results as the voltage based formula. However, I think that thinking of this booster as begin a voltage booster, at least in terms of the CoilCraft applet page isn't appropriate. The regular SMPS seems to think that you have all the input power you need to get the output voltage and power.


In the case of the mill, power isn't linear with input volts. So, the duty cycle calculations are fine for getting the output volts but how many times per second you can pulse that coil is determined by the watts available. In a first-pass calculation I can say that power in equals power out and compute the coil charge time, the coil discharge time, and then the period is the sum of the two, the frequency the inverse of that. What I hope is the last stumbling block is that I'm not sure what to use as the charge and discharge time. What I've read says 4 tau for 99% and 5 tau for 100%. If we used the same input numbers, it looks like you used 4 tau for your example... is that right?


I used 5 tau in my calculations just because it gave slightly longer turn on time to get and got past the 1% turn on time guideline that you've given.


Basically, I ran Alton's wind calculator (http://www.alton-moore.net/wind_calculations.html w/ a three 3 meter TSR 7 blades, the rest doesn't matter) to get RPM/watts numbers for my mill. My alternator makes a volt per 10 RPM so the results convert directly to "mill volts." I put those numbers in a spread sheet and calculate turn on and turn off times using 5 tau for the timing for a 50uH coil.




I think this shows why using a 1Khz PWM frequency gives me such "jerky" results. A 14us charge time is about right for 10volts, too much for less volts but the big impact was that if 14us is one bit, it's too big a jump to a 28us charge time... I haven't seen the mill run smoothly since I reduced the PWM frequency from 60Khz. (But the FET does run cooler!)


I think that varying the PWM frequency from 120Khz down to 30 Khz in my first mill was the right thing to do (but for the wrong reason as I was trying to reduce "ripple.")


What I think the right thing to do now is to preprogram a finer resolution version of the table above and instead simply changing the duty cycle, have the software move an index into the table that reprograms both the PWM frequency and duty cycle on a change.


The table will change a little once I take into account diode voltage drops and I don't have a good feel for how much blade and booster efficiency will change the numbers but I think what I can figure out will be good enough to try... I should have some results the beginning of next week.


- Ed.

« Last Edit: October 12, 2007, 06:44:17 PM by elt »

Boondocker

  • Full Member
  • ***
  • Posts: 193
Re: Toasted my new MPPT booster
« Reply #26 on: October 13, 2007, 08:11:36 AM »
In my studies of boost topology I found this sight.


http://schmidt-walter.fbe.fh-darmstadt.de/smps_e/aww_smps_e.html


Similar to Coilcraft calculator, but has graphics with a time trend.


Wouldn't it be easier to limit the boost range from 15 to 26 volts and use a mid range switching frequency of 30 kHz, for example?


My current understanding, to extract low amperage will require a large inductor or very high switching frequency.


Boondocker

« Last Edit: October 13, 2007, 08:11:36 AM by Boondocker »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #27 on: October 13, 2007, 10:30:47 AM »
My current understanding, to extract low amperage will require a large inductor or very high switching frequency.


That was my first impression too but Scott talked me out of it. (Actually, I think that Flux tried to point me in the right direction but I wasn't far enough along to understand at that time.) My new watchwords are "Energy got to go somewhere."


The charge time for the coil ("tau") is "I * L/V" ... so, indeed, if amps are small the time period is small and the PWM frequency is high and you can bring the frequency down if you use a larger inductor (because you'd be multiplying the amps by a larger L.)


But the wind isn't steady (like a power outlet is) and to me it doesn't really matter if you're reexamining things every few seconds or every few microseconds ... you still have to change the operating characteristics if you want to do maximum power point tracking.


True, I've observed while operating the booster in manual mode that fixed settings for about 17 volts gets a pretty good power out of the mill at both higher and lower speeds. But that's my "I give up" position and it's not my nature to give up easily!


Wouldn't it be easier to limit the boost range from 15 to 26 volts and use a mid range switching frequency of 30 kHz,


Sure. But I'm not in a hurry and I only have to do it the hard way once to get the benefits for the rest of the life of the mill (and other mills to come) and I'll share the results so hopefully it will help other folks too.


It will also depend on the microprocessor ... the one I'm using has a 64Mhz PWM clock so "really fast" PWM is only an issue in that too short of pulse will heat the output FET.


The other thing is that this particular "tiny" micro only has 8 bit counters so there's a limit to the power range that it can control. Because the power increases exponentially though, 8 bits doesn't give smooth control over the 15 to 26 volts range. A 16 bit counter in a "mega" chip might to better. I've got the larger table calculated for the 8 bit counter and a single clock frequency will handle 6 to 17 volts but I have change the clock 3 more times to get from 17 volts to 26 volts... and that's basically my point: Changing duty cycle alone if fine for handling a linear or fixed power source but I think that a little bit more work will give better control of the power curve generated by the wind. That's my theory anyway!


 - Ed.

« Last Edit: October 13, 2007, 10:30:47 AM by elt »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Toasted my new MPPT booster
« Reply #28 on: October 13, 2007, 11:55:01 AM »
Hello Elt,


The link Boondocker put in is a great help.

Nobody busted my chops for what I said.

I am a bit rusty on switchers, so this was a good refresher.


Use the link mentioned and enter 26v output, 12v input. Iout = 10a, 4khz, 220uH.

Notice the inductor voltage is 26.7v, this is what sets the ratios of input to output.

The charging time for the inductor is longer than the discharge time. Not by much. The power ratio is not 12:26 as I suggested before. The input voltage is the floor for the boost so it's more like 12:(26-12) or 12:14, the side that is smaller will have the longer on/off time.

Then try Vin=13.4v, the on/off times are equal.

At Vin=15v, the on is now smaller than the off time.


Just to clarify on is with FET on, Off the inductor is discharging into the battery.

Notice the plots are showing continuous inductor current!

Also notice the inductor current peak is 2x or more than the output current.

You must limit inductor current to it's rating, exceeding very bad.


At Vin=20v, the on time is 62.7us off time is 187.3us Notice the inductor current average is now 16a, so you can boost the output current to about 14a to max out the inductor current and total power going into the battery (364 watts). Since your below cut in you do not have this much power available.


200w at cut in. 1/8 that at half cut in or 25w.


Measuring RPM does not give you the information you may think, little actually.

Betz limit is based on the max power transferred from the wind into the blade, this is based on the blade speed is half the wind speed. The unloaded blade will spin twice as fast, just as an over loaded blade will spin at less than half! The blade calculators RPM are based on a properly loaded blade.


Since you can dynamically load the blade RPM does not necessarily tell the whole story that you need to know.


Solar MPPT varies the load very quickly to find max power, to do this on a wind system will take quite a while (seconds?) waiting for the system to respond to the load changes. Worst the wind is rarely constant so you would be always behind what the wind is doing. Take a look at the big wind turbines, they all measure wind speed to adjust the load for max power transfer.


For your system I expect measuring wind speed to be... undesired?


I will think on this, get back with you if I come up with any ideas. Quick search is not finding much.


Have fun,

Scott.

« Last Edit: October 13, 2007, 11:55:01 AM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #29 on: October 13, 2007, 03:04:31 PM »
Hi Scott,


I'm going to stick to my guns for at least one more post.


> [...] enter 26v output, 12v input. Iout = 10a, 4khz, 220uH.


I imagine I've rambled on a bit and that I've been less than clear at times... :-)


The mill won't make 10 amps and 12 volts at the same time and that's why I think that the SMPS simulators only apply so far WRT to wind power... the simulators assume that you have all the power you want to make the output voltage and current required. With a mill you are limited to what your blades and reap from the wind and that varies (exponentially) with the wind speed.


The wind power calculator uses the kinetic energy of the wind, the Betz limit and (as far as I can tell) an estimate of 50% blade efficiency to tell you what power you can get out of the wind. Efficiency will vary from mill to mill but what you get is what you got to work with. No varying of the inductor on and off times will get you more.


RPM's are calculated from the design data of the blade. I've always assumed that Alton calculates/estimates the RPM under load because giving a watt figure at an unloaded RPM just doesn't make sense to me. No, it doesn't mean that if the mill spins the listed RPM you'll get the listed power but if you've loaded the alternator to the maximum power point, I assume that you would. That is if your mill extracted the 28% of the wind power that Alton assumes. I don't have the ability to measure the mills performance precisely but at least "casually" it pretty much does what Alton's calculator predicts.


So "no" you can't plug in the voltage/RPM into the power table and expect to get the power listed in the chart. You still have to "perturb and observe" (or what ever the MPPT algorithm in use is) to move up and down the chart to find the maximum power. My point is that the power curve (both input and output) being moved upon is not a straight line but rather a curve. The duty cycle to achieve a certain output voltage is fixed, the only degree of freedom you have to match the input power available is the charge time of the coil (and then the discharge time on the output is constrained and then the PWM period is the sum of the two.)


With one amp available at 12 volts, the on pulse is shorter than if you had two amps available at 12 volts. The duty cycles are the same so it's the PWM frequency (assuming you repeated the "on" pulses) that must be different.


If you don't vary the frequency, then at some duty cycles the pulse will be too short to take all the power available and other others too long and overload the mill (and slow it down.) Taken to an extreme, imagine a 50% duty cycle with an hour on time and an hour off time. When on, the FET would simply be shorting out the mill through the coil and the mill wouldn't turn. When off, the mill would spin unloaded and not make any power either.


What do you think of that?


> For your system I expect measuring wind speed to be... undesired?


"Unavailable" at this time. Using a device that wasn't coupled to the mill (like a separate anemometer) would let you learn the MPPT curve and then go straight to the right power point. You can't tell from the mill, though, because RPM can vary at the same wind speed depending on the loading.


(This solid state anemometer

http://www.fieldlines.com/story/2004/2/17/91311/0908

is on my short list of projects to do be done. I'm thinking of ways to hang one in front of my blades and another behind it assuming that the difference in wind speed will tell me interesting things...)


Thanks again,

- Ed.

« Last Edit: October 13, 2007, 03:04:31 PM by elt »

Boondocker

  • Full Member
  • ***
  • Posts: 193
Re: Toasted my new MPPT booster
« Reply #30 on: October 13, 2007, 04:49:50 PM »
To make sure I'm interpreting things right.  The attached example represents a saturated inductor resulting in a "dead short" or in our application a "dynamically braked" turbine?




« Last Edit: October 13, 2007, 04:49:50 PM by Boondocker »

scottsAI

  • Hero Member
  • *****
  • Posts: 884
Re: Toasted my new MPPT booster
« Reply #31 on: October 13, 2007, 11:38:56 PM »
Hello Boondocker,


No not a dead short! Working just fine!


I made a plot singular to yours while working to answer Elt comments.

Unfortunately Elt will have to wait for tomorrow to get an answer.

I need to make sure my answer is precise to avoid confusion, which takes a lot of time. This was a quick answer.


The plots represents discontinuous inductor current.

The average is 1a in the lower figure. The inductor peak current is 4.12a, flows for less than 25% of the time to get an average of 1 amp. (slight rounding)

The cycle frequency must be around 30khz and the inductor is much less than 220uH Elt is using.

As a guess 20uH?


Middle figure the inductor current average is higher due to the 15v input voltage.


First plot shows the inductor voltage returning to the input voltage with a bit of a swing on it to make it look real. (Middle step to right)


Have fun,

Scott.

« Last Edit: October 13, 2007, 11:38:56 PM by scottsAI »

elt

  • Sr. Member
  • ****
  • Posts: 328
Re: Toasted my new MPPT booster
« Reply #32 on: October 14, 2007, 08:31:41 AM »
Hi boondocker,


You're not going see a "short" in the simulator. What you will see is that when the  PWM period is longer/slower compaired to the minimum charge and discharge time required by the coil, the higher the input current spike is (IsubL).


I couldn't enter a 1/hour PWM into the simulator, it only when down to 100Hz. Even then, it was easy to see peaks of 40 amps required with just a few watts out... This page (http://www.allaboutcircuits.com/vol_1/chpt_16/3.html) us a quick example showing the voltage drop and current through an induct when it's left "on." (Though it's a chart and not a graph.)


In a more practical case where my mill is only making 5 watts, (which is .1667 amps out), Setting the simulator or 1Khz with a 50uH inductor (Scott, I have two 100uh in parallel for 50uH total), the peak input current required is almost 13 amps. Where's that current going to come from?


If the booster is plugged into the wall socket, no problem, but you're going to need a really big cap (which I'll need to read the equivalent math for caps that I've read for inductors before I can say how big) to store that current in between pulses.


Use the same PWM for when my mill is making 15 volts and 1.667 amps (50 watts at 30 volts) and you need a (max) 35 amp current at input. The mill is averaging 3.33 amps in (50 watts at 15 volts) ...  Where's the current coming from?


If you don't have an input cap, it's a short.


I'm not sure what cap value is needed but with slow PWM's I know that I don't have it. As the current need peaks, the mill stutters and bangs.


But that's just part of the "problem" that I see. Look at the pulse times versus the period. With a 1Khz frequency, and an 8 bit PWM you get a 4uS resolution and that's a little chunky compared what's needed to represent the power curve of the mill. (BTW: it looks to me that there's a formating error in the graphs for the first pulse as the numbers shown with the second pulse are consistent.)


So just enter a larger PWM frequency into the simulator until you see the input current curve smooth out. Likewise, consider the 8 bit limitation of the PWM and pick the best clock frequency to represent the on and off times most accurately... it's work, but it's only done once.


- Ed

« Last Edit: October 14, 2007, 08:31:41 AM by elt »