# Need help on PWM signal and MOSFET selection

Started by December 10, 2004
 Hi. I would like to seek for advice for my PWM signal. In order to achieve an 8-bit resolution, can anyone recommend which is the best among the following? First Approach: > Crystal for my PIC microcontroller = 4Mhz > Frequency of my PWM = 10kHz > With reference to the formula in the datasheet of PIC16F876, I will obtain a resolution of 8.64 bits Second Approach: > Crystal for my PIC microcontroller = 4Mhz > With reference to the formula in the datasheet of my PIC16F876, I will obtain a resolution of 8 bits > Frequency of PWM obtain at this level = 15.625kHz Should I first determine the resolution in bits before I calculaqte to obtain a round number of resolution in bits? OR should I first determine the operating frequency of my PWM then the resolution in bits? Thanks in advance... If I chose to use logic-level MOSFET to perform switching for my DC/DC converter, do I still need MOSFET driver? Advice really needed. Thank you very much.
 What is the project? What are the priorities. Speed of PWM usually determines many other things. Is overall clock accuracy important, etc. Resolution of PWM will determine resolution/accuracy of what every you are doing with it. Chad --- devonsc <> wrote:> > Hi. I would like to seek for advice for my PWM signal. > In order to achieve an 8-bit resolution, can anyone recommend which > is the best among the following? > > First Approach: > > Crystal for my PIC microcontroller = 4Mhz > > Frequency of my PWM = 10kHz > > With reference to the formula in the datasheet of PIC16F876, I > will obtain a resolution of 8.64 bits > > Second Approach: > > Crystal for my PIC microcontroller = 4Mhz > > With reference to the formula in the datasheet of my PIC16F876, I > will obtain a resolution of 8 bits > > Frequency of PWM obtain at this level = 15.625kHz > > Should I first determine the resolution in bits before I calculaqte > to obtain a round number of resolution in bits? > > OR should I first determine the operating frequency of my PWM then > the resolution in bits? > > Thanks in advance... > If I chose to use logic-level MOSFET to perform switching for my > DC/DC converter, do I still need MOSFET driver? > > Advice really needed. Thank you very much. > > ===== My software has no bugs, only undocumented features. __________________________________________________
 Hi Chad, Sorry, I should have explain in detail from the beginning. I'm actually developing a boost DC/DC converter. I intend to manipulate the MOSFET used in my converter with the PWM signal from a PIC microcontroller. In this PIC, it will be able to obtain feedback from the battery (load of the boost DC/DC converter) to control the MOSFET. In other words, I intend to have a varying PWM signal to avoid overcharge of the battery. In my case, does it mean that I should have frequency of the PWM as my first priority? By the way, if there is anything wrong that I'm doing in my project, would you mind correcting me? Newbie here...Thanks a lot in advance --- Chad Russel <> wrote:> What is the project? What are the priorities. > Speed of PWM usually > determines many other things. Is overall clock > accuracy important, > etc. Resolution of PWM will determine > resolution/accuracy of what > every you are doing with it. > > Chad > --- devonsc <> wrote: > > > > > Hi. I would like to seek for advice for my PWM > signal. > > In order to achieve an 8-bit resolution, can > anyone recommend which > > is the best among the following? > > > > First Approach: > > > Crystal for my PIC microcontroller = 4Mhz > > > Frequency of my PWM = 10kHz > > > With reference to the formula in the datasheet > of PIC16F876, I > > will obtain a resolution of 8.64 bits > > > > Second Approach: > > > Crystal for my PIC microcontroller = 4Mhz > > > With reference to the formula in the datasheet > of my PIC16F876, I > > will obtain a resolution of 8 bits > > > Frequency of PWM obtain at this level = > 15.625kHz > > > > Should I first determine the resolution in bits > before I calculaqte > > to obtain a round number of resolution in bits? > > > > OR should I first determine the operating > frequency of my PWM then > > the resolution in bits? > > > > Thanks in advance... > > > > > > If I chose to use logic-level MOSFET to perform > switching for my > > DC/DC converter, do I still need MOSFET driver? > > > > Advice really needed. Thank you very much. > > > > > > > > ===== > My software has no bugs, only undocumented features. > > __________________________________________________ > > __________________________________
 I am working on almost the same thing now as part of a larger project, but since my power is very low, I am using fixed width pulse modulation. No reason it should not work. The trend these days is to run the SMPS as high in freqency as possible to reduce inductor size, since the MOSFET can handle the high freqencies without a problem. Designing a SMPS can be tricky, if high quality is desired. If you don't need excellent regulation and tansient response, then it is a piece of cake. --- Devon Lee <> wrote:> Hi Chad, > > Sorry, I should have explain in detail from the > beginning. I'm actually developing a boost DC/DC > converter. I intend to manipulate the MOSFET used in > my converter with the PWM signal from a PIC > microcontroller. > > In this PIC, it will be able to obtain feedback from > the battery (load of the boost DC/DC converter) to > control the MOSFET. In other words, I intend to have a > varying PWM signal to avoid overcharge of the battery. > > In my case, does it mean that I should have frequency > of the PWM as my first priority? > > By the way, if there is anything wrong that I'm doing > in my project, would you mind correcting me? Newbie > here...Thanks a lot in advance > > --- Chad Russel <> wrote: > > > What is the project? What are the priorities. > > Speed of PWM usually > > determines many other things. Is overall clock > > accuracy important, > > etc. Resolution of PWM will determine > > resolution/accuracy of what > > every you are doing with it. > > > > Chad > > --- devonsc <> wrote: > > > > > > > > Hi. I would like to seek for advice for my PWM > > signal. > > > In order to achieve an 8-bit resolution, can > > anyone recommend which > > > is the best among the following? > > > > > > First Approach: > > > > Crystal for my PIC microcontroller = 4Mhz > > > > Frequency of my PWM = 10kHz > > > > With reference to the formula in the datasheet > > of PIC16F876, I > > > will obtain a resolution of 8.64 bits > > > > > > Second Approach: > > > > Crystal for my PIC microcontroller = 4Mhz > > > > With reference to the formula in the datasheet > > of my PIC16F876, I > > > will obtain a resolution of 8 bits > > > > Frequency of PWM obtain at this level = > > 15.625kHz > > > > > > Should I first determine the resolution in bits > > before I calculaqte > > > to obtain a round number of resolution in bits? > > > > > > OR should I first determine the operating > > frequency of my PWM then > > > the resolution in bits? > > > > > > Thanks in advance... > > > > > > > > > If I chose to use logic-level MOSFET to perform > > switching for my > > > DC/DC converter, do I still need MOSFET driver? > > > > > > Advice really needed. Thank you very much. > > > > > > > > > > > > > > > > > > ===== > > My software has no bugs, only undocumented features. > > > > __________________________________________________ > > ===== My software has no bugs, only undocumented features. __________________________________
 --- In , "devonsc" wrote:> > > If I chose to use logic-level MOSFET to perform switching for my > DC/DC converter, do I still need MOSFET driver? > Hi The gate of the mosfet may well be spec'ed at 'logic level' (typ 3 volts saturation) but you have to drive it to above 3volt 'on' AND below the off point for proper minimum dissipation. This may be no big deal at d.c or low frequencies but the gate of power mosfets has a considerable capacitance, often from 3 to 10nF which becomes significant the higher the frequency goes. There are 2 problems, first the rising edges of the PWM out the micro's pin see's something that initially looks remarkably like a short circuit or very low impedence, the current able to be supplied is limited (20-25mA) so the edge experiences an voltage drop, seen as a curved rise, the same at turn off. As the capacitor charges the voltage drop decreases and the wave rises. This will have the mosfet in the linear region of its transfer curve and as such dissipating a fair bit of heat in the case of power switching. The other problem is the gate capacitance can 'ring' and even start up unwanted oscillations. To mitigate this a gate resistance is often used (typ 10 to 100R) and a fet driver able to deliver the current at the desired frequency. The formulas for charge rise/fall in a capacitor as well as plenty of application notes are available on the web from well known mosfet manufacturers. Beware of over voltage spikes on both the channel and gate to source/drain as the mosfet can be damged in nanoseconds. BTW.... Most problems I have seen in designs is that the fet is turned on all well and good but not off very well. Lance
 You have never said if you need a high side driver or low side. If you are using reasonable voltages (< 50V) and currents you might look at this device http://ec.irf.com/v6/en/US/adirect/ir? cmdProductDetailFrame&productID=IPS0151: These devices have a built-in MOSFET driver, overcurrent protection and appear quite easy to use. There are other Intelligent Power Switch devices - just search through the Automotive section at www.irf.com Yahoo messes up the URL but the device is an IPS0151 and you can search directly at www.irf.com It appears that the device would prefer to operate in the 1 kHz range, particularly if the output is shorted. --- In , "Lance" wrote:> > --- In , "devonsc" wrote: > > > > > > If I chose to use logic-level MOSFET to perform switching for my > > DC/DC converter, do I still need MOSFET driver? > > > > Hi > The gate of the mosfet may well be spec'ed at 'logic level' (typ 3 > volts saturation) but you have to drive it to above 3volt 'on' AND > below the off point for proper minimum dissipation. > This may be no big deal at d.c or low frequencies but the gate of > power mosfets has a considerable capacitance, often from 3 to 10nF > which becomes significant the higher the frequency goes. > There are 2 problems, first the rising edges of the PWM out the > micro's pin see's something that initially looks remarkably like a > short circuit or very low impedence, the current able to be supplied > is limited (20-25mA) so the edge experiences an voltage drop, seen > as a curved rise, the same at turn off. As the capacitor charges the > voltage drop decreases and the wave rises. > This will have the mosfet in the linear region of its transfer curve > and as such dissipating a fair bit of heat in the case of power > switching. > The other problem is the gate capacitance can 'ring' and even start > up unwanted oscillations. > To mitigate this a gate resistance is often used (typ 10 to 100R) > and a fet driver able to deliver the current at the desired > frequency. > The formulas for charge rise/fall in a capacitor as well as plenty > of application notes are available on the web from well known mosfet > manufacturers. Beware of over voltage spikes on both the channel and > gate to source/drain as the mosfet can be damged in nanoseconds. > BTW.... > Most problems I have seen in designs is that the fet is turned on > all well and good but not off very well. > Lance