晶体管和PWM


8

我对此不太困惑,也不知道从哪里开始。这个想法是让微控制器或FPGA输出PWM信号(PWM为100%时为5V或3.3V),然后使用晶体管为需要12V运行的通风机供电。

我知道我需要将呼吸机电源的接地端与FPGA(或μC)的电源端连接在一起。之后,我将电阻与晶体管的集电极串联以限制电流。

困扰我的部分是如何连接基座和PWM输出引脚?如果要使3.3V为100%,我需要选择哪个电阻值?如果我希望5V为100%,则需要哪个值?我的意思是,当需要以100%的容量为呼吸机供电时,我该如何“告诉”一个3.3V(或我正在运行的任何其他电压)的晶体管?

希望你能理解我的问题。谢谢您的任何回答!


1
这听起来很熟悉:我写了一篇关于该主题的博客文章(至少对于MOSFET而言)-Embeddedrelated.com/showarticle/77.php
Jason S

Answers:


22

(两级)PWM信号具有两种状态:高和低。无论您的FPGA / MCU的电源是5 V还是3.3 V,您都希望低状态在风扇两端变为0 V,高状态在风扇两端变为12 V(反之亦然)。这样,通过改变PWM信号的占空比,您将能够在风扇的整个工作范围内驱动风扇。

晶体管(可以是BJT或MOSFET)必须完全关断或完全导通,以尽可能减少功耗。如果电源为12 V,则不需要与风扇串联的任何电阻。晶体管的集电极或漏极将直接连接至风扇。另外,与风扇并联使用肖特基二极管,以使阴极位于+12 V节点处,而阳极位于集电极或漏极处。风扇是一个电感性负载,一旦关闭晶体管,就需要为其电流提供路径。否则,可能会在晶体管的集电极/漏极上积聚过多电压,并可能损坏它。

假设BJT:您只需要一个与基极串联的电阻来限制基极电流。我们需要知道您的风扇在12 V时消耗多少电流(我们称其为),以及晶体管的(从到的电流增益)。通过以下方式选择电阻器:IfanβIbaseIcollector

R1=Vsupply0.710Ifanβ

Vsupply is 3.3 or 5. The factor 10 is to have enough margin as to make sure that the BJT will never work in the linear region.

Schematic


you're answers are so good and relatively detailed. Puts ppl like me to shame :(
efox29

@efox29 Thank you, but never a shame.
Telaclavo

Proportional to D, not 1D. The transistor indeed inverts: collector is low when input voltage is high, but makes that the voltage over the fan is 12V when input is high. No inversion here.
stevenvh

@stevenvh Right, just a lapsus. I'll edit.
Telaclavo

1
@xx77aBs β(f) is in fact a function of frequency. hFE is β at DC (f=0), and for common-emitter configuration (as in this case). So, strictly, I should have written hFE, but it is common to use β instead.
Telaclavo

10

I see that Telaclavo has given you a good answer for a bipolar transistor. Here is what it would look like with the right kind of FET:

For low voltages like 12 V, FETs are available that turn on well enough with only 5V or even 3.3V on the gate. These are sometimes called logic level FETs. The gate can then be driven directly from a CMOS digital output.

The diode is essential to not damage the FET. A motor will look inductive, so when you attempt to switch it off it will raise its voltage to whatever it takes to maintain the current until the resulting reverse voltage eventually causes the current to go to 0. This is sometimes called inductive kickback. Without the diode, that kickback current has no place to go and would raise the FET drain to a high voltage so that the FET eventually breaks down and thereby allows the current to flow. This is not good for the FET. A Schottky diode is a good idea here since they are fast, and at your low voltage they are readily available for suitable characteristics.



3

Another angle on this problem is to use a fan with a dedicated PWM input. Many suppliers offer this as a standard feature.

In my experience, many brushless DC fans don't like operating with chopped input power - you aren't able to get fine control of the RPM. Using a dedicated PWM input allows you very fine control of the speed, and since you're controlling a digital input (not chopping power) you only need a modest MOSFET and don't need a clamping diode.

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.