Precise low-speed brushless DC motor control

Status
Not open for further replies.

fruitb.at

New member
I'm planning to build a Teensy 3.0-based brushless DC (BLDC) motor controller to drive a fairly heavy, but low-friction belt-driven turntable smoothly and at a consistent speed for a science project (other interesting things happen after that but this is the focus of what I'm trying to figure out here). The motor will run at speeds from around 250-2000 RPM. When up to speed only moderate torque should be required to maintain it.

The motor I'm looking at using has three phases and is rated for up to 8A of current at drive voltages of up to 11V. I'm not experienced in electronics, but from reading about brushless motor control, it sounds like I need 6 N-type MOSFETs to make 3 half-bridges, one for each phase, which are then PWM-modulated (Typically at 10Khz or so it seems) to move the motor, with timing governed using a feedback loop responding to either back-EMF sensing or a Hall-effect sensor. I think I more or less get broadly what I need to do, but there's a few specific things about the nitty-gritty I don't understand and would like to ask about. I apologise if these questions are pretty noobish. Also, I have looked around for other questions to do with MOSFETs here, but they left most of my questions unanswered and this is kind of a different purpose, so I hope I'm not being redundant there either.

1) As I understand it, one needs a logic-level MOSFET that will allow high currents through with relatively low gate voltages, or an extra transistor or level converter or MOSFET driver to generate a higher voltage drive signal. Most logic level MOSFETs I've looked at only seem to be rated to fully open up on a 5V gate voltage (classic Teensy/Arduino-style) and the 3.3V logic outputs of the Teensy 3.0 may not be quite sufficient, or at least may be inefficient, on their own. I'd rather use a Teensy 3.0 (and have already ordered one) due to the 32768 Hz crystal option.

2) I'm also concerned about whether there are any inrush current or drive strength issues with connecting a 3.3V-friendly MOSFET directly to the Teensy 3.0. Is a resistor necessary between the Teensy output and the MOSFET/driver, and if so, which rating should be used?

So I'm wondering, which particular model of MOSFETs, or MOSFETs plus auxiliary stuff would be the best choice for my purpose. I'm also unsure about the right choice of smoothing capacitors and flyback diodes, if any.

3) I'm also concerned about avoiding creating a short circuit by flipping on the high and low sides of the half-bridge simultaneously. I would expect multiple AnalogWrite driven PWMs to switch on simultaneously, and then to switch off when the proportion of their duty cycle is done. I guess what would be best would be something like:

Code:
high side drive (connects phase to 8V, say, when high):
_------________
low side drive (connects phase to ground when high)
________-------

(with the phase floating for short intervals, of the order of the MOSFET switching time at the start and switch point of the cycle). Is that the best approach, and what should I refer to to get this kind of behaviour out of a Teensy 3.0?

4) If using back-EMF sensing, the approach seems to be just to measure the output of a voltage divider on the analog inputs. I don't know anything about using Hall-effect sensors, though, and I'm wondering how much is involved in wiring one up to a Teensy 3.0. I'm still unsure of whether back-EMF alone, one Hall-effect sensor, or multiple ones would be the best choice as feedback for speed control in the regime I'm in. Or whether it is better to use analog field strength measurement or switch-style Hall-effect sensors.

5) I'm planning on adding a 32768 Hz crystal to the Teensy 3.0, and on nailing down the speed of the whole thing as accurately as possible (so that after the belt-drive reduction the turntable will spin at pretty much exactly, say, 1.3752 Hz), so where I want to end up with is with nice smooth drive waveforms that result in pretty much constant torque through the rotation, and to get the sensor feedback stuff operating (presumably locked to the PWM cycle with some kind of interrupt driven type thing) so that speed governing is really stable and pretty much free of oscillations. So I'll need to understand a bit more about how to do this sort of thing on the Teensy 3.0 before I can reliably tackle that.

The last questions are more on the software side for once I have the basic power switching stuff wired up. So for now the main question I've got is really about the MOSFET stuff. Once I've got them sorted, I can put everything behind decent resistors so that none of the currents are ever very big and hope that'll prevent permanent destruction of anything while I mess with the software side.

Also, are there any other gotchas in doing this type of thing?

I appreciate any advice you can give me.

- Geoffrey
 
I'm not a motor control expert.... so I can only offer some tiny bits of advice.

One thing I've read about brushless control is you really must have position encoders for slow speeds. Apparently the back-EMF sensing only works at high speeds and getting started from a low speed is tricky. Again, I'm not a motor expert.... that's just want I've heard.

For driving MOSFETs, you definitely need a buffer between the Teensy pin and the mosfet gate. Only the tiny ones like FDV303N and FDV304P can be driven directly by a pin. All the mosfets capable of driving a nice motor need special drivers, because the gate is a big capacitor. There are some ones they call "logic" because they are rated for 5 volt drive instead of 10 volts. But that makes them even harder to drive, capacitance-wise. Remember, datasheets are written by marketing departments with the sole purpose of selling you the part. Just cause they call it "logic" doesn't mean it's really feasible to directly drive it from a normal logic level signal.

The good news is most of the driver chips can drive 2 mosfets and they have ways of making sure both are never on at the same time. Typically they have delay-matched paths and some provision to turn one off before the other turns on. You really want to find one of those mosfet driver chips to put between Teensy and the mosfet gates.

There's really no point to adding a 32.768 kHz crystal, unless you want to keep date/time while the power is off. The 16 MHz crystal on Teensy 3.0 is very accurate.
 
Status
Not open for further replies.
Back
Top