Making the Turquoise Motor Controller

the Electric HubcapTM System
Solid State PMSM/Brushless Motor Controller Making Manual

by Craig Carmichael
Inventor of the Electric HubcapTM vehicle drive motor & system
Last Update: October 17th 2010

NOTE 2014/12/13: I've posted this manual chiefly for historical purposes.
This controller is a bipolar BLDC Motor controller using the MC33033 Motor Controller Chip,
with PWM Modulation (no CRM - current ramp modulation) and no improved current sensing.
Some even older motor controller design ideas are present in the text.

Unipolar BLDC motor controller using MC33035 is to be posted when it's ready.


1. Introduction

2. Making The Wiring Box

3. The Motor Controller
a) Versions
b) The Layout
c) Mounting and Wiring the Power MOSFETs Assembly
d) The Circuit Board:
Control Electronics & MOSFET Gate Driver Schematics
e) Soldering the circuit board

4. Terminal Blocks for Heavy Wires

5. Mounting the Wiring Box Components


This manual discloses information about newly designed, innovative equipment that may be hazardous to make and use, in ways known or unforeseen. The author will accept no liability for anything whatsoever that happens to anyone as a result of their making use of this information. I am not omniscient. I have done my best to describe potential problems as far as I can foresee them. I picked 36 volts for the Electric Hubcap motor instead of 120 or more to curtail the potential for electrocutions. It is up to the user of this information to take whatever precautions he feels are necessary and to accept the consequences of his own actions.

1. Introduction

   While originally created for an electric motor for a car, this is a rather generic solid state motor controller design for three-phase permanent magnet synchronous motors (PMSMÕs) or brushless motors which are to be run from DC power supplies.
   The motive components of these motors consist of a stator with electromagnet coils and a rotor with permanent magnets, usually supermagnets. Cycling the three sets of electromagnetic coils north, south, and off at the correct points or rotor rotation repeatedly and continuously pushes the rotor magnets in one direction, clockwise or counterclockwise, and spins the motor. There are no electrical connections to the rotor, and no commutator with brushes is used. (hence the term "brushless motor".) Instead, the stator has mounted at specific points three solid state hall effect magnetic switches or a triple optical commutator, to tell the motor controller where the rotor magnets are in their rotation and hence which coils to activate at which polarity at each instant to provide continuous turning thrust. These are described here and in the Electric Hubcap Motor Making Manual.
   The controller features variable power (and hence variable speed) by pulse width modulation ("PWM") of the coil currents, and forward/reverse control.

   There are now two versions of the logic circuits, the one I designed originally which is mentioned mainly for historical reference, and a second one based around the MC33033 brushless motor controller chip from ON Semiconductor, which chip I hadnÕt known about. (Now apparently that chip is to be phased out. The next version is to incorporate the Allegro A3938 brushless motor controller chip instead. A later version could be made with a microcontroller to provide advanced features such as "recharge the batteries while driving on gas", but I don't want to complicate things for "DIY" with the need to program a chip.)
   My first version incorporates a low motor speed protection circuit to limit drive current at stopped and low RPMs.
   The MC33033 version incorporates a cycle by cycle overcurrent shutoff that shuts off the drive for the remainder of each PWM cycle when the current through the mosfets hits a preset limit. This is better.

   This motor controller is mounted in the wiring box inside the car near the motor. (Or of course anywhere one of these motors is wanted - I've just made (2010/10/17) an "Electric Hubcap" outboard motor, converted from a 7.5 HP gasoline outboard.) All wires & cables related to the electric drive system start or end inside the wiring box: the batteries, the motor, and the operator controls (& displays if any).
   It could well be said that the nature of the task is "making a wiring box, which contains a number of components including a solid state motor controller".

   The box is made of aluminum, a convenient metal to work with that also conducts heat exceptionally well, making the entire box an extension of the heat sink of the motor controller.

   The wiring box has the following components:
1. Circuit breaker/switch. Manually shuts off the entire system.
2. "Solenoid" (12 volt coil Contactor Relay). Switches the power on via the carÕs ignition key.
3. Motor Controller.
4. Motor Spike Filter Varistors.
5. Heavy Wire Terminal Blocks and grounding bolt.
   The motor controller can be divided into two main sections:
1. The control circuits, mounted on a small printed circuit board.
2. The power drive circuits, a hard-wired assembly of power mosfet transistors on a heat sink, with their associated filter capacitors, fuses, spike filters and connection blocks for the motor wires.

   The finished box is mounted inside the car as closely as possible to the motor it drives, both to reduce voltage drop and to minimize transients. The power cable to the motor must be no more than about three feet long. The leads on the motor (10" max?) and the output leads on the controller (6" max?) are in addition to that, so it can be a little over four feet total from the transistors to the coils.

Note: Sometimes a controller is mounted in or on the motor itself, but in the Electric Hubcap case such an arrangement seems disadvantageous:
a. itÕs out in the weather, unheated
b. itÕs added unsprung weight (perhaps a minor point)
c. in this motor, thereÕs not enough room
If the vehicle is a pickup truck and a rear wheel(s) is driven, the box must be weatherproof or inside a weatherproof box or area. (I may mount a controller under the hood of the outboard motor.)

2. Making The Chassis/Wiring Box

   My current visualization (after considerable experience) of the most practical layout is an aluminum box about 6" wide, 10" tall, and 4.5" deep, with the motor controller occupying one removable side. More generally, the box has to have the height and depth of the motor controller side piece, currently 4.25" x 10". The depth depends on the circuit board size and on how closely the two rows of heat sink are spaced. It could all be done in less space, but the power transistors should be well spread out from each other for good cooling, to avoid destructive thermal run-away. The width of the box is "whatever" as long as there's room for the components and wiring. The test unit for the shop is 7" wide, the one in the car is 6", and the one for the outboard motor, if it is to fit under the hood of the outboard, must be only about 2" or so - I'll be looking for a very small circuit breaker!
   It is intended that the box be mounted on a vertically oriented surface, eg, the rear face screwed to a wall of the car. The box can be oriented vertically (preferred), sideways with the heat sink fins up, or to any diagonal position that fits well and lets rising air flow past the heat sink fins -- or to any position if the cooling seems adequate.

   In the prototypes the motor controller was mounted in the front cover of a shallower box. This was a poor arrangement. With the heat sink fins attached, it was effectively quite deep anyway, the power wires had to be longer to attach them to the open cover, and the wires were being moved around as the cover was being closed, without being able to ascertain they were in good positions (eg, not pushing on circuit board components) once in place.
   If, on the other hand, the motor controller had been mounted in any non-removable part of the box, the whole box would have to be dismounted from the car to service it.
   For that reason, the removable side idea was chosen. Even if an off-the-shelf aluminum box is found, one side will have to be replaced with a removable aluminum panel, about #12 gauge.

   The front and back of the box can be flat aluminum covers that screw on to the "frame" side pieces. The back should be about #12 gauge; the front cover can be thinner, #14 or #16 if desired. Alternatively the back, top and bottom may be one piece (#12), bent around, with 1/2" lips to hold the top and bottom edge of the front cover.

   On the left (or right) side panel (10" x 4.5") the motor controller is mounted. This whole side with the controller can be unscrewed and removed from the rest of the box for replacement or servicing. The aluminum "roof flashing" heat sink fins are on the outside of this face. (Note that the screws for the back cover, and probably for the top or bottom or both if used, must be screwed on from the inside to be accessable once the box is mounted.)
   The breaker/switch is located on the top or the other side from the controller, as convenient, or an external battery post mounted switch may be used.
   The solenoid, terminal blocks and grounding post are attached to the back of the box.
   The filter capacitors sit in the bottom of the box, clamped in place.
Wire and cable entry holes are made where practical and convenient.

   Of course, Turquoise Energy Ltd. plans to offer ready-made wiring boxes complete with controller and all parts as soon as itÕs possible to do so. (That just isnÕt going to happen this month, April 2009!)

A convenient construction of the box is with the following aluminum sheet metal pieces:

1. a flat 6" x 10" back cover piece, #12 gauge.
2. a flat 6" x 10" front cover piece, #12 or #14 gauge.

   There are a number of options for the edges. If there is no access to sheet metal bending equipment, the edge pieces are cut to just the 4.5" depth of the box, and six feet of ŌLÕ angle of about 1/2" x 1/2" (or 3/4" x 3/4"), by about 1/8" thickness, are purchased to attach the sides to the front and back covers. Another 12" - 16" or so of ŌLÕ can be bought to connect the edges of the frame together at the corners.
   Otherwise, the pieces are 6" (or 6.5") across and 1/2" (or 3/4") lips are bent along the edges forming a shallow bracket ( Ō[Õ ), leaving the 4.5" remaining width for the box depth. (Note: see drawings for the latest dimensions)

   I got excited when I found extruded aluminum brackets (Ō[Õ) were made for windows, 2.5" wide with 3/4" lips. Surely four short lengths of that would frame the controller box, with flat covers on both sides and no aluminum bending required! Then I decided the motor controller should go in the side, requiring a deeper box, and I couldnÕt find similar but deeper 4.5-6" wide strips. (There are such shapes more or less, but they are "structural", eg with aluminum 1/4" thick.)

3. a 4.5" or 5" ('depth', per above) x 10" side piece of about #12 gauge to mount the motor controller on. This may be extended to 11" and 1/2" lips bent into the ends to meet (and maybe screw into) the other sides.

4. The three remaining 'frame' edges may be formed from one piece, two or three, and may be a thinner gauge than the piece the motor controller mounts on, eg #14, if desired:

(a) a single 'depth' x 25" piece is formed into a shallow bracket, '[', the folds being .75" each and the main side area 4.5" across. The edges are then cut at 45¼ angles to make 'V's at 7.5" and 17.5". The piece is bent 90¼ at those locations to make three sides of a rectangular frame. For the last .5" at each end the overhangs are cut off and the ends are bent over 90¼ to form .5" lips onto the fourth side.

(b) Three separate pieces, 6", 6" & 10". Again 1/2" can be added as required for tabs to attach the frame pieces together.

The aluminum pieces for the box: Flat (a couple of pre-bent lips); bent; fitted; motor controller side removed.

   The size of the controller was at first 8" x 10". When I layed out the parts, it didn't seem to need that much room, and I cut it down to 6" x 10". It's looking like it could easily be smaller yet.

The motor controller (top side) in the chassis box

Box with controller side removed.

    The next three diagrams show the pieces of sheet aluminum. (CAD? What's that?) All the pieces should be about #12 gauge (~.080") except the cover, which may be #12 or #14. If thinner pieces are used, the screws that hold them together and hold the equipment in place may strip and things will come loose. (I discovered this using a thinner piece (#14 or #16) for the long side opposite the controller.) The front cover may take bashing by luggage in the car, so it shouldn't be too thin either.

   The cover in the photos has seven holes, but four is plenty as per the diagrams. The side holes are really extras, and the middle hole on the controller side puts the screw right against the circuit board and should be omitted. Likewise, the center screw through the back cover has the screwdriver rubbing up on the PCB and should be omitted.
   Another good idea would be to make the side flaps of the motor controller piece 1.5" deep like the bottom flap, with the screws at 1.25" also like the bottom. This would get the screwdriver a bit farther from the circuit board. Note that there are no holes near the bottom of the side flaps - it would just be too hard to get the screws in and out.

   I finally fabricated this motor controller enclosure conception in July 2009, after having done circuit boards in June.
   Final dimensions of this enclosure are 10" x 6" x 4.5", excluding the aluminum "roofing flashing" heat sink fins.
   The 10" height allows speading the power components for physical space and for good heat dissipation.
   The 4.5" depth is to the inside of the two covers, ie, the wall heights. The motor controller won't fit if it's less. (A narrower PCB, eg with surface mount components, would allow a slightly shallower box.)
   The 6" width provided enough interior space. (Originally I cut it 8" wide, but it seemed to have waste space and I cut it down. Worse than cutting the aluminum was having to re-do 2 of the 3 layout diagram sheets.)

3. The Motor Controller

a) Controller Versions: constant speed versus constant power

   There are two versions of the motor controller that differ as to their mode of control, selected for best control for a given application.
   In the first version, using the MC33033 chip, pulse width modulation (PWM) is used to vary the effective voltage supplied to the motor. The motor's no-load speed varies directly with the voltage. The effect is as if the motor was being supplied from variable voltage batteries. Hence, setting the control to a specific point causes a specific no-load motor speed. This speed will drop somewhat under load. If the load is too great, a separate fixed current limiting system cuts each PWM cycle off early if maximum current is reached, to prevent overloading the motor and to the controller. Essentially, the motor speed under steady load can be set by the position of the control and it will continue running at the set speed.
   In the second version, using the A3932 or A3938 chip, current limiting is the only control. Instead of fixed PWM, the current limiting can be varied from 0 to the maximum allowed motor current. The motor coils are powered, and the current starts to rise until the trip current is reached. When that happens, the motor is shut off for a short fixed off time, then another cycle commences. As the maximum current selected rises, the cycles lengthen, with more and more ON time versus the fixed OFF time. The effect is more like a car gas pedal: the higher the current selected, the harder the motor drives, regardless of its speed. With more current, it will continue speeding up until it hits full speed, and with less, the thrust is reduced. It's ideal for a car drive system, however it's difficult to set the motor to any constant speed.

