last day (15 days later) » 

21:08
1
A: Is it possible to use two N-channel MOSFETs as motor driver with one driving and the other being used as a brake?

Jonathan S.Yes, you can brake like this, although you should probably add a resistor in series with the drain of Q4 to dissipate the energy that the motor generates while spinning down (it acts as a generator during that time). There's a huge problem with your circuit, though: You can't actually use the IR2...

what value of resistor would you recommend and why (I need to learn this :) )? FYI, the motor has a stall current of 24A. Running with nothing on the shaft it runs almost at 5A.
I have gotten rid of the IR2101S altogether since I am using Logic level MOSFETS. Looking at the datasheet what should I be looking at to calculate a good gate resistor to protect my I/O pin? My I/O pin needs to stay about 20mA.
Removing the IR2101S makes the problem even worse. The motor is connected to the high-side MOSFET's source terminal. To turn it on fully, its gate voltage must be higher than the source voltage. Since the motor is supplied with 12V, the voltage at the gate of the high-side MOSFET must be higher than 12V. For your MOSFETs in particular, it must be at least 5V higher, which means that you have to apply at least 17V to the gate (but less than the maximum of 20V). Hence my suggestion to use an 18V supply for the VB pin of the IR2101S.
I guess I am confused about what a logic level mosfet is. I had the understanding that a logic level mosfet could be turned on and off with 5V/0V.
That's correct. The problem is that voltages are always relative - you always need a reference point. The microcontroller outputs 5V with respect to ground, while the MOSFET expects 5V on its gate with respect to its source terminal. If you connect source to ground, that's totally fine, both have the same reference. In your case, though, source is connected to the motor, which is at 12V (to ground) when switched on. Those 5V with respect to ground are actually -7V with respect to the MOSFET's source in that case.
I don't know how to do/fix this. Does anyone have an example of a circuit that is correct for using two N channel mosfets (one to drive, the other to brake) using a microcontroller. All I seem to find are H-bridge circuits that use P channel mosfets.
21:08
You already have the correct MOSFET driver for this. The IR2101 is intended to do exactly that: Drive a half-bridge made from two N-MOSFETs. All you have to do is wire it up according to its datasheet. See: analog.com/en/technical-articles/… (You need a dedicated isolated supply, such as a 1W, 12V-to-12V isolated DC/DC brick.)
Thanks @Jonathan S. Interesting article. My circuit is running off a 12V 35Amp Hr car battery then through proper voltage regulation down to micro-controller voltage for operation. The motor power is also being supplied by the same 12V battery so the grounds are definitely connected. Does this change things as the article describes mostly where the circuits are isolated. BTW, thanks for your patience and continuing to slap knowledge into me.
Isolation is not at all needed. You can directly implement the circuit topologies presented in that article.
Actually, Analog Devices has a chip that integrates a boost converter for the high-side (bootstrap) supply voltage, the LT1336. It is specifically designed for driving motors via a half-bridge. Here's its product page, complete with a schematic that shows how to use it to drive a motor from 12V: analog.com/en/products/lt1336.html
It's even available in a DIP package. All you need is a few diodes, capacitors, and resistors and off you go.
21:26
In the schematic supplied by your link the mosfets do not need to be logic mosfets, correct? Also, I am seeing a lot of Rsense items. Would you happen to have a good link explaining how that is properly used?
One of my problems is too much YouTube. youtube.com/watch?v=GrvvkYTW_0k says nothing about the issue of using the 12V supply while using the logic mosfet. That is where my confusion was coming in.
You can use MOSFETs that require up to 10V on their gate, yes. Resistors marked "Rsense" are for measuring the load current - if you don't need to measure it, you don't need those resistors.
The video you linked only uses N-MOSFETs as low-side switches, in which case the MOSFET's source terminal is tied to ground and there's no problem driving it directly from the MCU. The MCU's reference voltage is ground, and the MOSFET's reference voltage is also ground, so it all works. The problems arise when a MOSFET's source terminal isn't tied to ground - like with your high-side MOSFET.
About 25 years ago I got a certificate as an "Electronic Journeyman". Some of it is coming back to me. I find myself doing stupid stuff like testing with an LED but when I go to test with my motor it doesn't work. After 15 mins or so I realize my desktop power supply only puts out 2.5A...
In that case, you need something to "translate" the ground-referenced voltage from the MCU to a source-referenced voltage for the MOSFET's gate. High-side drivers do this. In fact, it's their only purpose.
It's all good! It takes a while to develop intuition for this kind of stuff. :)
Ah, your last sentence hit me like a brick. Yeah, the difference of using it High side vs low side.... geez
Can you explain a little on your "And you can drive the low side with 100% duty cycle for braking, although the bootstrap will not be working, and that might trigger the undervoltage shutdown for the high side." comment?
21:44
The problem arises when you drive the high side at 100% - that is, you have the motor on for a long period of time ("long" being "0.1 seconds"). Diode-capacitor bootstrap circuits work like this: Whenever the low-side FET is on, the capacitor recharges through the diode. When the high-side FET is on, the charge on the capacitor is used to supply the high-side driver. If the low-side MOSFET isn't turned on for a while, the charge on the capacitor runs out and the high-side driver malfunctions.
That's why you can't use a regular bootstrap circuit. Instead, you'll have to somehow supply the high-side driver in a way that doesn't rely on the H-bridge switching frequently enough to top up some capacitor. An isolated DC/DC converter can do this - it can continuously supply power - and the LT1336's boost converter can also do this.
I will definitely look into getting some of those. I hate I wasted such good n channel logic mosfets. These things are beefy.
You didn't waste the MOSFETs. You can still use them even with a driver that can also drive non-logic-level FETs.
Normal MOSFETs need 10V to turn on, your logic-level ones need 5V, but it doesn't hurt them to drive either of them with more gate voltage (up to 20V at most).
Okay, just rechecking the datasheet it does show where it RDSon at 10V. (If im reading it correctly)
In fact, all you need to add to your existing IR2101S circuit is one of these: digikey.com/en/products/detail/cui-inc/PDSE1-S12-S12-S/14673231
Well, maybe this one would be better since it can tolerate a wider input voltage range: digikey.de/en/products/detail/flex-power-modules/PUC0512S1B/…
Okay, you will definitely have to show me an updated schematic on where to place this in mine. I have no clue where this would go. Also before I forget, you mentioned a resistor in series with the drain of Q4. What numbers would I use to calculate the resistor needed?
The LT1336 is a hard to find item...
Do you find the LT1158 comparable?
22:04
Please excuse the crappy hand-drawn schematic. That's how you can use an isolated DC/DC converter (such as the 2nd one I linked) to power the high-side section of the IR2101S.
You connect it just like its datasheet suggests, but replace the bootstrap diode with the DC/DC converter.
Thanks. The 12 going in can be the same 12 going into the 2101 without issues?
Yeah, all "12(V)" nodes in that schematic are connected.
Don't omit the capacitor between VS and VB! A 1µF ceramic cap would be ideal there. Don't use an electrolytic. If you don't have 1µF on hand, 100nF will do too.
Okay, this is probably a stupid question but why would I need that? What would be the issue of just running the 12v vcc to VB and grounding VS?
Is this to keep the cap always charged?
VB is the supply voltage that the chip uses to generate the "HO" signal. If VB is at 12V with respect to ground, the driver can only output 12V at HO. However, since the source of the high-side MOSFET is also at 12V (when the motor is on), the difference between its gate and source voltage (which are both at 12V) is zero. As a result, the gate driver can't actually drive the high-side MOSFET.
When the high-side MOSFET is on, the driver connects HO to VB. When the high-side MOSFET is off, it connects HO to VS.
The MOSFET only cares about the voltage difference between its gate and source terminals.
If you want to turn the MOSFET on, gate has to be at least 5V higher than source. If source is already at 12V, gate must be at least at 17V.
I guess I'm still a little confused because the converter is 12V and not 17V.
22:16
By connecting OUT- of the DC/DC converter to the MOSFET's source, it generates a voltage at OUT+ that's always 12V higher than source, regardless of where the source potential is "floating". As a result, that voltage can always be used to turn the MOSFET on cleanly.
Let's assume the MOSFET's source is at 12V (motor on). That means OUT- is at 12V since it's connected. As a result, OUT+ is at 24V, and so is VB.
The high-side MOSFET sees all voltages relative to its source terminal.
Ah, DC/DC converte to the MOSFETs source, now the last statement makes sense. Geez I'm getting old....
All good! :P
You still recommend no gate resistor?
In the end, the circuit's goal is to create a supply voltage that's relative to the FET's source, not relative to ground, since the gate voltage also has to be relative to source.
The 2101 can drive those FETs just fine without one.
What about the resistor in series with the drain of Q4?
and since I'm controlling the braking with a micro, you have a formula for calculating the needed delay time for turning the top mosfet off and the braking one on?
22:25
The resistor value depends on your motor. It has to be able to pass the maximum expected motor current at just below 12V - let's say 10V. It also has to be able to handle the braking energy without overheating.
If your motor pulls at most 5A, for example, 2 Ohms would work.
The resistor value isn't actually that critical. You could just see how it works with 1 Ohm. Use a high-power resistor, 10W at least.
Oh, this motor is a monster. It has a stall rating of 24A.
The main goal is to move the braking energy from being dissipated in the low-side FET to being dissipated in the resistor, which is much more robust.
Okay, I can see that. Anything about the delay time?
Anything above a microsecond is probably fine.
That makes it all sound pretty easy. I honestly don't think I have any more questions at this time. Except maybe do you have a youtube or Patreon?
22:31
I don't, I'm just a random engineer helping people out here on the site :P
Also, calculate the power dissipation of your FETs. It's not going to be insignificant at 20A or more.
I really do appreciate the help. I kind of sucks trying to learn on my own sometimes. I have had a few folks on here before tell me to just figure it out and then they will tell me if I'm wrong... Some of us need spoon fed for things to make sense.
If you really push your motor to the stall rating, the high-side FET might dissipate up to 5 Watts, which will require some cooling. Without cooling, the FET will overheat and die.
All good! :)
If you want to do it cheap, just solder the drain tab to a bit of copper plate.
On power dissipation, if it is going to produce a lot of heat, these are SMT and very very small soic8 fets. I actually got them to test because I've never seen the package they come in
Yeah, I saw that. If you're going to make a PCB, put two or three of these FETs in parallel for the high-side FET. (You can just connect their drain, source and gate terminals all to each other and treat them as a single big FET.)
The package they come in along with the Amps they can withstand.
Will that keep the heat down and still have the amperage capability?
and I'm also guessing that my motor connections need to be as close as possible so I can get it going thru some proper gauge wire...
22:36
When you parallel two FETs, their resistance halves, the overall power dissipation halves, the power dissipation of each FET goes down to 1/4 (half the power through twice the FETs), and the current handling capability doubles.
Two of them in parallel should be able to drive your motor just fine without any cooling at all - 1W per FET is fine.
For the low side, you only need a single FET as it will only see short spikes of current, which aren't enough to heat it up significantly.
My electronics schooling ended with a 555 timer lol. The things that have come out with since is pretty amazing.
That shouldn't be an issue, these things are pretty cheap at that.
Yeah, it's amazing how powerful those tiny FETs have become!
I was using a design using BTS7970s. They had 100k in stock when I designed and tested it. Worked great. Next month, no parts.
Having to start from scratch trying to find things in stock.
Just so you have an idea of what I am doing. The motor will have two sensors on it. The motor has built in gearing so it really does have that much rpm. Once a signal is sent to the micro, the shaft will move half a rotation, hit a sensor that will trigger the stop. It just repeats from there. I will eventually like to make the motor reversible at some point. I really would like to make a robot lawn mower lol.
That should have said it really doesn't have that much rpm.
Yeah... That sucks. There seem to be a lot of pin-compatible substitutes, though, like the BTN8982.
And I see!
You should be able to just solder the BTN8982 onto the PCB instead of the BTS7970 without any changes.
Oh wow, it has been a bit since I have checked. I have been busy trying to do this along with some programming (which is what I mostly do). My degree is in software programming, then I went to embedded programming which led me to say, hey, lets just make things when I want them instead of buying them....
22:52
I also learned programming first before I started tinkering with electronics! :)
Okay, I appreciate the help and the conversation. Hopefully we will cross paths again.
No problem. Good luck with your motor driver!

last day (15 days later) »