PIC Speed Controller -- FAQ

A lot of people have built the speed controller over the last few years and several have asked me questions on it. Since I get tired of answering them repeatedly :-) I've created this FAQ. In the future when you e-mail me I may send you here, so there.

Frequently Asked Questions

Why do I blow up PICs ? 

If you laid out your own board using the schematic for the PIC board then you have been bitten by an egregious error, the Vss and Vdd pins are reversed! This connects the PIC backwards to power and smokes it. When Prabal laid it out he must have fixed that and forgotten to tell me about it! Thanks to Drew Ames who figured that out. (Note: I've updated the page_2.gif file to be correct now, unfortunately I can't regenerate it from OrCad since the key is expired!

Why do I blow up FETs?

There are a couple of reasons you might blow up FETs using this circuit. The first is that there is no over voltage snubbing on the outputs so if your motor has a fairly high inductance, when you pulse the low side (as the program I wrote does) the turn-off spike is fed back into the batteries (the upper FET is held on). However, if there is moderate parasitic inductance in the wires feeding the board, then you get a voltage spike instead. This spike can, if the battery inductance is high enough, exceed the max voltage rating of the FETs. You can minimize this by putting a large low inductance capacitor across the input voltage pins.

Another reason you might blow up FETs is that there exists a condition when the input is > 9V where the gate on the high side FETs can be popped. It works like this:

The MAX622 is putting out Vcc + 11V, lets say you put 12V in. Now when the power is switched on to the motor the motor is in a "stall" condition, so the input voltage to the motor sags way down as current is being sucked out of your battery. Now if that voltage sag is > 8V the gate on the high side FET "sees" 21V, which exceeds its 20V limit and the FET blows up. 

Now this latter effect I hadn't seen because all of my R/C car motors were 7.2V motors so the worst case was something like 18.2V which is within the gate max. Its probably ok with a 9.6V motor but I wouldn't drive it with much more than that if you can help it.

Can I use a slower/different PIC ?

Of course you can. However, as you can see from the code it is tied fairly intimately to the clock rate. If you simply use a slower clock you can simply "stretch" everything in time appropriately. So a 10Mhz clock will give you a 1Khz PWM waveform and it will go into 'break' mode with a 3mS input pulse, full forward with about 5ms and full reverse with about 1ms pulse. You will have to update the pulse at least once every 40 mS.

It is not difficult to make these adjustments if you are driving the circuit from a computer, it is much more difficult if you are using an R/C radio.

Or you can rewrite the code a bit to give fewer speeds. Drew Ames did just that and has it on his site here: http://www.rebel.net.au/~drew/picuser

Where can I get the MAX622 ?

This is getting harder to find. You used to be able to call up Maxim's sample line and they would send you two for free but they are running out. I recommend www.findchips.com as a source for finding distributors.

How much current can this thing handle?

If you use IRF1408 FETs, the bridge can handle about 12amps steady state (meaning it won't burn up even if you left it on 100% all day. That is without heat sinks on the 1408's. If you add heat sinks like the standard TO-220 ones, then you can go to 15 amps without too much trouble. If you add a fan and heat sinks then 20 is possible, maybe even 25. (Again at 7.2V) With the FETs I used (the Phillips ones) it was closer to 5 amps. See my analysis on FET power to understand that limitation.

How do I increase the current ?

Well you don't really. One of the things I would do differently (see below) is how I would build the high side driver. The MAX622 only puts out a few mA of current and so it has a harder time driving the gates (which look like capacitors) into a conducting region. This in turn results in slow 'turn on' time and higher switching losses. That makes the FETs get hot and they can and do burn out.

Can I buy some of the kits you made up ?

Nope, I did a run of 50 and distributed them. You are welcome to put together a group and make up the kits but unfortunately I don't "stock" them. On version two I'll have a bunch of PC boards made up so they will be available.

Where can I get a Printed Circuit Board ?

I got my original prototypes at Alberta Printed Circuits in Canada. They were fast and not too expensive. Doing 2 boards is expensive, doing 10 is less so, and doing 250 is down right cheap. If you go that route (250 that is) consider a circuit board house.

Where can I get a pre-programmed PIC ?

I used to offer them but it takes way too much of my time. Sorry, if you use the 4Mhz code above you can flash it into one of the flash parts that are easy to program.

Can I sell this kit to others ?

Not as a business, no you can't. If you're a robot group or an R/C club and you are doing a group buy and splitting the costs then fine, but if you're a commercial speed controller manufacturer and you've ripped off this design and make it in Taiwan and sell it for $69.95 then I will send someone after you.

Do you use this circuit ?

Yes, I've got three robots that use it, all three are based on 9.6Volt/5amp motors. When I decided to build a 'BattleBot' class R/C chassis I did not use it.

What would you change if you could do it again ?

[Updated because I am doing it again :-)] 

The key change is the high side driver. There are a number of chips that do this in different ways, I'm planning on using a spit 15V supply (one isolated, one not) to drive the high side. Then a different set of driver chips such as the Linear Tech ones or the International Rectifier ones. Some decent snubbers to catch the transients that occur when you're switching things on and off, with an over voltage snubber to protect the FETs.

Then I would add two FETs in parallel on each leg. That would give me a nice 10 amp controller for 12V motors with only minor heat sinking. Finally I'd use a new PIC that can generate the PWM signal in hardware to make it nice and smooth. 

Copyright 2001, Chuck McManis, All Rights Reserved