Mike Riendeau wrote: > However, the application doesn't require a large output > current, probably a couple of amps peak during the energy > storage cycle, so a mosfet smaller than a TO220, with a > less-than-ideal switching transition would probably be ok in this > application. Again, in my experience with switching power supplies of this type, you want to have very hard MOSFET on/off transitions. If you don't, you will have a less-than-efficient design. This extra power loss winds up mostly in the MOSFET. So if you want to use a smaller FET with less than ideal switching characteristics, you will need a rather larger heat sink, and even then you are likely to exceed the junction temperature. I've fried a few MOSFETs this way before. > Hamish mentioned he was using the '71 which doesn't have a PWM output. > If he has enough overhead in his code to provide a software PWM, than > it would most likely not function during software crashes or power-up. > I can imagine might be more of a concern if he used the hardware PWM > on the '74 for example. PWM safety: Both flyback and boost DC-DC converter topologies have a DC path from power to ground when the MOSFET is turned on. If the PIC fails in a mode with the MOSFET turned on, something will get toasted (hopefully just the fuse). My real concern is if you have an external PWM IC and wish to fiddle with the feedback voltage. If the PIC fails in mode that tells the PWM to put out maximum voltage, it's possible to produce dangerously high voltages. Concerns about PWM ICs: People have been using hardware PWM's for years with much success. There are many many features in them that make them very reliable. I really don't think there should be a concern about them. Think about what they do and what you would have to do with a PIC to get the same functionality. First, there is a voltage feedback circuit that varies the pulse width based on the converter's output voltage. The loop response is typically on the order of milliseconds. This could be implemented with a PIC. However, in the current-mode PWM's, there is another feedback circuit that senses the cycle- by-cycle switching current. If the current exceeds a certain threshold, the FET is turned off. The response time of this loop is on the order of micro- seconds. You would be hard pressed to reliably implement this with a PIC (and do anything else at the same time). There are several other features like under voltage lock-out, integrate MOSFET drivers, etc. that would also be difficult to implement. (In fact, a MOSFET driver e.g. ICL7667 costs almost as much as a UC3842 PWM). Hamish wrote: > Thanks to Scott and Mike etc. for the replies. I'm still not sure that what > I'm trying to do is the most practical thing to do - I was more sounding > things out to see if anyone else had done this sort of thing. In my last battery charger design I wanted to use a microcontroller too. However, I wasn't convinced at the time (and neither were my peers or my boss) that it was the best thing to do. My opinion has definitly changed. The only reason you don't see more microprocessors in power supplies/battery chargers is that the analog guys for the most part think PICs are something used to break rocks with. (Given enough time I'm sure someone will write a program to do that). If you look at the flexibility vs dollars spent, there is no doubt that a PIC is an excellent choice for a design like yours. I'll address your specfic battery/charging algorithm in a seperate e-mail off-line. Scott