b) The Layout

The motor controller layout: Control circuit board, with 3-phase MOS gate driver and MOSFETs separate on heat sink. Note that orientations of the circuit board and connector pinouts in the text (eg "left" & "right") refer to the orientation seen here. Use stranded wires to the circuit board, short and direct.
It seems bizarre to go straight from tiny component leeds to heavy electrical wire - but it works. Use highly flexible heavy wires (also short and direct) -- ones that are too stiff are difficult to work with and could break pins off of the MOSFETs.

Earlier unit with fuses on every pair of mosfets - not needed once units are working reliably.

Not shown, a 100 K - 270 K ohm resistor is now soldered between pins 9 and 13 on the MC33033 to pull the PWM input to ground, to prevent unexpected motor starting if the controls aren't connected.

   The general layout is that the motor controller base is one side panel of the aluminum wiring box, 4.5" x 10". The power mosfets are screwed to two parallel bars of 1/4" x 3/4" x 9" aluminum, one for the high side transistors and one for the lows. Roofing tarpaper is used to electrically insulate the transistors from the metal.
   The bars mount by three or four screws each, through the cover and through two similar 1/4" x 1/2" x 9" bars on the outside. "Fans" of thin aluminum "roof flashing" pieces are clamped under the outside bars for heat dissipation from the mosfets to the air.

   The edge of the logic circuit board having the mosfet wiring contacts mounts on the screws holding three of the low side mosfets in place. (The board could also screw onto a standoff or two near the other edge.)

"Roofing flashing" heat sink fins on the outside. On this first prototype the clamping bars are 3/4" wide and there are three clamping screws on each bar. This is now replaced with 1/2" wide bars. Note that the bottoms of some of these same screws are visible in a previous image where holes are punched in the tarpaper between mosfets.

