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 .

Tuesday, June 16, 2009

Death To All Controllers....

Ok, not ALL of them, but someone apparently sentenced mine. :(

Since it is made from a many-times-repaired Scoot'N'Go controller that started out it's life with me as already cooked *and* corroded, I'm not all that surprised. The issue this time is not in the power section, which I had upgraded last year to handle over 100 amps at 100 volts, using offboard-mounted MOSFETs and JFETs driving them (plus a diode pack for freewheeling currents). It is apparently the LM339 op-amp, probably internally shorted, as it drags down the supply voltage on it's side of the board to less than 3V.

All the other components are fine, except for one of the power resistors used in a voltage divider that provides the power to the LM339 section--it is burned open, probably from excessive current draw by the LM339.

I can't remove the LM339 and replace it without destroying the PCB, due to it's condition. It was not well-made to begin with, and what it went thru before I got it, causing burns and corrosion on it, would probably ensure that the copper will come off with the chip.

I *might* be able to Dremel off the chip by cutting it's legs, then carefully soldering a new LM339 in it's place by bridging from the legs to the PCB, but I am not confident it would work for long if it worked at all.

I am instead working on a version of the application note circuit for the Unitrode UC3637 PWM motor control chip, which is fairly simple. The big problem is that I have to do it on perfboard, at least at first, and I'm not sure how well that will work no matter how I beef up wiring, etc. If it all works out ok, I'll see if I can find the materials to etch a PCB for it if that would fix any issues I have with it, but I don't want to waste that kind of material if it doesn't work right to start with.

There are other motor control chips, such as the MC33035, which can also be adapted to brushed motor use (it's made for BLDC control), and I am slowly working on a design for that one that will let me use either kind of motor, with jumpers or switches for the configuration. It's not a "now" kind of project, though, and I need something right now to use with the motor on the bike.

Another thing still being worked on, hopefully integrated into this new controller, would be a version of that autothrottle controlled by pedal chain tension.

Yet one more thing to test is a converter circuit that would let me use a hall-based throttle on any controller, even one that requires a pot, by basically using the hall output voltage to control a digital pot. Then the digital pot wiper and terminals would connect in place of the pot throttle, and the hall throttle would connect to the controls of the digital pot (via some intermediate circuitry). It's actually pretty simple, but would probably cost more than just replacing whatever hall throttle someone has with a pot throttle. Still, if a non-replaceable hall throttle had to be used with a pot-based controller, like my autothrottle that has to be a hall sensor for environmental and mechanical-simplicity reasons, it would at least allow it to work!

Until I finish the controller and can test it, I may pull the motor and batteries off the bike so I can at least ride it around. I did patch the tubes sufficiently that at the moment it appears to be holding pressure, though I won't be confident of them until I can replace them with new ones (or at least used ones that don't have any holes in them!).

Monday, June 8, 2009

Forks, sporks, springs, dorks

Well, except for me, there's no dorks here. But somewhere I do have a spork or two, and a few spring and forks.

The latest addion to the last category is this, from Freecycle:

It's a Honda 750 front fork, that leaks.

I don't really care about the leak, since I am probably just going to use parts from it, rather than the whole thing, for part of my rear suspension on the cargo trike. If it weren't so heavy (perhaps 25 pounds) I would consider using it *as* the rear suspension and mounting bracket for the wheel.

It does have some nice usable bearings on it, on the steering pivot.

I suspect that whatever leaks are there are caused by seals such as the rings here, or those internal to it.

Many of the non-shock parts above may be useful as well, once I think of something for them.

The handlebar clamps I may already have an idea for, in the USS part of the trike steering. They can unbolt completely from this assembly.

The wheel axle ends may also have a use, though probably not for actually holding a wheel. :)

One of them has the mount points for a disc brake assembly, though it's for a motorcycle style rather than anything small enough to be appropriate for the trike.

They, too, just unbolt from the ends of the fork shocks.


The shocks do compress quite easily at first, and have a dailable soft/hard response (at the top of each shock). I suspect that they would work well enough as the rear shock for the trike, but even by themselves likley weigh about 10 pounds each. It is more likely that I can use individual components from within the shocks, if they use springs inside as the main compression unit. I will have to look up a service manual for them before I attempt any disassembly, because if they are only hydraulic and not spring at all, then I will have to use them as-is.

That's not a huge problem, because eventually I may well need to build a motorcycle-class EV, once I have enough experience with the design and build of frames and EV systems, and this could then be one of the shock systems on it. I'd rather use bicycle-class for a number of reasons, but there may come a time I must go faster or have a bigger motor than allowed by bicycle-class laws.