H-Bridge Design for DC Motor Direction Control - pls help verify my desin - Page 1
Forum section: electronics / projects

author: ttodorov
author_rank: Regular Contributor
timestamp: December 07, 2017, 02:05:58 am
content: Hello,I have a 48V DC/400W spindle for my DIY desktop CNC. I have been looking for a 2FormC relay to reverse the current direction, in order to control the spindle rotating clock-wise or counter-clock-wise. But I have not been able to find a relay that can handle the full 400W DC power requirement on the contact side (at the max voltage of 48V). I found an DC SSR based on MOSFETS, that can handle the power, and I can use it to switch the spindle on and off, but not to change direction of rotation (SPST-NO contact arrangement only).So I decided to look into using a full H-bridge to do the direction control, but also could not find an integrated solution for 400W. Thus my attempt to design it from discrete components. The schematic is attached to the post, but here is how I went about it.I tried to implement it around 4 N-channel power MOSFETs (IXFK360N10T from IXYS). These are rather expensive at over US$ 10 a pop, but each of them can handle 1250W at 25 degree C and do not derate too badly if the temperature reaches above 100C inside the enclosure. I will be using them with a heatsink and active air cooling anyway. The be able to control the bridge with logic level signal, I am using small signal P-channel MOSFETS (Si3201CDS). A 12V zener diode is protecting the gates of the MOSFETs. The control signal is opto-isolated, with LOW being clock-wise and HIGH being counter-clockwise selection. I am using a dual schottky inverter to produce the complimentary signals for the H-bridge.What I need is for someone with some more experience than I possess to have a look and tell if it is OK or did I do anything stupid... Did I forget to add anything? Is there a better way to compose the circuit - for better reliability or less components, etc.Thanks in advance!

author: H.O
author_rank: Frequent Contributor
timestamp: December 07, 2017, 05:57:34 pm
content: I don't Think that's going to work.An N-channel MOSFET needs to have it's gate at a higher potential than its source when it's conducting current. That works fine with the bottom switches since they have their source connected to GND. But with the upper switches the voltage at the source switches from being either at ground potential (basically) or V+ potential (basically). In order for the top MOSFET to turn on and stay on its gate voltage have to "follow" the source voltage.Normal half bridge drivers handles this perfectly but they're designed to switch on and off and can't generally keep the top switch on "for ever". I'm sure there are those that can but I'm not aware of any off the top of my head.Second, don't confuse the MOSFETs power rating with how big of a load it can switch.Third, where have you looked for relays? Digikey have plenty of relays capable of switching 48V at 10A and moreZ6254-ND, PB1932-ND, Z2825-ND are three examples, all with 48VDC coil so you don't have to have a separate supply for the control voltage.

author: ttodorov
author_rank: Regular Contributor
timestamp: December 08, 2017, 10:26:56 pm
content: Hello and thanks for responding to my message.I get what you are saying about my circuit - I think I will have to replace the upper MOSFETs with p-channel devices, which are more expensive.Would you mind expanding a bit on your meaning inQuoteThe way I understand MSOFET specifications, a device might be able to handle 100V max and 200A max, but not at the same time, if it is rated for 300W power (since 100V * 200A is 20kW if my math is correct)...And I looked at the relay options that you provided - let's take the first option Z6254-ND. The data sheet says on page 4 that the rated load for inductive loads is only 5 A at 24V. If you disregard the switching of the DC spindle motor on and off and view it purely as resistive load, even then the rated load is only 10A at 24V and my spindle sucks 8A+ at 48V. Would you mind pointing out where you see the error in my thinking here?Thanks again for taking the time...Best regards,~Todor

author: H.O
author_rank: Frequent Contributor
timestamp: December 08, 2017, 11:05:48 pm
content: Your math is correct but your reasoning isn't.You're not running the MOSFET in the linear region where you have 100V across it AND 200A going thru it. You're using it as a switch you EITHER have 100V across it and ZERO current thru it (switch is off) OR you havebasically0V across it and 200A going thru it. Now, when the MOSFET switches. from "on" to "off" or from "off" to "on" it DOES obviously pass thru this linear region where it's acting more like a resistor than as a switch and this needs to be taken into consideration if you're switching often (like in the kHz range) and you generally want to drive the gate HARD so the MOSFET switches fast.Can't look at the relay datasheet at the moment but I'm sure you're correct. I'm pretty sure it'll work just fine but you're doing the right thing. I'm sure you can find a relay that fits those fairly modes current ratings - if not, search for a contactor instead.

author: langwadt
author_rank: Super Contributor
timestamp: December 08, 2017, 11:18:42 pm
content: Quote from: ttodorov on December 08, 2017, 10:26:56 pmif you only switch the relay with the power off it should only be the rated carry current that matters

author: ttodorov
author_rank: Regular Contributor
timestamp: December 09, 2017, 01:13:08 am
content: Thank you both H.O and langwadt!Your points are well taken. I have no idea if the new g2core/grbl firmware controls the direction of the spindle before or after powering the spindle - if I were to place a bet, I would think direction first, then motor power on, but who knows... In any case, after some consideration I think I will be ok if I find a relay that can handle the inductive pulse duration at high voltage/current.But since the direction of the spindle will not change once the motor is on, I think I would prefer the H-bridge approach, since now that I got it explained to me, I can use a lot cheaper MOSFETs ;-) I just need to rework my circuit with p-channel on the high side...Best regards!