c) Mounting and Wiring the Power MOSFET assembly

   For a circuit of a hundred and more amps, a printed circuit board seemed inappropriate. (A prototype board caught fire!) Direct wiring of the power metallic oxide semiconductor field effect transistors (MOSFETs) is employed. It is vital to minimize wire lengths and to dampen transients to protect the transistors. After trying or laying out in concept many arrangements, I finally came up with the compact, short wires, two-row layout seen above.

   Insulation (tarpaper) covers the two bars, which are drilled with six holes for the MOSFET transistors.
   TO-247 package MOSFETs (IRFP3206) are used to avoid the extra bits and finicky job of having to place insulators around the bolt holes as would be the case with a TO-220 package.
   The holes were marked on the tarpaper and then punched out with a paper punch. This is much easier and cleaner than using mica or specialty cloths and silicone heat conducting grease. It appears to provide acceptably good thermal contact. (Unfortunately the metal backs of the transistors connect to the drain rather than the source, so both low and high side drivers need to be isolated from the grounded heatsink.) I insulated the area between the rows as well as an extra measure.

   The holes are drilled with a 3/32" drill bit and tapped for #6-32 machine screws. That's the biggest size that will fit through the mounting holes in the transistors. You need screws about 3/8" long for 1/4" thick aluminum bars.
   The spacing between the two mounting hole rows is 2.25". The transistors in the rows are 1.5" apart. I offset the lower row 0.2" to the right of the upper row so that the drain pins of the lower transistors line up with the source pins of the upper ones. These are soldered together with #10AWG bare solid wire. As the transistors are doubled up, the two sets must be tied together and with the cross-connection, the wire forms "N"s between the rows. They are slightly 3-dimensional: the lower angle of the "N" is bent up to clear the source pin it passes by so closely. Heavy #8 AWG wires are soldered to the centers of the "N"s. These go to the filters and to the coils of the motor.
   The spaced out layout provides room for filter capacitors across the DC lines, and spreads the transistors out across the heat sink for better heat dissipation.

   I used six 100uF, 100V electrolytic capacitors and six 0.1uF ceramic capacitors in parallel, at each transistor pair. Electrolytic capacitors are slow acting but can absorb large spikes, while ceramics are fast acting on sudden or high-frequency spikes but of insufficient capacity to smooth large potholes and rocks in the path. If the capacitors start popping, replace them with higher rated ones. (I may need to look for special "high current" capacitors.) Three 220uF, 63 volt capacitors popped on one prototype controller operating at about 1KHz PWM frequency, hence I went to six of higher voltage rating, as well as a lower PWM frequency for other reasons. Later the leads of the 100V capacitors burned off, so I'm about to try 200V ratings. Beyond that one might employ motor "start" or "run" capacitors, but those are physically very large.

Note: see next: no fuses on each transistor...
   The drain pins of the high side are bent straight up and soldered to two lugs for the automotive fuses (not as per photo, which shows an older layout with single sloped fuses) and to the filter capacitors. A "bus bar" (3/16" copper rod somewhat flattened with a hammer or a rolling mill) is placed across the bodies of the transistors (as seen), and the lugs for the other side of the fuses are soldered to it. The lugs usually come with plastic over the solder/crimp end, and these should be pulled off for this job.
   The choice of four 30 amp AGO automotive fuses per phase is based on the fact that they are common, cost under $1 each and are small, while any 120 amp fuses I could find are special order, very expensive, very large, and sit in fuse holders that are so large they might well necessitate a larger wiring box. (Later I found more suitable fuses at a marine supply store. The AGO are still much more common.)
   It should be noted that although two IRFP3206 mosfets in parallel are theoretically rated for 240 amps - and considerably more peak pulse amps - and the four 30 amp fuses per phase should blow at 120 amps, they aren't enough to protect the mosfets in all circumstances. [Note June 2009: with the new MC33033 motor controller, the current is limited to safe values by the controller, theoretically even if there's a short circuit.]

Common Fuses for whole bus...
   In view of protection by the motor controller chip, I've decided in future controllers to simply have about 160 amps of fuses (4 - 40 amp fuses in parallel) on the main bus, and to simply solder the mosfet +36V pins, bent upwards, to a common copper bus bar or wire run across from left to right.

An alternate +36V bus bar design, 1/8" x 3/8" copper bar, from a "foundry" metals dealer. Has holes drilled to solder in the fuse pin sockets, which is a better arrangement.

   The source pins of the low side transistors are done similarly with a "bus bar", except on that side, I stripped the insulation off the heavy stranded black wire and continued it behind the front aluminum bar under the transistor pins as the "bus bar", almost unseen in the foto. The 'source' pins are bent down and soldered directly to the bare wire.

   Try to connect everything to the thick base part of each transistor lead and cut off any useless extra length.

MOSFET Mounting and Wiring.
(PCB clamps onto three screws of the low-side mosfets, with its edge on top of the mosfets.)
Markings on PCB solder pads:
"U" Mosfets -> H A L
"V" Mosfets -> H B L
"W" Mosfets -> H C L
(H = High gates, ABC = Phase Output for 'Sense', L = Low gates)
Other connection pads:
B+ (36 v to power PCB), Gnd (chassis), VS- (Mosfets current sense to motor controller chip).
Not shown: the doubled-up fuse clips for dual 30 amps fuses.

d-NEW) The Control Circuits/PCB
[MC33033 Version]

   In broad outline and working backwards, the motor controller has spike filter components to protect the output transistors, power MOSFET output transistors rated to source or sink up to 240 amps to or from each of the three motor coil wires, three "half-bridge" mosfet gate driver chips (MGDs) that supply the floating voltages and high transient currents required to drive the mosfets, and an MC33033 brushless motor controller chip that decides what coils are to go on and off moment by moment, based on the operator controls and the optical commutator.

   The control electronics and MGD circuit is mounted on a small printed circuit board (PCB). The basic "generic logic" controller is here replaced with the new one with the MC33033 motor controller chip. (Strangely enough, going to the custom chip saved only one chip, going from 5 down to 4. However, they are smaller chips reducing the pin count from 78 to 44, and there are also fewer passive components.)

   Below is the schematic. The small printed circuit board (PCB) layout is [will be] on line at Within broad limits, the only changes required for various three-phase PMSM/brushless motors of different RPM, voltage and current ratings are a few component values and the number and ratings of the power mosfets used to drive the motor coils.

   The logic power is derived from the battery supply. Since 36 volts is above the ratings of a common 7812 voltage regulator, a 12.6 volt zenor diode feeds the base of a TO-220 case NPN transistor to derive 12 volts for the logic. The resistor chosen will depend on the battery voltage to supply adequate current to feed the base of the transistor while keeping the zenor at 12.6 volts. The transistor should be chosen to handle the intended battery voltage, ie 36 volts nominal for the Electric Hubcap motor, so the transistor should be rated for at least 50 volts. I confess I haven't bothered to calculate the power of the transistor. If it gets too warm, it may need some sort of heat sink. It's also just possible the transistor should have a small capacitor between the collector and base to eliminate any high frequency oscillations, and again I haven't worried about it as I write this.

   The motor overcurrent circuit senses by attaching the power mosfets ground supply through a sensing resistor. The overcurrent sensor is tripped when the voltage across the resistor hits +0.10 volts above the logic board's ground. For 150 amps this "resistor" is about a 6 inch straight length of #12 wire. (Don't coil the wire - then it's an inductor! That's bad.) You can look up the resistance per foot of various copper wire guages on the web and calculate for your desired maximum motor current.
   Here's the pinout of the pads for the wires to the power mosfets:

