Author Topic: mosfet and PWM  (Read 5747 times)

0 Members and 1 Guest are viewing this topic.

Offline Oy1rTopic starter

  • Contributor
  • Posts: 18
  • Country: fo
Re: mosfet and PWM
« Reply #25 on: August 06, 2021, 04:55:34 pm »
This is what i had in mind, it worked with a single mosfet and small fan on the breadboard, i imagine/hope it would work scaled up to the 400w motor. I`m running of a lead acid battery  so ~12v, the mosfets are 30v 30a, and i think 3 or 4 in parallel ought be enough.
Any input will be fine, am i missing something obvious or is it good to go ?


I can set the PWM freqeuncy on the arduino between 490Hz and up towards 60KHz. PWM duty cycle is controlled with the pot.

 
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14564
  • Country: fr
Re: mosfet and PWM
« Reply #26 on: August 06, 2021, 05:42:40 pm »
To select a proper PWM frequency, you'll need to look at the gate signal on a scope and see what you get. I haven't looked at datasheets to tell you whether you can go up to 60 kHz with this setup without significant losses. But one thing to know as well is that motors themselves have losses when using PWM at a high frequency. I have rarely seen electric motors driven with PWM at higher freq than 20 ou 30 kHz max. YMMV.

Note that, unrelated to efficiency: if the PWM freq is within the audio range, you will distinctly hear an annoying "whine". Whether this matters in your application is up to you, but it can also be a criterion for choosing the frequency.

 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: mosfet and PWM
« Reply #27 on: August 06, 2021, 06:15:00 pm »
To select a proper PWM frequency, you'll need to look at the gate signal on a scope and see what you get.
Yeah, that should be revealing. A 5V MCU through a 100R resistor allows up to 50mA. I doubt the MCU pin is rated for 50mA in either direction so it's going to see significant stress. And the MCU pin is charging and discharging four MOSFET gates in parallel. Methinks there will be some serious peak currents in both directions limited only by that 100R and whatever gate resistances the MOSFET's happen to have (likely single digit ohms). Presuming the resulting charge/discharge periods are longish and have slow slew rates, that will put a LOWER limit on the desirable PWM frequency (to minimize losses).

And this doesn't even address the question of dissimilar current sharing.

At the very least, this application screams for a gate driver IC. They're like $0.50. Spend the money. You'll thank us later.
 

Offline Oy1rTopic starter

  • Contributor
  • Posts: 18
  • Country: fo
Re: mosfet and PWM
« Reply #28 on: August 06, 2021, 08:00:24 pm »
the arduino can put out various pwm frequencies on different pins so i can experiment, see what suites best, most torque least audible etc.

The spec sheet says abs max per single pin 40mA. I could increase the resistor  to 470ohm and have 10mA on the pin.
As for IC gate drive it will have to wait at first(10 days to order anything, i live on an island)

Can't i just use a transistor or mosfet to drive the gates ?



 

Offline IDEngineer

  • Super Contributor
  • ***
  • Posts: 1926
  • Country: us
Re: mosfet and PWM
« Reply #29 on: August 06, 2021, 08:25:58 pm »
Sure! And once you're done making an active source+sink drive circuit, that avoids shoot through, etc. you will find you've spent far more money and time to not quite recreate what that dedicated gate driver IC would have delivered. If you want to do it as a learning exercise I'm totally supportive, but if you're trying to solve a problem and move on the answer is clear.
« Last Edit: August 06, 2021, 10:16:28 pm by IDEngineer »
 

Offline Oy1rTopic starter

  • Contributor
  • Posts: 18
  • Country: fo
Re: mosfet and PWM
« Reply #30 on: August 06, 2021, 10:34:11 pm »
where do you get 0.5$ mosfet drivers ?
 

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14564
  • Country: fr
Re: mosfet and PWM
« Reply #31 on: August 06, 2021, 11:37:42 pm »
where do you get 0.5$ mosfet drivers ?

https://www.digikey.com/en/products/filter/pmic-gate-drivers/730
A lot of them...

Of course if you're looking at chinese parts, you may even be able to find some at under $0.1...
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8193
  • Country: fi
Re: mosfet and PWM
« Reply #32 on: August 07, 2021, 06:30:35 am »
You really need current sense for such large motor. Large motors tend to be high efficiency, meaning stall current is possibly order of magnitude more than nominal nameplate current. Without current sensing, this leads to massive and expensive oversizing of everything, and poor performance and efficiency due to lack of torque limiting.


The solution is simple: a shunt resistor between bottom MOSFET source lead and ground, something like 0.001 ohms, calculate for max power dissipation (I^2 * R). Then a current shunt amplifier. Look at "current sense amplifier" category, a small IC costs something like $0.50.

For example, if max motor current = 60A, a 0.001 ohm shunt generates U = R*I = 60mV voltage. If you use an amplifier with gain=50, you'll get a 60mV * 50 = 3V signal from 60A motor current. The shunt dissipates (60A)^2 * 0.001ohm = 3.6W, get one rated at 5W.

Then you can route this measurement signal to the "Analog Comparator" pin of the microcontroller, and generate a comparison level (say 3.0V equaling the 60A) with a resistor divider, or a potentiometer. Once the motor current exceed this limit, you get a software interrupt, where you can instantly turn the MOSFET off, terminating the PWM cycle early.
« Last Edit: August 07, 2021, 06:32:15 am by Siwastaja »
 

Offline RES

  • Regular Contributor
  • *
  • Posts: 109
  • Country: 00
Re: mosfet and PWM
« Reply #33 on: August 07, 2021, 08:57:43 am »
I heard somewhere that driving logic level mosfets with PWM can become problematic because of frequency, why would this be and what is the max freq ?

Not a problem if you don't and are able go into the MHz. High(er, few MHz) frequency PWM is  used in factory dc-dc converter chips, have built-in transistor(s) or MOSFET(s) and gate driver(s) (high speed current sink driver stages)

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14564
  • Country: fr
Re: mosfet and PWM
« Reply #34 on: August 07, 2021, 03:54:41 pm »
Adding current sense and overcurrent protection is definitely a good idea here.
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3200
  • Country: au
Re: mosfet and PWM
« Reply #35 on: August 07, 2021, 10:49:16 pm »

I heard somewhere that driving logic level mosfets with PWM can become problematic because of frequency, why would this be and what is the max freq ?
I think logic level mosfets have a higher gate-source capacitance than normal mosfets so achieving a fast rising and falling edge on the gate drive is that much harder.
 

Online Sal Ammoniac

  • Super Contributor
  • ***
  • Posts: 1684
  • Country: us
Re: mosfet and PWM
« Reply #36 on: February 11, 2022, 07:19:12 am »
A gate driver also allows you to use an N-channel MOSFET on the high side rather than a P-channel. N-channel MOSFETs typically have lower Rdson than P-channels.

Another way to measure current that doesn’t involve a shunt is to use a toroid and a Hall effect sensor. This is isolated from the current flowing through the MOSFET with an air gap.
Complexity is the number-one enemy of high-quality code.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf