Search all of my sites with Google

Monday, June 22, 2009

Designing A Motor Controller...

...is a lot harder than it looks.

Saturday I started building the UC3637 design. Before I even finished it, at an early stage in testing at low voltages and virtually no current, without even having the chip driving MOSFETs or a load, the chip just died. Internal short. I suspect ESD, despite my precautions (I don't have a full ESD bench, just a grounding strap and years of experience in how to not blow stuff up with ESD).

I was kind of upset, and since I had another design I wanted to test, I started up a new one with yet another kind of chip. This one at least made it to the bench-motor-testing stage. Then it died at very low throttle with no load on the motor, a few seconds into testing. Most pins on both the MOSFET driver chips *and* the motor controller chip are at the same voltage as the main power level, which means there is an internal short in them, too. :(

It did actually work, though. The 4pole motor started up fine and ran at low speed for those few seconds before a 60V/80A MOSFET (or both, it's a half-bridge) popped and then took out the Micrel MOSFET drivers. What I'm not sure of is if the main chip died before or after, because it seemed like just before the pop, that the speed jumped to full. That could be that the top MOSFET failed shorted, before actually cracking the case (the pop sound), or it could be that the motor controller chip (MC33033) failed first and caused sudden full drive of the Micrel chips that then caused full drive of the MOSFET, then the resulting commutator noise/etc then fried the MOSFET, since I had somehow forgotten to put a number of safety diodes around the MOSFETs during construction (I guess I got in too much of a hurry to finish it, and since it's all on perfboard with the MOSFETs on off-board heatsinks, it was easy to not notice and remember).

Whatever caused it, pretty much every active component on it is dead, I think. I have to actually test the MOSFETs, because it's possible the low side is still ok.

Before I try again, I need to redesign the thing with more protection in place between stages, and do what I can to keep the inductive spikes and other noise from coming back from the motor into the rest of the circuit. I'm pretty sure it was something like this that killed it.


However, I'm going to hold off on actually building my own designs for a while, since I'm getting some empty PCBs for 4QD's old discontinued 2QD controller that I can use instead--I already have all the parts laying around to build it from, which makes this option cheaper than buying a whole controller. Also, I know this controller design will work, and be reliable. I even understand how most of it does what it does and why, so troubleshooting it should be easy enough if I have problems with it. The only difference between the stock 2QD and mine will be that I am probably going to use the larger NTY100N10 MOSFETs with it, which will likely require offboard mounting/heatsink (which should work, as it did with my crappy Scoot-n-Go rebuilt controller for so long).

I'm probably also going to modify the accel/decel ramping circuit so it has faster deceleration time than acceleration time--the original design only has one time constant. This will probably require an off-board little PCB for the purpose, but that's ok as I will be building an interface board for my pedal-tension hall-throttle anyway, to be able to scale it's output to any controller I want to use on the bike (of course, I still have to build that throttle, too).

For those interested in a good place to learn how motor control works, including lots of details on the old 2QD (and a lot of other really good info about many other things), the http://4QDtec.co.uk site has a public section with quite a bit of info, plus an inexpensive members-only area with even more: http://www.4qdtec.com/Contact/Join.html .

3 comments:

  1. http://tech.groups.yahoo.com/group/switchmode/June 22, 2009 at 4:48 PM

    I had fun building my first controller out of transistors with no finicky IC chips. My later controllers used just one, a CMOS CD40106 IC chip. My latest controller designs use current limiting, which is pretty important. --Joe

    ReplyDelete
  2. Since I'm using perfboard assembly right now, without the capacity to etch PCBs, I'm trying to stay as integrated as possible. If I could afford to make PCBs, I'd love to go as low-tech and discrete as possible, since a failure could be more easily determined and also more easily localized to certain components, instead of killing the entire thing. :)

    FWIW, these two can both *do* current limiting in the ICs, but I have not yet implemented it due to lack of small enough resistors at high enough power capacities. All the ones I have that can handle the current are at least a tenth of an ohm--too much to put in series with the motor. I could probably parallel a bunch of them to get the resistance and power level I need, but I haven't got around to calculating out what values I'd need out of what I actually have here already.

    This is the problem with building things out of the stuff already on-hand. It limits some of what I can do. But it also stimulates creativity, because I have to come up with solutions to the problems this creates. :)

    ReplyDelete
  3. http://tech.groups.yahoo.com/group/switchmode/June 23, 2009 at 6:53 AM

    http://tech.groups.yahoo.com/group/switchmode/

    It's probably been tens years since I made anything with a circuit board of any type, including perf board. I build circuits point to point (p2p), attacked to whatever is biggest. If there are a few big parts, I tape them together and/or nylon tie or screw them. Then I attach the circuit to their pins. A little adhesive in strategic locations might help, too.

    The pin layout of the CD40106 is good for mounting parts on its underside deadbug style. I build control circuits for my switching (SMPS) power supplies that way.

    My first controller was basically a simple discrete component (no IC chips) audio amplifier to which I added capacitance to ground at the feedback pin to cause it to oscillate at about three hundred hertz. The throttle changed the voltage at the input pin. It was easy to understand, but later designs are better because they use current control instead of voltage control.

    The current control uses a piece of wire as the sense resistor. A transistor with a diode to almost bias it on detects when the current through the wire causes about 50mV of voltage drop. I am really glad that I have at least one good thing that I thought of. --Joe

    ReplyDelete

Alternate suggestions or improvements to anything that's been posted is very welcome, and extreme detail is preferred to brevity.

Keep in mind that unless you leave an email address in your comment, I haven't any way to reply to you except to reply to your comment here. That means if you want a reply, you'll have to come back to *this* blog entry and it's comments to see my reply to you, unless you leave some method of contact within your comment.