Connect To
B+ Battery Plus Voltage (Powers Circuit Board)
2 H High Side MOSFET(s) Gates, phase A
3 A Output of phase A (floating voltage reference for A high gates)
4 L Low Side MOSFET(s) Gates, phase A
5 H High Side MOSFET(s) Gates, phase B
6 B Output of phase B (floating voltage reference for B high gates)
7 L Low Side MOSFET(s) Gates, phase B
8 H High Side MOSFET(s) Gates, phase C
9 C Output of phase C (floating voltage reference for C high gates)
10 L Low Side MOSFET(s) Gates, phase C
11 V- "VS-" Common wire to MOSFETs low sides (Coils Current Sense)
12 Ground Secure ground for the circuit board - wire to chassis ground.

    Here are the pinouts of the two header strip connectors, left to right. (Check the orientation - I got a Pico header socket that has "1" marked at the wrong end... But if I'd soldered the headers in the other way around it would match.)


It is intended at the other end of the motor sensors cable to have a 5 pin "trailer lights" plug to the optics or hall effect sensors. A two pin "trailer lights" plug will connect the temperature sensor.

1. Optics Ground

2. Optics LED Supply                 via resistor
3. Opto A                                  Phototransistor outputs
4. Opto B
5. Opto C
6. Motor Temperature


1. Ground
2. Logic Supply (+12V)                   (An Output for external use.)
3. Motor ON/*OFF                          Motor is enabled by HI - has pull-down res.
4. Forward/*Reverse                      Direction arbitrary
5. Gas Pedal Pot - wiper                  3 leeds to potentiometer
6. Gas Pedal Pot - top end               (pot. bottom end goes to ground)
7. Opto A (Hall switch A)                  for tachometer
8. Opto B (Hall switch B)                  two are needed to sense motor direction
9. Motor Temperature                      (10mV/degree K for LM335, AD590)
10. Battery Voltage Sense                Onboard resistor divider, B+ / 10 V
(11. Motor Current Sense)                (0 - 100 mV at 0 - max. current - for some future revision)
(12. Ground)                                    (for some future revision)

   Note that one could stick a microcontroller between the operator controls and these input lines, and "trick" this controller into doing things like regenerative braking, beginning (eg) as soon as the foot is near the top of or off the gas pedal, with heavier braking when the brake light comes on. (Regenerative braking is the only reason for the connection to Opto B - you only want the motor trying to run backwards to vehicle motion, so you have to know which direction the vehicle is going!) Of course, one could also replace the MC33033 with a microcontroller and have an "advanced" controller with just four chips. But of course, any microcontroller adds the challenge of programming and testing with very close attention to detail: software bugs could make the car do something unexpected, or burn out the motor.

  A3938 version connectors.

There are three header strip connectors on the PC board. All have ground and Vcc as the first two pins. (I haven't decided the best voltage for Vcc - probably I'll settle on either +9V or +12V.) One connects to the magnet sensors in the motor, and a second one connects the operator controls at the front of the car or other control point.
   A third connector provides various statuses and readings. Since the battery voltage is the only really important reading, and since it can be obtained from the heater wiring to the front of the car, this connector is optional. It also has a PWM input from an external source, and it can also be used in conjunction with the second connector to provide external computerized control over the motor if this is desired.

MOTOR CONNECTOR (5 pins, matching 5 pin rubber trailer lights plug):

1. Ground
2. Power (+8 v to +12 v for hall effect sensors, comes through a resistor (eg 100 ohms) to prevent damage in the event of a short circuit.)
3. Sensor A
4. Sensor B
5. Sensor C
6. Motor Temperature Sensor (to separate 2-pin rubber connector if used)
Temperature Sensor, eg, AD590, LM335, thermistor. I prefer the first two, either yielding 10.0 mV/¼K)

This is the same as for the MC33033 controller except for the addition of the 6th pin to the header to optionally connect a temperature sensor.

OPERATOR CONTROLS CONNECTOR (8 pins - to controls at front of car)

1. Ground
2. Logic Supply (+8 to +12V)          (An Output for external use.)
3. Motor *ON/OFF                           Motor is enabled by LOW on A3932/A3938 chip - has pull-down res.
4. Forward/*Reverse                      Direction arbitrary
5. Gas Pedal Pot - wiper                  3 leeds to potentiometer
6. Gas Pedal Pot - top end "Vref"     (pot. bottom end goes to ground)
7. Brake switch                               (from brake light switch)
8. Brake Pedal Pot - wiper               (if installed, for regen braking)

   The first 6 pins are the same as the MC33033 version, but the motor on/off switch sense is reversed, and the Vref for the potentiometer(s) is a lower voltage. The differences in usage are owed to differences in the controller chips themsleves. ("It's not my fault!" - Han Solo)
   The "brake switch" input, if used, can connect directly to the brake lights of the car, and must be grounded if not used. I suggest not using it on a car system as it provides a fixed, heavy braking, and there's no safety if the driver mosfets overheat. Pin 8 is only a theoretical input - it's not connected. Essentially, pins 7 and 8 are intended for some hypothetical future version of the controller that adds regenerative braking with connections to the brake pedal. (The wisdom of such additions is doubtful - the world is full of extra 'reserved' connector pins that are never used... like the old DB-25 for serial communication that needed only 3 - 7 wires. However, pin 7 is in fact usable for some applications, and the 8 pin plug can't be confused with the 6 pin one to the motor.)

OPERATOR/MICROCONTROLLER DISPLAYS/INFO CONNECTOR (Optional), 10 pins - may be used in conjunction with above connector to provide computerized control of the motor.)

1. Ground
2. +12 volts
3. Opto A (Hall switch A)                  for tachometer, microcontroller
4. Opto B (Hall switch B)
5. Opto C (Hall switch C)                  (two or three are needed to sense motor direction)
6. Motor Temperature                      (10mV/degree K for LM335, AD590)
7. Battery Voltage Sense                Onboard resistor divider, B+ / 10 V
8. Motor Current Sense                    (0 - 100 mV at 0 - max. current - for some future revision)
9. A3932/A3938 Fault output status  (low = normal, high = fault)
10. External PWM Control                (PWM control can be used with the A3932, but must be supplied externally.)

(Some might prefer to simply monitor battery voltage with a voltmeter connected to the heater cable, so this instrumentation isn't essential for basic car operation.)

Schematic diagram of the motor controller, excluding the power mosfets with their filter capacitors and fuses
My old Eagle files of the Schematic and PCB layout are below. Note that the DIP version of the MC33033 is apparently no longer available. There appear to be problems with the board layout - it's not the same as the picture below, and I can't find the original. The user will have to do some editing to recreate a usable board.

* MC33033MotorCtrlr-V3.brd

   The astute may notice that the "high" outputs of the MC33033 go to the "low" inputs of the IRS2003 half-bridge MOS driver chips (and vise versa). By some quirk, those are both inverted, while the MC33033 "low" outputs and the half-bridge "high" inputs are both not inverted.
   Furthermore, the MC33033 pulse width modulates the "low" drive signals where it seems more logical to me to modulate the "high" sides.
   Proof is in the pudding: the controller works.
   In practice, the motor *should* run the same with highs to highs and lows to lows -- but only because the half-bridges are internally protected from having both outputs turn on at once.

Circuit Board. (Version 2009/07/06)

   Note that the MOSFETs/heatsink wiring assembly and the wiring box filters and motor connections aren't shown here as they aren't on the PC board. The heatsink mounted components are in the schematic below. The solder pad wires are wired to the heatsink components as indicated by the pinout, except that "G" goes to chassis ground. (It should be wired and not left to the bolt to make the connection.)
   The wiring box components - spike filters and motor connection terminal blocks - are shown in the hand-drawn "Heavy Wiring" schematic in chapter 5, "Mounting the Components in the Wiring Box".

Some alternate component values for Different Motors.
(Beware!, some of these are only estimates,
educated guesses, or wild guesses!)

   To drive single mosfets, the six gate resistors might be around 27 ohms each. Doubled-up mosfets: 15 ohms. Tripled: 10 ohms. To reduce spikes, use larger resistors. To get faster switching (and hence reduce power dissipation in the mosfets during switching), use smaller ones. Another way to reduce switching losses is to reduce the PWM frequency.

MOSFETs (I've really only looked at International Rectifier MOSFET specs):

24 volts: How about IRFP4004, or IRLS3034-7P (40 v, 240 a, .001 ohms ON resistance)?
(Say, these look even better than the 3206s!)
up to ~140 amps - single MOSFETs
up to ~280 amps - doubles
up to ~420 amps - triples (These are just guesses.)

36 volts: IRFP3206 (rated 60 v, 120 a, .0024 ohms ON)
up to ~70 amps motor - single MOSFETs
up to ~140 amps - doubles
up to ~210 amps - triples

   36 volts with doubled IRFP3206s is what I'm actually using. The nice thing about these low voltages is that people aren't likely to be electrocuted, even if it's damp. The heavy cables to the motor add up to nine feet of wire, max, plus a few more feet of battery cable wire. Fatter wire for these short bits in order to use a low voltage is *very* cheap life insurance! And, the lower voltage MOSFETs have much lower ON resistances and will generate less heat in the controller. In a car, I wouldn't go above around 40 volts or so, which value nominally 36 volt batteries can aproach. Above this the IRFP3206s are also reaching their safe limit, considering transient inductive spikes of 10 or 15 volts, and a higher voltage MOSFET should be chosen.

48 volts or 60 volts: IRFP4310 (100 v, 120 a, .0048 ohms ON)
about the same as above: 70, 140, 210 amps. Note the on resistance is double so that twice as much heat per amp will be generated.

Such voltages are probably safe enough in a warm, dry location. But even dry, over 60 volts, especially DC, is a serious hazard. If your body forms part of a circuit, you can't let go, can't move, can't breathe. You die silently of asphyxiation in about 7-8 minutes.

I've heard of a safety standard of 30 volts wet, 60 volts dry. (If I become convinced it's important, I'll change the Electric Hubcap coils to 30 or 24 volts and use even heavier wire.)

120 volts: IRFP4227 (rated 200 v, 65 a, .021 ohms ON)
(DRY INDOOR LOCATIONS ONLY for safety above ~40 volts!)
up to ~35 amps motor - single MOSFETS
up to ~70 amps - doubles
Note that the higher ON resistance of the higher voltage transistors will result in much more heat per amp.

Fuses to suit phase currents. Where you could put one fuse of (eg) 180 amps in the DC line, you can instead put three individual phase fuses of 120 amps. This has been my approach (so far). In fact, I've been putting 60 amps on each MOSFET pair. I feel that's more likely to protect the transistors and circuitry in the event of a problem. (I dispensed with this once things seemed to be working reliably and now simply put in four 40 A fuses in parallel on the supply bus in the 36 volt units.)
   Common automotive fuses that insert into common spade lug sockets are available up to 40 amps. They're called AGO or AGC. (I suspect somebody just goofed one day typing out a hand written "AGO" and gave us "AGC", or vice-versa!) Above that value, fuses are big, expensive, and hard to find when you need to replace them. Thus, I prefer to parallel as many identical AGO-25, -30 or -40 fuses as necessary to get the desired current rating.

Tip: If a MOSFET(s) blows (reads short circuit), its half-bridge driver on the circuit board is also likely to be blown. If it's not dealt with, it may blow the replacement transistors. (I think it may do this by turning them both on at once. Perhaps it could be tested with a small resistor in series with the power? I haven't properly tried this, but I have protected the circuits with thin "electronics" aligator clip test leads ("small resistors"). The thin wire limits the current and they get hot and their insulation melts to indicate a lot of current is flowing.)
   If not for the fact that IC sockets are themselves an eventual source of bad connections (corrosion), I'd socket the half-bridge chips, and that may be wise anyway for developing a prototype motor design, where one may expect to go through quite a few transistors (and drivers) before determining workable component values for filters, etc.

Capacitors across the High Side Drain to the Low Side Source (B+ after fuse[s] to VS-): 100uF/100V, one per pair of MOSFETs in close proximity, and a 0.1uF ceramic in parallel to that. Theoretically this is DC, but the spikes being filtered are enough to pop capacitors with small physical size or too low a voltage/current rating, especially if there aren't enough of them, eg just one per phase with doubled mosfets.

Current Limiting Sense Resistors: With each rating of motor, a value of sense resistor needs to be chosen to cut off the drive when a certain current limit is reached. Current limiting may be part of normal operation and shouldn't be skipped. Shutting off the mosfet gate drives at 0.1 volts, PWM cycle by cycle, it keeps the motor and the controller from burning out if the motor is jammed or is running too slowly with a "too heavy" load. For the 36 volt Electric Hubcap motor, I read steady state "run" current with a heavy load at about 75 amps on one phase, so presumably 112.5 amps from the battery. Setting the limit at about 135 amps [but is 75 A the PEAK current? is 135 A reasonable?], just a copper wire is used as the "sense resistor", eg:

0.1v / 135a = .0007407 ½
#12 AWG wire = .0016 ½/Ft (approximate - rises with temperature)
.0007407 ½ / .0016 ½/Ft * 12 In/Ft= 5.6 Inches (roughly)

Or, #10 wire at .001 ½/Ft would be 8.9 inches. (This is what I've used.)

Further notes:
* .1v * 135 a = 13.5 watts: the sense resistor (or wire) must handle it without getting too hot.
* The resistance of a hot copper wire is greater than for a cold one, eg by 20%.
* the wire should be as close to a straight line as possible
to minimize inductance. (Don't coil it!)

The sense resistor (or wire) goes between chassis ground ("B-") and the source pins of the low side mosfets, VS- (labelled V- on the PC board). Thus the mosfet/motor power circuits operate across B+ to VS- ('almost ground') rather than from B+ to "B-", ground.
   An idea to save the 13.5 extra watts and reduce heat in the enclosure might be to make chassis ground at the batteries. One fat line of the desired sense resistance goes straight from the battery, B-, to the mosfets. A separate line goes straight from the batteries to chassis ground and the logic board ground. This can be thinner as it carries no heavy currents. (Of course, the wiring box should be separately grounded to the car frame with a heavy wire.) The heavy lead to the mosfets then becomes its own sense resistor, which will already be dropping the 0.1 volts and dissipating the 13.5 watts anyway. For the 135 amps Electric Hubcap, it's about 1.9 feet of #6 or 3.1 feet of #4 AWG wire.

In that current limiting circuit, the MC33033 datasheet shows a 100 ohm resistor [R9] and a 0.1 uF capacitor [C13] as a filter to prevent false triggering on spikes. I'm wondering if that's going to prevent it from reacting to a short circuit fast enough to protect the mosfets on a big motor, and if, eg, 0.01uF might be better.

   For the Electric Hubcap motors (36V - 135A), the spike filter capacitors wired in delta between the motor coil lines should be around 7uF motor RUN capacitors (these are generally found at motor shops, not electronics stores.) I decline to guess at suitable values for other motors and other voltages.
   For 36 volts, the varistors (or 'metal oxide varistors' or 'MOV's) soldered onto the motor capacitors in parallel with them are about P36Z80's. The next size down, P33Z70, burns up after a short while of operation. The next size up offers less spike protection to the MOSFETs, becoming more highly conductive considerably above their 60 volts maximum rating. The 36V80 is still under voltage for a 36 volt supply as recommended by the manufacturer, yet not as conductive as desired at 60 volts. If they pop eventually, the next size up should be chosen. Parallelling them for better spike protection is also possible.
   The letters between the numbers seem to vary by brand, eg: P36Z80, 36V80Z.

c-old) The Control Circuits/PCB [Old Version]

   Theoretically most of this is just here for "historic" reasons, but at least the following paragraphs are still instructive. But note the "Power Mosfets - Heatsink" portion of the schematic isn't repeated in the new writeup, being unchanged.

   In broad outline and working backwards, the motor controller has spike filter components to protect the output transistors, power MOSFET output transistors rated to source or sink up to 240 amps to or from each of the three motor coil wires, a mosfet gate driver chip (MGD) that supplies the floating voltages and high transient currents required to drive the mosfets, and electronics that decides what coils are to go on and off moment by moment, based on the operator controls and the optical commutator.
   The system is so simple that simply feeding the phototransistor (FT) outputs directly to the inputs of the MGD chip will spin the motor. Turning the light emitting diodes (LED)s rapidly on and off modulates the motor power via pulse width modulation (PWM).
   There are disadvantages to using the LEDs for PWM. First, it makes it hard to use the FT signals for a tachometer and to tell if the motor is turning, and also daylight reaching the FTs defeats the PWM and protection circuit as well as the timing. That means blown transistors and fuses in the motor controller, just because, eg, the cover isn't on the motor. It would be preferable to modulate the motor power within the logic circuits, but unfortunately neither the IR2130 MGD chip nor the quad XOR gate has any single disable/enable input to use for PWM. (An IR2130 type driver with PWM and Fwd/Rev inputs would be awesome!)
   The optics are thus the only place to turn the power on and off without adding an extra chip or a microcontroller. (I show it with the extra "7400" chip in one schematic below.

   The control electronics and the MGD circuit are mounted on a small printed circuit board (PCB). Two motor controller control circuit variants are available or planned:

1. a "basic logic" controller made with common standard electronics components: no microcontroller, no programming. (4 [or 5] chips, quite a few resistors, capacitors & diodes.) Circuit boards for this will be one of TEL's first priorities.

2. an "advanced logic" controller where most of the electronics is replaced by a microcontroller "brain". (2 chips, fewer extra components.)

   Some variants of the basic controller version with added features may appear:
* Operates better in some way.
* Takes fewer parts.
* Adds regenerative braking.
* Adds "charge batteries while driving on gas".
* Adds lights or alarms for overheat, low batteries or other problems.
* Links two motors
    Anyone who has designed a circuit they think is better is welcome to submit it. Please be aware that your submission will, if accepted, be made available to the public as a blessed contribution to the common cause. It may or may not become a feature of future Turquoise Energy PCBs and controllers. Don't submit it if you want to retain control over your intellectual property. Turquoise Energy Limited will assume no obligation to pay for any designs it receives, even if it uses them. (I've worked for three years for free to develop the Electric Hubcap and motor controller, better batteries and wave power designs, and I've published it all for anyone's personal use, which is why you're able to read about this.)

    Below are some schematics for the basic version. Of course, the circuits shown will all be on one small printed circuit board (PCB). The MGD portion of the circuit is the same for both versions. Indeed within broad limits, the only changes required for various PMSM motors of different RPM, voltage and current ratings are the values for the underspeed protection resistors and the number and ratings of the power mosfets used to drive the motor.

   First we'll consider the power for the logic board. The IR2130 needs 10 to 20 volts to operate. 12 to 15 volts is ideal, and I was tapping off 12 volts from the first battery of the 36 volts, but this means an extra battery connection, extra power switch contacts and extra power relat contacts in order to shut the logic power off with the motor power.
   Since the logic board currents are trivial compared with the motor, I decided it was preferrable to reduce the 36 volts to 12 volts (and 5 V if needed) with a voltage regulator(s) on the logic board and thus need only a single 36 volt supply. The circuit for this is in the MC33033 based controller schematic.

Forward/Reverse Circuit

   After the power, first in line from the optical commutator on the motor is the forward/reverse drive circuit. To reverse the motor direction, the FT signals simply need to be inverted. So it's just 3 exclusive-or gates of a four gate chip. I used a 4070. A 74AC86 would also work. But, use CMOS and not TTL (eg, 74LS86, 74ALS86) as the phototransistor outputs won't drive much - note the pull-up resistors are 39K½. (Hmm... or would the LS chip eliminate the need for pull-up resistors?) In large measure, the low drive of the FTs is a result of their considerable distance from the LEDs. (I'm using an optical slot can with thinner walls for the next unit. The LEDs & FTs can be spaced closer together.) I've been using 4000 series logic as it will run on 12 volts, though a 5 volt supply and 5 volt logic is probably preferable:

Forward/Reverse drive logic: three XOR gates of a four gate chip and pull-up resistors.
Also seen is the schematic of the optical commutator, mounted on the motor.

Motor Speed Sense Circuit

   Next is the motor low/high speed sensing circuit, used to change the PWM to protect the motor and controller from the high currents caused by saturation of the iron in the coil cores at low RPMs or stopped.
   With the LED's flickering on and off for PWM, the phototransistor outputs do likewise where there's a slot, and the only steady voltage that can be counted on is "off" (high) where there's a solid. Furthermore, any one or two phototransistors can be high. This means that all three of them have to be sampled and only if any one of them is staying "high" is the motor not rotating.
   Thus, the three outputs feed a three input NOR gate via a sampling circuit. Each output discharges the sample capacitor when it goes low, and the capacitor slowly recharges when the phototransistor output stays high. Only when the motor is rotating are all of the outputs driven "low" at times and charging of the sampling capacitors is prevented.
   Then the output, which I call "Motor Speed Sense" (MSS) goes high. When it's low, PWM pulse width is limited to 50% duty cycle and the pulse rate is slowed to 10Hz or less. When it's high, normal 1-99% duty cycle at a higher frequency is obtained and the motor runs at full power.

The motor speed sense (MSS) circuit. Chip would be CMOS for sure - 74HC27, 74AC27, or 4025, shown in its "negative NAND" sense rather than "positive NOR".
(The two diodes shown on the output are for the prototype PWM. Only one, reversed, diode is used for the 555 based PWM circuit that follows, and it's shown on that schematic as D3.)

   (I can't help but think this circuit has more components than it should need, but I've been unable to devise a simpler one. Theoretically the NOR gate should have hysteresis (schmidt trigger) inputs, but such a NOR gate isn't available, and it's not really a concern. It would also be possible to use three schmidt trigger inverters, eg 3/6 of a 74HC14 hex inverter chip, and AND their outputs together with another chip or with three diodes.)
   It occurrs to me (much later) that instead of the inputs coming directly from the phototransistors, they could come from the outputs of the XOR gates, which have more drive. In that case, the 22K resistors might be dropped, eliminating three components.

PWM Circuit

   This PWM isn't the one used in the prototype, so be warned that it hasn't yet been tested as drawn. It's a modified version of a 555 timer based PWM circuit shown at DPRG, and it has about 1/2 as many parts (resistors, capacitors & diodes) as the LM339 version PWM currently in the prototype.
   R1 sets the current to the three LEDs on the motor optics, which are in series. When the pulse output is high, the LEDs are energized. R3 charges the capacitors C3 and C4 to turn the output off if the gas pedal potentiometer is disconnected. (If it is too large, something may blow before the PWM goes to "off".) C1 and C2 are just power supply filters.
   C3 is the "regular" oscillator capacitor. (It really should have been drawn to the left of R2 & D4.) It charges when the output is high through VR1 and D1. When it has charged to 2/3 of the supply voltage, the output goes low. When the output is low, C3 discharges through the other side of VR1 and D2, and when it hits 1/3 of Vcc, the output goes high again to repeat the cycle. Thus, C3 oscillates between 1/3 and 2/3 of Vcc. Adjusting VR1 changes the rise time and fall time, increasing one while decreasing the other, and hence the pulse width (duty cycle) of the pulse changes to provide more or less average voltage to the motor.
   C4, R2, D3 and D4 are the low speed protection circuit. When the motor (car) speed is too low, MSS is low, grounding the "-" side of C4 through D3. C4 is a larger capacitor now essentially in parallel with C3, and the frequency of the PWM is reduced from "whatever" to about 10Hz. C4 charges through D4 with no added delay, but it discharges through R2. Being the same size as VR1, 10K½, R2 limits the "on" pulse width to 50%.
   Thus, the motor coil cores are driven on, but by the time they start to magnetically saturate the iron cores, they're switched off again, allowing the magnetic field to collapse before the next pulse. As the core approaches saturation, it reaches its maximum thrust. Thus, repeating short bursts of up to full thrust, about 10 per second, get the car to start moving.
   When the motor is turning fast enough, MSS goes high "disconnecting" C4. As the 555 inputs trigger (TRG) and threshold (THR) draw almost no current, the presence of R2 (also D4) in series becomes largely irrelevant (unless R3 is too small).

PWM Circuit, modified 555 design.

   A minor disadvantage of this PWM circuit is that it doesn't go to 0% or 100% pulse width. There's always some tiny fraction of "on" or "off". But it's very short.
   (Setting R3 to about 18K would prevent the potentiometer from discharging the capacitor to 1/3 of the supply voltage at the extreme 10K½ end of its range, creating a 100% 'off' area. The output could be inverted with a left over NOR gate and fed through a resistor and a diode to TRG & THR to create a similar 100% 'on' range. R & C values and varying oscillation frequencies would have to be considered.)

The MOS Gate Driver Circuit

   The schematic below encompasses the forward/reverse XOR gates and optional NAND gates for gating the PWM as well as the driver chip and mosfet wiring. One could say it's the entire controller less the PWM generator and low speed protection circuit, and the off-board spike protection components: three 7uF motor "run" capacitors in parallel with three varistors, wired in delta across the three motor power wires.

MOSFET wiring on right is valid for all versions including MC33033.

   The 18 ohm resistors might be a bit big. That dampens switching transients but means the mosfets dissipate more heat during switching, as they have considerable capacitance and it takes them longer to turn fully off and on. 15 or 12 ohms might be better, but it's probably a fine point with low switching speeds.

   I speak of the IR2130 MGD because it provides a simple solution with the least number of parts, but of course there are many other solutions. First of course is three IR2110 single phase MGDs. Another is to use buffered logic gates, with optical isolators and diode/capacitor charge pumps to enable a floating high-side driver (as shown in the IR2130 circuit).
   Perhaps a word is in order about their operation. The "ground" of the floating high side driver is the output itself. When the output is driven low, a fast diode (eg, UF4007) charges the capacitor (0.47uF) up to Vcc, +12 volts. When the output is driven high, the "ground" rides up to the mosfet supply voltage, + 36 volts, and the capacitor is charged +12 volts with respect to that, ie 48 volts. Since the load, the power mosfet gates, is entirely capacitive, the power drains out of the capacitor only by the initial switching and then by stray leakage currents. (IR specifies fast "ultra fast" diodes and a minimum capacitance of 0.47uF in their application notes, AN947 and AN985, which are on line.)
   The capacitor is recharged when the output is switched low again. With the PWM circuit continually switching outputs on and off, and with the rotation of the motor, the capacitors are repeatedly being charged. (Hmm, is there any situation where they're not when the motor isn't turning? Maybe - might explain occasional weird behavior! If the motor has glitches, maybe a resistor, eg, 5K(?) could be attached from each coils drive to ground, to ensure they pull low when they're not being driven!
   Note that the drivers must be able to drive the 18 ohm resistor (ie, over 1/2 an amp) in order to turn the power mosfets on and off quickly. Slow power mosfet on/off times and thus long "partly on" times make for high power dissipation in the transistors during switching. The opto-isolator could drive a P channel/N channel mosfet totem pole driver.
   Important points are that the drives should default to "off" if the signals are disconnected and that turning on one driver should in some way lock the other one out. Of course, for a microcontroller based motor controller these things can be arranged in the controlling software.

Later Motor Speed Sense Circuit

   After drawing the above circuit with NAND gates to gate the PWM, I realized that with steady LEDs, one XOR'ed FT signal can be used to create the MSS signal. And furthermore, if the NAND gates are changed to AND gates (which does nothing but reverse the sense of FWD/REV input), the one optic signal MSS circuit (active high) can be made with the two left-over gates from the XOR and AND chips. This reduces the controller back to four chips, and also eliminates a half dozen two-lead components, an overall saving, plus the non-PWM'ed optics outputs can be used to derive the RPM. (Pulses/sec * 20 = RPM) As an added bonus, the MSS signal, with its fixed capacitor charge "timeout" times will start OFF at zero RPM and gradually tend towards 100% ON as the RPM rises, becoming active on every transition of the optics output until the timeout or until the motor is turning fast enough that the timeout is never reached. (Using just one optics line's transitions does mean that the phases will not be "fully ON" symetrically at protected speeds, so the timout chosen must avoid overheating the "more often ON" mosfets and coils: phase(s) "A", or "B" & "C". Which it is depends on whether the 20¼ OFF period lies just before or just after the transitions, which I haven't checked out yet.)

"New" Motor Controller Chip

   As soon as I put the first version of this manual on the web and mentioned it on a discussion board, someone sent me a link to a chip that would appear to replace most of the above circuits with considerable parts reduction, the MC33033 from ON Semiconductor.
   It has all the logic I wished the IR2130 had: fwd/reverse, enable for PWM... and even on-chip PWM. But it's missing the great hi-side mosfet drivers, and the easiest way to implement them is to use three small "half-bridge" hi-low mosfet driver chips, eg IR2003. There are a number of these 8-pin chips with the same pinout and varying specs.
   The MC33033 also has inputs for magnet position sensors: hall effect or "slotted optics". Since one possible configuration for the slotted optics is, conveniently, the Electric Hubcap's Optical Commutator, I see I didn't invent the idea first after all, though in trying to figure out how to drive the motor I didn't previously find any sign of such an arrangement on the web.

   Another feature is cycle by cycle (PWM cycles) current limiting. This eliminates the need for my "underspeed protection" circuit. I thought it would be silly to try to find a "current sense resistor" that wouldn't burn out, of the tiny value a 150 amp motor would need to use. Now I realize the 100mV would be dropped across around 6 inches of #12 wire, so that will be the 15 watt "sense resistor"!

   There's now a design using the MC33033 in this version of this manual and a PCB has been layed out.

d) Soldering the circuit board

   Making the motor controller is an easy or hard electronics project, depending whether a printed circuit board (PCB) of the control circuit is available, or if the circuit has to be created on a printed wiring board (PWB).
   (Please let me know if you'd like a board for a prototype/one off motor, or the gerber files to have one made. I'm not starting "production", but I know the whole project is much more difficult without a PC board for the controller. c r a i g @ s a e r s . c o m )

5. Mounting the components in the wiring box

The Wiring Box with all components & heavy cables
(Also see the wiring diagram of this at the end of the chapter)

This box goes behind the right rear wheel of the station wagon.
* The battery leeds + (+36V, red), and - (zero V, black) enter at the bottom left. The red goes to the bolt-in side of the breaker (black, left), and the two breakers (it's a double 100 amps house breaker) are tied together in parallel. A green grounding wire comes through a separate hole on the left. The left header connector goes to the motor sensors and the right one to the operator controls at the front of the car.
* The ground, battery "-" and motor controller ground wires all tie onto the one grounding lug bolt on the back cover of the box, seen towards the left. The three-phase power from the controller, via filter capacitors, and to the motor, ties into the copper triple terminal block, center-right.
* The power from the breaker comes out the plug-in connectors (normally these are the input when it's mounted in a breaker box) to two pieces of thick sheet metal that fit securely, and goes to one contact of the "solenoid" relay. (I later put in a longer #10 wire so the relay could be bypassed for testing.)
* The motor cables (three phase power and commutator optics) enter at the lower right through a hole behind the capacitors.
* Lower right, at the front: three 7uF spike filters (motor "run" capacitors from a motor shop) across the three phases (delta), also with metal oxide varistors ("MOV"s - V36ZA80) soldered across them for additional protection.
* Inside the "top" side (left or right side when mounted as convenient) is the motor controller. "Above" the box are the aluminum "roofing flashing" heat sink fins clamped on the outside of the cover.

The Motor End
5-pin "trailer lights" socket & plug for the motor optics, and the Anderson "PowerPole" 75 amp connector (red) to the motor coils. The "A.P.P." plug & socket are identical - one is simply flipped upside down and they fit together. So far, these are the only suitable connectors I've found. Prior to finding them, I had resorted to making my own 'thin line' three-phase plugs and sockets! Note the holes that allow bolting the socket onto something. I plan to fill the one on the car with grease since they aren't intended for exposure to weather.

Main Power Switch or Circuit Beaker
   There are a number of possibilities for this switch. There are battery switches that clip to the terminal post of an automotive battery. One of those could be used and would be external to the wiring box. There are also switches made for heavy battery loads that could be mounted on or in the box.

   But a circuit breaker offers protection if things go wrong and is highly preferable.
   I have used salvaged dual and triple 100 amps house main breakers as switches. (And they have never blown even when things went wrong in the controller.) A breaker rated for 240 VAC should be able to handle up to about 40 VDC. They are, however, physically large and really require a taller chassis box than shown.

   The best breaker-switches I've found are Blue Sea Systems panel mount breakers, rated for 48 VDC and made for marine use. I got the 150 amps model, BSS7004. (BSS7048 has a nicer toggle handle but costs more.) 150 amps is probably a bit larger than needed, but you don't want it to trip when you floor the car! To mount this requires cutting a large rectangular hole in the box. They sell a bezel to cover inaccurate cutting. I used a file.

   For vehicle use, I think at least an accessable manual power switch is indispensable so the car can drive on gas if there's an electric motor or controller problem, without powering up the electric drive circuit. A circuit breaker/switch seems to me to be much the best solution.

Mounting an ordinary "house" circuit breaker: two long bolts and a piece of sheet metal for a clamp, plus a sized hole that fixes it in position, are the key.

Internal Wiring

   I used some #8 and even #6 jumper wires between components inside the chassis. I think I would now just use #10 wires unless they seem to cause problems. They're short, so loss will be slight, and they're considerably easier to work with. Very flexible wire is an asset, especially to avoid stress to the wires to the motor controller, which are attached to mechanically vulnerable components. Wire with many fine strands is the most flexible.


Power Relay: "Solenoid" or "Contactor"

   An inexpensive "solenoid" (the misleading name for 12 volt coil contactor relays) for switching the power via the car key is Tekonsha P/N 53536, available at RV stores. It's a little under spec on nominal current rating (70 amps), but the motor (we trust) won't be running when it's switched on or off.

   Cole-Hersee make "solenoids" with higher ratings, and I recently found these, at a marine store. They seem rather costly.

   Be sure to get one rated "continuous duty". The coil of one that's only made to be on for a moment (eg for a car starter motor) is likely to burn out.

   From the power disconnect breaker/switch (recommended) and then the power "solenoid" relay (if used), the power line proceeds to the bus bar of the power mosfets. From here, each phase goes through fuses to the power mosfet transistors, and their associated filter capacitors. In the case of the Electric HubcapTM, four common 30 amp AGO (= "AGC") automotive fuses: 60 amps per transistor, 120 amps per phase. There is also a thin wire from the bus bar to the circuit board to power the control logic.
   Here the main battery power bus ends.

   I confess to having bypassed the solenoid for testing so far, as the "ACC" circuit in my car doesn't seem to work, and the car won't be a hybrid until the mechanical torque converter is working properly.

Connector Blocks

   I originally used marette connectors ("wire nuts") to tie together the heavy wires between the motor controller, the motor drive cable, and the spike filter components. It was a lot of work each time trying to fit the three heavy wires into each marette.
   I couldn't find suitable terminal blocks. I finally made these "copper cube" connectors from a .5" x .75" copper bar. The holes for the wires are first drilled right through the bar's 3/4" side. (IIRC, I used a 3/16" drill for #8 wires.) Then holes were drilled and tapped for #8-24 machine screws into the wire holes. Another #8-24 hole goes right through the center to bolt down the cube. (Although only three wires connect, I drilled four screw holes anyway except on the first block.) After drilling, the piece was cut off the end of the bar, 3/4" long.


   Finally, the cubes were bolted onto a piece of dogwood, shaped and drilled as shown, via another threaded hole at the center. (High temperature plastic would be better - or maybe a sheet of mylar between the copper and the wood.) The holes in the wood under the cubes are recessed so the hold-in screws don't short to the wiring box. The triangle pattern isn't for the benefit of the wires: it simply makes for a firmer mounting to the box when it's screwed down.

In the first controllers, the wiring terminal blocks were in the wiring box. They are better placed on the motor controller as shown here. The base of the block, however, is angled so screwdriver handles don't hit the other side of the box, avoiding considerable aggravation.

An alternative "brass pipe" connector block.

   I also had an idea for an easier to make a unit using one inch long pieces of "1/8 inch" threaded brass pipe. (Actually, the inner diameter is big enough for a #6 wire or two #8 wires.) Having thought of it, I decided to try it and made one connector and a mounting block from a piece of lilac wood.

   I found the pipe tended to strip when the screws were tightened, though it seemed to work okay when I used a smaller than usual drill size to ensure maximum metal in the threads. (It was hard threading the holes, but I didn't break the threading tap.) The insides of the pipes are bound to be corroded, whereas the copper cube holes, being freshly cut, are clean. Cleaning inside the pipes - which I would want to do to ensure good connections - might be more work than drilling the holes in the copper cube.

   Personally, I think the copper cubes is much the superior connector system, though the pipe system is very compact and the piece of wood is easier to make. There's lots of thread length in the cubes so the screws won't strip with repeated insertions and removals, and being screwed down, they can't rattle with car vibration.
   I later found some commercial "bus connectors" in marine supply stores, but they aren't as good or as compact as the cubes I made. They generally tend to be long strips of screwdowns.


   The varistors, which are pretty small, may be simply screwed into the copper terminal blocks with the wires.
   For those not familiar with metal oxide varistors ("MOV"s, "varistors"), these interesting devices conduct exponentially more current as the voltage rises, their resistance varying inversely with the voltage. That helps to "short out" damaging higher voltage spikes. The varistors I'm currently trying are "P36Z80". I tried the next voltage rating down, "P33Z70", but a couple of them burned out during regular motor tests. I want to use the lowest rating that lasts, to help best protect the mosfets.

   The reader should be warned that they have been known to catch fire. Like the other electronic components, they should be mounted only inside the metal wiring box.

   Seeing the sparks that result from connecting and disconnecting batteries directly to the motor coils gives one a lot of respect for the power of the transient energies of switching the coils on and off, of the capacity of the filters and of the electronic components to withstand such energies repeatedly and reliably, and why power mosfets keep going up in sparks and flame until everything is relatively perfected.

Power Wiring General Connections.
Note: DO NOT USE the 7uF "motor run" capacitors in the drawing. It works better without them and the spikes coming back from the motor coils seem about the same. (And the chassis has more room without them!)

Notes on the diagram:

1. The diagram of the motor shows the 3 sets of 3 coils in parallel. Although it shows the phases together, the parallelled coils are the ones physically 120 degrees apart from each other.

2. Doubled varistors V36ZA80 are shown. They are currently only single and nothing has blown up - yet. It also remains to be seen whether they will withstand long use or whether the next voltage up will need to be selected.

3. I've bought an inexpensive "solenoid" relay for the power via the car key as shown, Tekonsha, P/N 53536, but I haven't got it hooked up yet. [May 18th 2009.] It's a little under spec on current rating (70 amps), but the motor (we trust) won't be running when it's switched on or off.

4. Battery switches are available from marine supply stores.
I much prefer a switch that's also a circuit breaker as a disconnect in case of any short circuit. Besides electrical panel main breakers, I've seen smaller breaker-switches on the web that look more suitable, eg 140 amps/48 volts, but I didn't order any (yet) or write down any part numbers.

Motor Controller Parts List

Circuit Board Parts List

1 - F1 - small 1 amp solder-on fuse
1 - Connector 1 - 8 pin single header strip, 0.1" pin spacing.
1 - Connector 2 - 10 pin single header strip, 0.1" pin spacing.
1 - IC1 - MC33033 brushless motor controller
3 - IC2,3,4 - IR2003 half bridge hi & low side MOS gate grivers (or IR2103...)
1 - Q1 - NPN power transistor, TO-220 case, 60+ volts BCE. (I used a 2SC2166)

3 - R15,16,17 - 10,000 ohms

ZD1 - 12.6 V zenor diode
D1,2,3 - UF4003 (or UF4003, -04, -05, -06, UF4007 or equivalent fast diodes.)
Cx all 0.1 uF except for a few of them

The .1 inch spacing header connectors I used are made by Mode Electronics and these are their part numbers. (I think the "-2" on the end is because there are two per display package.):

1 of: 37-6208-2 8-pin header strip
1 of: 37-608-2 8-position header plug body with 8 crimp-on wire connectors.

I haven't actually got the 10 position one yet as there were none in the store (I just cheated and used the second 8 position set), but three positions ones were 37-6203-2, so I presume the part numbers should be:

1 of: 37-6210-2 10-pin header strip
1 of: 37-610-2 10 position socket & pins.

(Note: Evidently the 10 pin ones are "discontinued". ...should I try for 11 pin???)

The advantage of this type over "generic" header strips is first that they can't be accidentally plugged in one pin over from where they should be and second that it takes a bit of force to bend the plastic to separate them, so they are unlikely to eventually work their way off due to car vibration. I soldered the crimp pins for the plug as my "general purpose" crimping tool didn't tighten them very well.

...a bunch of resistors, etc, etc, etc.

Anyway, the parts are shown on the PCB layout and in the schematic.

Version 1, April 29th 2009:
* First preliminary manual

Version 2, May 20th 2009:
* Diagrams of heavy wiring and power mosfet layout/wiring, accidentally omitted from V1.
* Mentions MC33033 Motor Controller chip.
* Gives make and model of a "solenoid" power relay.
* Moves "Soldering PC Board" section to the right place.

Version 3, June 2009 (not uploaded):
* New motor controller with MC33033 Brushless Motor Controller chip, with schematic, PCB layout. (Should put in a link to the PCB gerber files to e-mail the board design to a PCB maker.)
V 3:  August 1st 2009 (MC33033 Based Controller) (uploaded)

Version 4, July 2009:
* Includes updated motor controller enclosure details - and fotos, now that I've finally made the planned "production version" enclosure! 74A APP plugs.

Version 5, Sept. 18 2009:
* Included controller schematic and other images "dropped" by HTML Editor
* New MOSFETs wiring schematic CAD (Eagle PCB) drawing
* Accompanying minor text changes for new drawing.

Version 6, December 30 2009
* New (BSS4007) circuit breaker. takes little room in chassis. (With new photo of chassis with it.)
* Misc. minor text edits.
(Coming soon: update to Motor Making Manual, with Hall Effect magnet sensing switches instead of optical... Also see Turquoise Energy News #22 for this.)

April 26th 2010
* Just a little note to leave out the 7uF "motor run" capacitors - works better without them.

May 31st 2010
* Better description of a "brushless motor", odds and ends in the intro, title, disclaimer.
Oct. 2010
* a few things... new connector pinout plans.
* Heavy wiring terminal blocks moved from back of box onto motor controller side panel.