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.