Electronics > Beginners

Controlling the speed of a DC motor via PWM

(1/14) > >>

engineheat:
Hi,
I would like to control the speed of this DC motor with PWM using an Arduino:

https://www.delta-fan.com/products/BFB0712HD.html

I found the following diagram to use:



Notice the flyback diode D1. When buying a diode, what specs do I need to watch out for in order to ensure it is suitable? Should I also include resistors or capacitors in series with the flyback diode? I'm considering this diode:

https://www.digikey.com/en/products/detail/nte-electronics-inc/1N5401/11644131

But I'm not too clear on what some of the specs mean:

Voltage - DC Reverse (Vr) (Max) 100 V

Current - Average Rectified (Io) 3A

Voltage - Forward (Vf) (Max) @ If 1.2 V @ 3 A

I also want to make sure the MOSFET in the diagram is a N Channel enhancement type.

Thanks

james_s:
Nothing is critical about this circuit, your fan only draws 310mA, any N-channel power mosfet rated for at least 30V or so ought to be fine, ideally something that is logic level compatible, I would just search by price and look for the lowest RDSon you can find for a price of a dollar or so in a package style you can work with, really just about any old random N channel mosfet ought to work fine though. The diode is probably not even necessary at all but if you want to put it there for good measure then something like a 1N4007 ought to do.

Siwastaja:
Your post is contradicting, because you say you are controlling a DC motor, but post a link to a fan, which is not a DC motor, but a complete product which contains a BLDC motor (which is NOT a DC motor despite having DC in its name) and an inverter circuitry to control it.

If you were to control a DC motor:

--- Quote from: engineheat on April 25, 2023, 12:41:57 am ---Notice the flyback diode D1. When buying a diode, what specs do I need to watch out for in order to ensure it is suitable?  I'm considering this diode https://www.digikey.com/en/products/detail/nte-electronics-inc/1N5401/11644131

--- End quote ---

Having fast or no reverse recovery is essential. Schottky is the correct type as they have no reverse recovery. What you suggest is standard recovery standard Si diode, not suitable. Standard recovery diode won't work because with PWM, the motor current does not decay to zero (except at very low loads or speeds) but works in continuous conduction - i.e., the energy stored in the motor inductance keeps the current flowing, through the diode, during MOSFET off-time. When the MOSFET then turns on, current is still flowing through the diode. The diode has to turn OFF very quickly, otherwise short-circuit current will flow, wasting energy and heating up the diode and MOSFET.

You can see standard recovery diodes suggested in some relay or solenoid circuits, but it's because the controller does not turn the transistor ON again too quickly after turning off - current has time to decay to 0, no short circuit current.


--- Quote --- Should I also include resistors or capacitors in series with the flyback diode?
--- End quote ---
Absolutely not. The reason for the diode is to provide a continuous, low-impedance path for the motor winding current. This loop needs to be as short as possible, without any unnecessary components. The diode, while schematically in parallel with motor, must be located next to the transistor, not at the motor. You also need to provide low-impedance power supply: capacitance between Vcc and GND, placed physically close to the MOSFET-diode series combination.



--- Quote ---Voltage - DC Reverse (Vr) (Max) 100 V

--- End quote ---

Diode blows up if it sees voltage more than 100V. Your circuit has 12V over the diode, when the MOSFET is conducting, nowhere near 100V. Though, fast switching of current will produce voltage peaks due to layout parasitic elements, usually in range of 20%-100% depending on how good job you did. I would choose a diode rated for at very least 25V max reverse voltage. The exact same applies to the MOSFET Vds_max, by the way. Chose a MOSFET rated to at very least 25Vds_max, but 30V would be a good idea for a bit more margin.


--- Quote ---Current - Average Rectified (Io) 3A

--- End quote ---

Average current through the diode. This might be optimistic; you'd need to run thermal calculations too.


--- Quote ---Voltage - Forward (Vf) (Max) @ If 1.2 V @ 3 A

--- End quote ---

How much voltage is lost over the diode when it conducts (so would be 0V for an ideal diode). 1.2V is already 10% of your 12V supply, meaning that if you run a large DC motor with small duty cycle (small speed) producing a lot of torque (a heavy load, e.g. accelerating a vehicle), diode being in conduction most of the time, the efficiency is limited to 90% by the diode alone. If your motor current were to be 3A, this would mean 1.2V*3A = 3.6W dissipated on the tiny diode. A schottky type with lower Vf would make heatsinking easier and increase the efficiency.


--- Quote ---I also want to make sure the MOSFET in the diagram is a N Channel enhancement type.

--- End quote ---

Yes, that's the correct type for ground-side switching.

You would also need current sense and pulse-by-pulse current limiting for a motor controller of any larger motor. A tiny motor below some dozen watts does fine without current sense by just overdimensioning the MOSFET and diode to handle the stall current of the motor.


---

Now, for the BLDC fan control - all of this is less critical, because the fan already comes with an inverter, which already has those switching transistors and freewheeling diodes. As james_s says, you probably could get away without any diode.

I would still add a schottky diode, and a power supply capacitor close to the MOSFET-diode combo as explained above, because even with motor inductance handled by the internal inverter bridge of the fan, you still have some parasitic inductance from the wiring, capable of generating some sort of voltage spikes. A small schottky diode does not cost much after all.

Another question is whether it's a good idea to PWM the supply currrent to a fan. Many have done that, me included, but if it's not mentioned in the fan datasheet, it's in principle similar abuse as trying to cut power to your television thousands of times per second. By far, the best option is to get a fan with PWM control input (so-called four-wire fan). But usually standard BLDC fans still work fine when PWM'd if you don't mind audible noise so you can try it out.

engineheat:

--- Quote from: Siwastaja on April 25, 2023, 07:15:29 am ---Now, for the BLDC fan control - all of this is less critical, because the fan already comes with an inverter, which already has those switching transistors and freewheeling diodes. As james_s says, you probably could get away without any diode.

--- End quote ---

Thanks for the reply. Learned a lot. I guess I overlooked the fact that it is brushless DC motor which works differently than a DC motor with a brush/commutators. So those switching transistors that it comes with are performing the same function as that of the commutators in a brushed motor - that is - for basic operation of the motor. They are NOT for PWM. For PWM, I would still need my own MOSFET. But you are saying since they already have flyback diodes, I can probably get away with not having diodes. Am I understanding it right?




--- Quote from: Siwastaja on April 25, 2023, 07:15:29 am ---Another question is whether it's a good idea to PWM the supply currrent to a fan. Many have done that, me included, but if it's not mentioned in the fan datasheet, it's in principle similar abuse as trying to cut power to your television thousands of times per second. By far, the best option is to get a fan with PWM control input (so-called four-wire fan). But usually standard BLDC fans still work fine when PWM'd if you don't mind audible noise so you can try it out.

--- End quote ---

I'm not sure why the spec of that fan says "2 lead wires", but I actually see 3 actual wires in the photo (blue, black red). So what is the third one for?

Do you know if there are four-wire fans similar to the one I showed when it comes to size, flow rate, etc? I do want to get one from a reputable supplier, as opposed to cheap no-name Chinese stuff. What are some reputable brands in the industry for fans of this size?
Thanks

james_s:
In my experience most 2 wire brushless fans respond fairly well to PWM. Not all of them but enough that it's worth trying.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod