On 4qd.co.uk we sell a range of motor controllers and accessories for your projects

Circuits Archive


PWM controllers - Part 4


This is the fourth in a series linked articles on the design of PWM controllers.

Issue 7 and 8 controllers



Current source
Now feeling a 9v1 zener. This is to give a supply line which can still stabilise when used on 12v. Previously, the current limit reduced with 12v supply as the reference is derived from this voltage.
Active pull up
The 4mA current source pulling up IC1b pin 14 had been removed. It wasn't necessary. Instead a 1K resistor is fitted. This takes 9mA at zero speed, which is a small disadvantage.
Main capacitors
There were two x 470. These were axial types, laid flat on the board. As was explained on the www site page, the choice of capacitor type is crucial for best performance, This one now used is a plug-in type, with short, stubby leads.
Regen Brake defeat
There used to be a switch shorting out Tr5 to defeat regenerative braking. Now the hiside driver has changed and three components are marked on the circuit. The 1K in Tr6's collector is normally fitted and is removed to defeat regen braking. At the same time a 10K into the base of Tr8 changes position. The operation of the hiside driver is covered in more detail below and there's also a section on inhibiting regen braking.
Catching diode
There is a diode across Tr4. This is to clamp gate voltage spikes to the 9v1 supply. The reason why this is required is involved and will be covered in time.
Regen current limit
There is a new bit of circuitry added sensing the top (flywheel) MOSFET. This is the hiside current limit. Its operation is covered later.
Overvoltage clamping
There is a 36v zener added. This is over-voltage clamping, covered below.

Hiside driver

Hiside driving is a crucial part of a motor controller. The circuit we use is very simple and works pretty well yet has low current requirements. It is a dual action circuit, bootstrap pump plus active pump. Let us consider the 'bootstrap' action first. Ignore the fact that there is a capacitor feeding from Tr10's emitter - that's the active pump.

When the circuit is at zero speed, not switching, Tr5 is off, the lower MOSFET is off, there is no motor current, so the top MOSFET is effectively shorted out via the motor. Its gate and all the gate drive circuitry is effectively at the positive supply rail.

As soon as the controller starts to operate, initially the motor speed (average voltage) will be very low. This is done by the low side MOSFET turning on for a very short duration. During the period that the low MOSFET turns on, the M- line goes low. So current flows from the B+ line through the two diodes and the 1K resistor, charging up the 1µ capacitor. A 1µ capacitor charging from 24v via a 1K resistor start to charge at 24V/mS (CV=IT or V/T=I/C) and at the oscillator is a nominal 20kHz, the whole cycle is 50µ seconds, so the length of a short pulse is only a few microseconds: it's going to take a few cycles for the 1µ cap to reach any useful voltage. In fact this doesn't matter: if the cap is not adequately charged, then the top MOSFET won't be turned properly on, but this matters not a bit as the MOSFET will simply act like a flywheel diode until the 1µ cap has adequately charged: it will still allow flywheel current to circulate, but the dissipation will be higher as its not turned on. That doesn't matter: as the controller has only just started switching and the average motor voltage is very low, then the motor current is very low too! Of course, with no gate voltage, you cannot get any regen braking - but then the motor is not actually moving at this point as there's not yet enough voltage even to overcome friction! The truth of it is that we only need the bootstrap pump: the active pump is pretty much unnecessary.

The only reason for the active pump is that it's possible to connect two 2QDs back to back, to make a full bridge controller. In this application, one or other controller (depending on the direction) must short the motor connection to battery positive when it is not operating. As we have just seen, the circuit doesn't do this with just the bootstrap pump, so the active pump is present for this application. The active pump works by a squarewave being applied to a capacitor. When the squarewave is low the cap charges via the diode from B+ and when the squarewave goes high, it discharges through the second diode and 1K resistor into the 1µ hiside reservoir capacitor, so the gate voltage is maintained at about 8.5v even when the MOSFETs are not switching.

You will also note that the position of the clamp zener has moved: in the earlier circuit it was across the reservoir capacitor. Now it is clamping the bases of the drivers to M-. This has the advantage that the zener current is low, limited by the base capacitor not by the diode series resistor, so that zener dissipation is not a problem and the circuit will work over a wider voltage range. That means the diode series resistor can be much smaller, so the capacitor charged much quicker. The disadvantage is that the NPN transistor now is subject to full supply voltage, plus the pump voltage.

Regen current limit

Tr11 and Tr12 are the regen current limit circuit. Whilst other controllers have current limit, they do not generally employ MOSFET Rds(on) sensing, but some more complicated or slower method. This circuit is unique to 4QD, and is a very simple, elegant and effective method of sensing.

Consider the circuit with reverse motor current flowing: the motor is regenerating and the current is flowing from M+, through the MOSFET and so to M-. When the top MOSFET is on under these conditions, the drive is trying to reduce the negative motor current and the motor's inductance keeps the current flowing against the battery voltage: this is regenerative current, recharging the battery. Clearly the top MOSFET will have a high voltage across it, so Tr11 will be conducting. Tr11 conducts (by virtue of the 10K+10K base resistors) whenever the top MOSFET has more than 2xVbe across it.

When there is less than 2xVbe across the MOSFET, then Tr12 may operate. It will not turn on if there is less than 1.3xbe across the MOSFET defined by the 10K and 3K3 base resistors) - with this voltage, the MOSFET is conducting normally. But if the current in the MOSFET gets too high, th3 voltage rises above this level and Tr12 conducts, injecting current into the input of the modulator. Since the current we are monitoring is MOSFET forward current caused by excessive regeneration, to reduce it, we need to reduce regeneration and we can only do this by decreasing the deceleration. In other words we have to accelerate, to increase the drive, to reduce the regenerated current. That is exactly what this circuit does.

Over Voltage clamping

You will have noticed the 47v zener diode across Tr12. It is chosen to be 47v because the MOSFETs used are rated at 50v. When the supply voltage rises above 47v, this conducts. The assumption is that the controller is regenerating too hard into a dud battery (maybe it has fallen off and has been left behind on the golf course). Clearly, we cannot regen brake if there is no battery present. So we need to increase the speed (as we did with excess regen current). This zener accomplished that. Clearly the level of clamping needs to be within the expected safe operation of the MOSFETs: 47v may seem a bit close to the allowable 50v, but remember that the 50v is an absolute worse case: we should never get a MOSFET which will fail at 50v and there is a manufacturer's safety margin. Remember also that this zener should never conduct. It only limits overvoltage under severe fault conditions. If we did not limit under this fault - then the controller would certainly be destroyed. Sailing close to the limits will still give very good protection.

However it's worth adding at this point that, in a vehicle using regen braking,it is the battery that is doing the braking and not the controller! If you live at the top of a large hill, it would be unwise to start out with fully charged batteries as you would then have no braking! Exactly what clamping voltage is required depend on the likelihood of this event happening. In fact it happened once, with one customer, using a 48v controller with 60v MOSFETs. and that controller now uses 75v MOSFETs for exactly this reason, with a 72v clamp zener! The change also required several other semiconductors to need upgrading to higher voltage devices.

Inhibiting regen braking

Why would anyone actually want to inhibit regen braking? I suppose because they've got a toothed belt drive and the regen transfers power the wrong way, causing tooth jump. See the article on the 4QD www site for more on this.

Some, golf caddy manufacturers mainly, think that, because they have a mechanical freewheel device installed, they must inhibit regen braking. Not true: because of the freewheel the regen braking can do nothing, so is not harmful.

The public access pwm circuit on the 4QD www site has explained how regen braking is achieved. Switching the hiside on when the loside is off results in better efficiency as the flywheel device is then a low value resistor (a turned on MOSFET) rather than a diode. The resistor generally drops less voltage, so is more efficient. The fact that the hiside is switched gives regen braking.

4QD have a very ingenious method of synchronously switching the hiside: in effect the hiside is now a synchronous rectifier: not a new technology, but as far as I am aware, no other company has used the principle on a motor controller.

