Max Switching Frequency for PN2222a

Thread Starter

Xavier Pacheco Paulino

Joined Oct 21, 2015
728
Hello,

I want to generate a pwm signal from a microcontroller and drive a 12V motor, as shown in the picture. Looking at the datasheet I could not figure out the max frequency I am allow to apply. What is the max frequency of pwm signal I can apply to the base of this transistor? I guess 2Mhz should be appropriate for this kind of application, shouldn't be?
 

Attachments

GopherT

Joined Nov 23, 2012
8,009
Hello,

I want to generate a pwm signal from a microcontroller and drive a 12V motor, as shown in the picture. Looking at the datasheet I could not figure out the max frequency I am allow to apply. What is the max frequency of pwm signal I can apply to the base of this transistor? I guess 2Mhz should be appropriate for this kind of application, shouldn't be?

Most PWM motor controllers switch at 12k to 25k Hz.

Transistors start to build heat called "switching losses" so minimize switching to what is needed, not possible.

Also, resolution of your duty cycle is important so you can have many steps of speed control between full on and stop. If your Pwm carrier frequency is 2MHz, what CPU speed would you need to allow 8-bit control of duty cycle (256 steps) from stop to full speed. Pretty high, right?
 

Thread Starter

Xavier Pacheco Paulino

Joined Oct 21, 2015
728
Most PWM motor controllers switch at 12k to 25k Hz.

Transistors start to build heat called "switching losses" so minimize switching to what is needed, not possible.

Also, resolution of your duty cycle is important so you can have many steps of speed control between full on and stop. If your Pwm carrier frequency is 2MHz, what CPU speed would you need to allow 8-bit control of duty cycle (256 steps) from stop to full speed. Pretty high, right?
Thanks for replying.

I do not have much experience in this kind of application, so I was not sure when talked about 2 Mhz. I started to research and you are right, 12-25KHz is okay,
 

GopherT

Joined Nov 23, 2012
8,009
Thanks for replying.

I do not have much experience in this kind of application, so I was not sure when talked about 2 Mhz. I started to research and you are right, 12-25KHz is okay,
The default values for arduino are very low (several hundred HZ). You have to adjust the prescaler values to increase from the initial default. Note, however, if you change the default Pwm frequency, other features are impacted. For example, delay and other features depend on those prescaler values to carefully research the documentation to make sure everything works as you expect.
 

Thread Starter

Xavier Pacheco Paulino

Joined Oct 21, 2015
728
The default values for arduino are very low (several hundred HZ). You have to adjust the prescaler values to increase from the initial default. Note, however, if you change the default Pwm frequency, other features are impacted. For example, delay and other features depend on those prescaler values to carefully research the documentation to make sure everything works as you expect.
Thank you.

Actually I am using the STM32F103 Discovery Board. I will look into its documentation carefully.
 

MrAl

Joined Jun 17, 2014
11,492
Hi,

There's one more little caveat with these circuits that attempt to dump energy when the transistor turns off.
That is, the motor control may not be linear with PWM pulse width if the 'diode' dumps the total back emf energy from the motor for some pulse widths and not other pulse widths in the PWM. This may or may not affect your application as it depends how linear you need that to be. Applications that relay on forward control only would be affected the most while those that depend on feedback will be affected less.

2MHz sounds much too high though. I would say 20KHz as a max, maybe a little higher. The audible noise becomes a factor in some applications too.
 

WTH

Joined Apr 10, 2017
1
2MHz is more than enough bandwidth for your application.
You may consider looking online at a few sample FET circuits. The PN2222a could be 'overworked' depending on the current need for the motor. A FET could slightly reduce the part count of your circuit and provide a better current/heating spec than the PN2222a.

Good luck!
 
Top