Needed help with H-Bridge motor controller

Discussion in 'The Projects Forum' started by designeer, Jul 11, 2008.

  1. designeer

    Thread Starter New Member

    Jun 9, 2008
    7
    0
    Dear fellow forumers,

    I have to admit that I have this issue with my H-bridge motor controller and after google search for hints or solutions, I had found this site. Bookmarked and had browsed through for a while and I find it good. So, I hope you goodfellows could help me.

    I had this low-cost electric wheelchair project. Since it has to be low cost to benefit the users, I have to resort to design it's controller from basic easy to get components. You see, here in Malaysia, it's not easy to get parts, especially ICs. Previous design of mine had failed (I'm a Mechie by training), it utilizes some hard to get ICs in which I had to resort to Farnell. Anyway, I end up searching and designing this version that utilizes discrete components and only an op-amp. I had it prototyped using a stripboard. It worked for a while and later when I checked, my high side forward P-MOSFET had died. Previous version had these MOSFETs blown with loud pop but this time, it was a silent death.

    motor driver.JPG

    Just some basic info, I combined 2 lead-acid battery to have 24VDC, runs a 14.4VDC cordless drill motor which I'm guessing the max current would be less than 7A. I have a BasicX B-24 microcontroller to control this motor speed controller. Signals are 5V digital. 4 signals from the microcontroller, to control each forward reverse hi lo MOSFETs.

    Therefore, I am hoping to get any suggestions, help or critiques from you guys. I had scratched my head (I think I'm balding) but still can't figured it out. Thanks in advance.

    Regards.
     
  2. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    907
    I have not sorted through your entire circuit. One thing I do not see, which I have found essential in high-current applications, are some capacitors. Namely, you have nothing that resembles a "main capacitor" as described by 4QD in his excellent series of instructions.

    In fact, I recommend visiting the 4QD site ( http://www.4qd.co.uk/ ). It has been reorganized since I first saw it, but it still looks to be quite useful after a brief review this morning. Most important for your application, 4QD uses discrete components in many of his earlier designs. Check out the archive circuits and you will see what I mean.

    As for your design specifically, have you checked the timing of the top and bottom mosfets to be sure they are never on at the same time, regardless of load?

    John
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Nice job on the schematic - not often we get first-time posters with schematics that well done. :)

    I'm seeing a lot of resistance in the gate paths.
    For example:
    1) The IRF4905's have a 1k gate resistor. This will greatly slow the charging/discharging time of the gate, keeping them operating in the linear region much longer than they should. Linear region = gate somewhere between -2Vgs to -8Vgs = high power dissipation = lots of heat.
    2) The IRFZ44's have a 10k resistor in the path to ground. Their gates will charge fairly rapidly through the 2N3904's, but when the 2N3904s turn off, they'll discharge very slowly, getting you back to operating in that high-heat linear region again.

    2N3904's aren't "bad" transistors per se, but they are limited in their current carrying capacity. 100mA is really about the practical limit.
     
  4. designeer

    Thread Starter New Member

    Jun 9, 2008
    7
    0
    Thanks for the prompt replies, my sincere gratitute to you both..

    Jpanhalt,
    I have seen quite some examples of simple motor speed controllers and I do notice they have large capacitors in their design but not fairly know what they do. I assumed they were just to reduce noise. Upon going through 4QD, a great site though, only to realize they are for reducing battery voltage spike. So, probably these spikes are killing the MOSFETs silently... But somehow this poses another question, how big should be the capacitor? In the examples, they are like 100 microF, 1000 microF and the largest I have seen is 2200 microF. Adding one should be no issue as I have seen them selling in my favourite walk-in shop. Thanks for pointing it out.

    SgtWookie,

    Sir, I salute... I didn't expect comments from an experienced guru. Moreover getting a nice word on my schematic. Thanks. Appreciate that.

    Actually I had not run it in full and had no idea how hot it would be. I use a free simulation package Ltspice/SwitcherCAD III recomended, just looked at the sim result on the voltage and max current flow, as in managable, adequate, etc... I'm expecting heat but not anticipated how much. BTW, I have a small heat sink attached to each MOSFET.

    If the setup is ok and will be able to run, I will most certainly look into the heat as well as it's switch timing. Will be glad to keep this thread posted.

    Just to rant a little, being trained as a mechanical engineer, I'm not that well verse as my studies only limited to extremely basic electronics and no hands-on at all. This is my first electronic project, thus I face a few problems. I'm not sure as of which is the better component and popular ones, so popular that the shop I frequent to stock them. I had walked around and found this shop is better stocked and even them, some ICs, Op-amps, transistors are not there. So, quite challenging. I do not wish to go through online channel such as Farnell and RS. I find their price is higher and apart from that, I really want the design to have really simple discrete components that is easy to obtain in Malaysia so that the source is not limited.

    Regards.
     
  5. theamber

    Active Member

    Jun 13, 2008
    318
    0
    If it happens at high speeds you are probably getting back emf transients from the motor at on off cycles you can put an optoisolator between the output and the motor drive circuit or built a snubber. Any time you are switching on or off inductive loads you get high voltage transients back. Also I suggest to use a combination of two nor gates in each side to prevent the user from switching by accident both directions at the same time and turning on all the mosfets frying them.
    Also implement a short delay in your code that turns all the Mosfets off for a brief period like 1 sec. to make sure the Mosfet are totally off. In this way, you make sure they had more than enough time to completely turn off (they have a large stray capacitance between the gate and the other terminals and retain a charge), and you help avoid problems with stripping gears.
    I hope this help keep us posted.
     
  6. designeer

    Thread Starter New Member

    Jun 9, 2008
    7
    0
    Yeah, I understand that inductive loads will have lots of voltage spikes during each on and off. Building a snubber is ok, it's just that my project is so lowly budget till you can say it's not low cost, somehow it's no-cost.. Well, I had put that in mind and hopefully my diodes 1N4004 and the motor capacitor can help ease the problem.

    As for the inputs to the motor speed controller, I'll be using the lazier version, which is through my microcontroller's program. Making sure no MOSFET at the same side to the motor is on at the same time. I learnt that the hard way as initially I'm using an IC model TC4469 (high cost and hard to get here), wrong wiring and burn quite a number of P and N-MOSFETs.

    In fact, in the pipe-line, in my program, I had also put in a few lines to have some sort of damping, slow acceleration and deceleration of the motor, minimizing stress onto the motor speed controller's circuit.

    Regards.
     
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Since you have two 12v batteries connected in series, why not make a tap between the two? That way you'll eliminate the need for the L7812 Vreg and associated parts, and it will be much easier on the gate drivers. They'll run quite happily with 12v applied. You'll be able to switch them a lot faster, too - because you'll be able to get rid of much of the voltage divider networks you have going on now.

    Use the 0-12v for the low-side drivers, and the 12-24 (high side battery) for the high-side drivers.

    You should consider using comparators, such as the LM393 or LM2903, rather than the LM358 op amp. You will decrease your transition times. Comparators are designed to run in open-loop mode with saturated outputs, op amps are not.
     
    Last edited: Jul 12, 2008
  8. designeer

    Thread Starter New Member

    Jun 9, 2008
    7
    0
    He he... Actually I had never thought of that to even further reduce the number of components. Great idea. In reality, would that be practical as I heard when powering an equipment with multiple cells (as in now I use 2 battery cell), they are not discharged equally, meaning they will alter maybe like the positive end has more voltage (perhaps like 11.9 V) and the negative end lesser (perhaps like 11.5V).

    I'll check out the recommended components. Prior to this, I'm only confident with the op-amp as seen many has used op-amp in their design. And hope that my favourite shop stocks them... Thanks.
     
  9. designeer

    Thread Starter New Member

    Jun 9, 2008
    7
    0
    Duh..... Yesterday I went and bought 2 units of 1mF caps and soldered them to my setup, one on each side of my 24V supply to my ground (I do have both top and bottom 24V and ground in the middle, as shown in my schematic). Simply, parallel the two caps will become 2mF. Felt nervous using such high capacity capacitors but everything seems ok when I tested it with just 10k Resistor as it's load to simulate a motor (for safety reason). Voltage went up, went down as designed. So, feeling confident, connect my motor, set to run at forward, meaning pulling my inputs of Forward Hi and Forward Lo together and powered it with a 5V supply manual, a.k.a. hot wired the thing (not sure this is ok but I think better to connect my basicx microcontroller worrying of frying that as well). It runs.... Hurray....

    BUT, as I check further before trying out my reverse direction, I found my Forward Hi P-MOSFET died, forever 24V at the motor. In other words, the Hi side has shorted, only the Lo side still functions. So, tried the main capacitors, still, end up frying my Hi side P-MOSFET.... At least it's not the main capacitor's problem.
     
  10. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    What rectifiers are you using on your bridge? They may be too slow to conduct. This can cause very high peak voltages, which could destroy your MOSFETs.

    One way you can combat that is to use small ceramic capacitors across the diodes, somewhere between 300pF to 1nF. This slows the rise time of the voltage peaks, giving the rectifers extra time to start conducting.

    Try an initial value of 470pF.

    If your diodes are still too slow, you may have to change them to a faster type.
     
  11. designeer

    Thread Starter New Member

    Jun 9, 2008
    7
    0
    Oh, now I'm using 8 of the 1N4004, sorry that I didn't specify in my schematics. he he... silly mistake. So, all 8 of them, meaning I'm using 2 parallel together to act as one, worry of the current flow. Or is it that I'm overkill in the design? I have seen ppl using fast acting schottky diodes btw.

    The current method of testing is that I short my two inputs of Forward Hi and Lo together while giving a 5V signal manually. I have a 5V supply wire, stripped at the end and just short them out. As mentioned, they work but the High side P-MOSFET died. Reason I'm reinstate this is that can I do that? I have seen some sites that they switch on off a motor at the motor's high side. BUT, some sites only recommend PWM method should only employed at the Low side, never on the high side. The high side should be left on. So, the way I did is somehow switching the circuit on off at both high and low side. Am I doing it all wrong?

    Great that you also suggested a small capacitor at the rectifying side. Will consider getting them, if I can find some empty prototyping space. He he..
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    1N4004's are woefully inadequate. They might carry 3A peak, but your motor is probably trying to put 30A through them. I would not be surprised to find out that your diodes are all blown.

    Replace your diodes with some fast Schottky diodes that are capable of 30A peak.
    Some diodes that may be suitable:
    1N5828 (40v 30A), 1N5834 (40v 60A), 1N6098 (40V 50A)
    But I don't know what's available where you are. You'll have to look.

    As far as PWM, my preference would be to switch the N-ch MOSFETS. They're usually faster and have less resistance than the P-ch.
     
  13. designeer

    Thread Starter New Member

    Jun 9, 2008
    7
    0
    Hi there guys,

    Finally, due to the time I have left for the project and the still on going event of blowing up the High Side of the H-bridge, I had left with no choice but the abandon the P-MOSFETs and go back to the good ol' relays. I know it's low tech but given the facts, it's good enough for now.

    For the high side, I'm using 2 Single Pole Double Throw relays rather than a Double Pole Double Throw because of it's current rating and the driving circuits. Basically it's the same as the same 12V of my previous circuit is adequate to energise the relays. So, it's just a switcheroo..

    As for the low side, the same N-MOSFET with the same driving circuit were used as they had not given me any problems. The main capacitor is there which is a 1mF unit. So, basically that's that. I had that running and for about a week time, it had not failed me YET...;)

    Thanks for all the support. Thank you Sarge for your suggestions. Aprreciate that.:D

    Best Regards.
     
  14. wagnerlip

    New Member

    Mar 31, 2009
    1
    0
    Sorry this answer cames 1033 days late... :)

    Looking at the schematics, the "REVERSE LO" and "FORWARD LO" should be both "HIGH", just look at the diagram, for the IRZ44 to drive, it needs the NPN conducting, and to that happening, the LM358 needs the output to be high, thus the (+) input also high, not low.

    If you are keeping the input HIGH when it should be LOW, you are destroying the IRF4905 slowly due the strong short circuit and due the 1k resistor in series with the gate that are keeping the 4905 in the linear region almost all the time.

    But the biggest problem in this circuit is feeding the gate of the IRFZ44 with +12V through the 2N3904... that is a kill in the circuit. The IRFZ44 is to work with no more than +4V between Gate and Source. If you apply more than 4.5V the MosFET reacts very strangely. If you apply +7 or +8V, after removing that voltage the transistor keeps conducting, and will literally create a short circuit to the IRF4905...

    The 1k resistors should be replaced by no more than 50 ohms resistors, I would use 10 ohms. Also, as already said here in the forum, the 10k resistors at the emiter of the 2N3904 should be no higher than 100 ohms.

    I wonder why are you using the LM358 in this circuit, you don't need it.
     
Loading...