To inhibit regen, the 1K is removed (as indicated on the circuit. so Tr5 is disconnected. The hiside would then be permanently on. But the b-e resistor of Tr8 is also removed and instead replaced by a resistor from Tr8's base to the battery positive line. That puts Tr8's base emitter straight across the MOSFET - via a 10K resistor to limit any current.

When the Hiside MOSFET is flywheeling, current is flowing 'backwards' in it from source to drain. The base of Tr8 is therefore reverse biased. It cannot be turned on. But when the motor current reverses, the situation changes.

Consider the situation just before the bottom MOSFET turns off. The top MOSFET will have a high voltage across it so Tr8 will be on. Tr7 and Tr8 form a 'PU pair' (see www site circuit) so both are turned on and the gate of the top MOSFET is hard clamped to its source. As the bottom MOSFET turns off, the motor current tries to flywheel through the hiside MOSFET. No problem if it's forward motor current, it will first flow through the top MOSFET's body diode. But as we have just seen, this caused a negative voltage on Tr8's base, so the pair turn off at this point and Tr6 pulls up the MOSFET gate, turning it on.

When the bottom MOSFET starts to turn on, first the current in it must rise until all of the motor current is flowing through it: this is the normal state with any controller and it is not until this has happened that the current through the flywheel device can fall to zero. With this circuit however the bottom MOSFET current must rise a bit further - until there is enough current through the top MOSFET so that is drops enough voltage in the forward direction for Tr8's base emitter to be turned on. At this point the PUT pair snap on, shorting out the MOSFET gate and turning it off. If this seems a bit drastic, have a look at the MOSFET transient current handling specification and remember that this overcurrent flows for about a microsecond.

Gate clamping

It is often said that you need a zener diode on the gate of a MOSFET to protect against voltage transients. It is rarely explained where these transients may come from. However permanent magnet motors of the type these controllers are designed for have commutators and brushes. These are switching the current rapidly between the appropriate winding as the motor revolves. The brushes arc. You can clearly see this arcing if you look at the brushes while the motor is working: only very well designed and new brushes will not arc significantly.

The first radio transmissions were made by means of a spark transmitter. Arcs are extremely good generators of wide band noise, and (as there can be a lot of current flowing) this noise can also be of very high energy. If the motor wiring just happens to have the correct transmission path to coincide with a generated noise transient, a whopping spike can travel back to the MOSFETs. This noise spike can be coupled through the MOSFET's internal capacitances to its own gate and if the gate drive circuitry is wrong, a gate voltage transient is generated which can destroy the MOSFET. So consideration needs to be made to this mechanism and clamping the gate is one of the methods used.

The problem with noise of this type is that there is no level at which the system is suppressed: there is always the possibility of a noise spike higher than your protection level arriving. It's a situation very similar to flood protection, earthquake protection or lightning protection, 'safe' doesn't exist! It's all down to statistical probabilities.

We learnt about this the hard way: issue 2 2QD circuit had a current source instead of the 1K pulling up IC1b pin 14. When we replaced this by a resistor, we suddenly got more seemingly random failures. This change was actually done first on the NCC controller, which uses the same circuitry here. One customer repeatedly blew the later circuit and not the earlier one.

Then we noticed that, stuck in the relay, between the pole piece and the armature, there were iron filings! When questioned, the customer admitted that he had been using an angle grinder near the system. Iron filings had got into the motor and the controller. You can imagine the noise that the filings must have caused when stuck in the brushgear!

The current source actually clamps the bases of the MOSFET gate drive resistors (via transistor collector base junction diode) to the 9v1 line where is it clamped by the zener. Replacing the current source by a 1K also replaces this spike clamp by a 1K. This had caused the reduction of reliability. It was fortunate indeed that we had this 'bad luck'- it it enabled us to identify a mechanism which is so rare on a properly designed controller that it is very difficult to identify: it simply appears to be occasional random and erratic failure, for no good reason. Problem is, that if you have a failure mechanism that occurs once every 100,000 controller-hours, you need enough controllers in the field that the rate of returns is sufficient for you to actually recognise that there is a pattern. Only then can you start studying the causes.

D6 clamps the gates directly to the 9v1 line, which is itself clamped by a zener to MOSFET source. In later designs a 9v1 zener at the emitters of the gate drivers clamps direct to 0v. D6 works here as the track path is very short.


That covers the 2QD circuit: the controller itself is now not a 4QD preferred product: there's nothing wrong with it and it's a very simple and reliable controller which is cheap to produce and works every time. As a DIY controller it's ideal. But the real market is demanding ever more sophisticated circuits. The controller that 'replaces' the 2QD is the Uni. It's boxed and a more cubical shape which seems to be far more popular.

Other relevant pages

Part 1
Part 2
Part 3
Part 5
Part 6
Part 7
Part 8
Contact Home Search

Page Information

© 2000-2011 4QD-TEC