author: saike
author_rank: Regular Contributor
timestamp: December 09, 2017, 07:31:58 am
content: Make sure you have a read about 'H bridge shoot through' (google it) and save yourself a lot of smoke and problems. With P/N fet bridges and limited knowledge it is very easy to achieve

author: H.O
author_rank: Frequent Contributor
timestamp: December 09, 2017, 08:53:37 am
content: Indeed.If simple fwd/rev control is the goal then just get some relays (or even a beefy DPDT switch and flip it manually) and be done with it.As for the relays, with DC and inductive loads it's probably more about breaking the current than handling it while closing the contacts. A capacitor, varistor or something similar across the contacts will help.

author: ttodorov
author_rank: Regular Contributor
timestamp: December 09, 2017, 10:48:12 am
content: Thanks for the hints, everyone!After looking up the suggested reading material, it seems that I need to replace the small signal mosfets that drive the h bridge gates with a half-bridge driver IC on each side. Most of them have a dead-time insertion when switching between the high and low side mosfets, preventing the shoot through. After looking at the first 30 devices in stock on Arrow.com though, I noticed that they are all for driving n-channel mosfets on the high side, as well as on the low sideIs this the solution that is recommended for h bridge?

author: H.O
author_rank: Frequent Contributor
timestamp: December 09, 2017, 12:40:06 pm
content: Yes, but as I said previously, common half bridge drivers are inteneded for switching application and they rely on that in order to "refresh" the charge on the bootstrap capacitor that provides the voltage "above" source for the upper MOSFET. I've never done an application like that but I suppose a tiny isolated 12V DC/DC converter in Place of the bootstrap capacitor might work. Make sure you understand what this means.Or just go with relays...

author: ttodorov
author_rank: Regular Contributor
timestamp: December 09, 2017, 10:32:18 pm
content: Ok, I owe you an apology for wasting your time with incomplete information... Here is the full picture.I am going to use an Arduino Due/Grbl shield to control my DIY CNC. The Due has control pins for spindle on/off and direction, as well as PWM pin for speed control. I also got a cheap Chinese DC motor speed controller that is driven by the PWM signal (picture below). My thinking was that since the speed controller is not able to change the direction of rotation, I would use either a relay or an H-bridge on the output side of the speed controller to take care of that. Thus my setup becomes:48V 10A DC power supply --> Relay to turn the spindle on/off --> speed controller --> relay/h-bridge to change direction --> spindle motor.Up until now I knew there was PWM involved, but did not consider that it might be used both as input to the speed controller and on its output to the motorGood thing I decided to test it out and hooked everything up to take some measurements. As can be seen in the capture from my oscilloscope, the motor is driven by an inverse PWM square wave with 48Vpp and 15.6KHz frequency. I think that this takes using relays out of the question since the PWM would be like inductive load on the contacts, but please correct me if I am wrong. Would the mosfets in an H-bridge have any problems with the voltage between drain and source be switched on/off at 15 KHz?

author: Zero999
author_rank: Super Contributor
timestamp: December 09, 2017, 11:18:23 pm
content: I still can't see why you can't use a relay.The reason why finding a relay which can work at 48VDC 10A, is because it's difficult to break the arc, when the contacts open. With AC, the voltage passes through 0V every1/100or1/120second, so the arc quenches momentarily, so the AC voltage & current rating, is always higher than the DC. Connecting contacts in series will solve this problem, see data sheet linked below for a relay which can handle 12A at 48V, if two contacts are connected in series.http://docs-europe.electrocomponents.com/webdocs/13eb/0900766b813eb8b2.pdfHowever, this is not necessary. The relay could be used to reverse the motor and a MOSFET could be in series with the relay to do the PWM. Providing the relay is only switched, when the MOSFET is off, then the relay's AC current rating should be enough.

author: saike
author_rank: Regular Contributor
timestamp: December 10, 2017, 06:41:55 am
content: If you want to design and use a transistor bridge just because it is an interesting thing to do, then there is no need for the Chinese speed controller, you just use the pwm signal to drive the gates of the transistors and the direction signal to route the pwm signal to the correct pair of transistors. But I am puzzled, what process requires the spindle to run in reverse?Edit: After reading this again I see the comment about routing the pwm signal is an over simplification, the whole thing depends on getting this right

author: ttodorov
author_rank: Regular Contributor
timestamp: December 10, 2017, 08:52:53 am
content: Gah! I am so dumb, if evolution was fair I would be extinct!Thanks to saike I re-checked my assumptions and it turns out that I don't need to use the pin to reverse spindle direction just because it is there. I guess it's purpose is to let you correct how the spindle rotates if you wired it wrong, without the need to switch cabling... But using the cheap speed controller I have already turns my spindle in the proper direction so there is nothing to correct. Both conventional and climb milling rotate the bit in the same direction as required by the geometry of the tool's cutting edges; it is how the material is fed to the bit that is different.So the whole thread is just an exercise in futility (even though I learned a few things about h bridges after a couple of hints from the responses)Thanks everyone, just let me go cover my head in shame...

author: saike
author_rank: Regular Contributor
timestamp: December 10, 2017, 09:18:55 am
content: QuoteHey! you are dealing with someone who put his finger in the beam of his laser cutter, only a few watts fortunately, and I do this for a living