ABOUT CONTROLLERS :

how do they work?

Controllers are really complex little beasties. Their basic function is of course to control the speed of a dc motor (ac motors use different techniques to control speed).

The basics:

Controllers for electric bikes have the following components:

1.mosfets
2.voltage converter (regulator)
3. pulse width modulation circuit (on a chip)
4. other parts are resistors, capacitors and diodes.
Basic components of a speed controller shown below:

Pulse Width Modulation (PWM):

This is provided by use of an integrated circuit or chip on the circuit board. What is PWM........glad you asked!
It is a method of varying the voltage that the motors 'sees' from the batteries, this controls the speed of the motor via the throttle.
I came across an old method of controlling  a dc motor some time ago and it helped me to understand how a pwm chip works so here it is:


The picture above shows a tube that rotates very quickly ( maybe 5,000rpm or more). It is made of a conducting area and a non-conducting area.
It has two graphite brushes which lie on the tube and can slide along it. For example say we put 12volts across the brushes with a battery and maybe a light in the circuit too. We start the tube spinning very quickly. At the top of the diagram you can see when the tube spins the brushes are always in contact with the conducting metal part (brown) and the light will shine brightly as it is getting 12volts (100% on).
If we slide the brushes along the tube at some times the brushes will be in contact with the metal conductor and the light will come on. At other times the brushes will be in contact with the non-conductive part of the tube and the light will go off. If the tube is rotating fast enough the light will appear to stay on but not as bright as it was with 12v, so the voltage that it 'sees' is in this case 80% of the original voltage (12v) which is 9.6volts.

Similarly sliding the brushes further along the period when the light is off increases and the voltage which the light 'sees' drops and so the brightness of the light diminishes till eventually the brushes only contact the non-conductive surface of the rotating tube and the light will of course be off.

So Pulse Width Modulation can be looked at like this. The pulse is really the period of 'on' when the electrons are flowing through the conductor in this example. The 'width' is referring to the time that the circuit is on or off, and the "modulation" of course refers to be able to vary this somehow.

In a controller the rotation of the tube is replaced by an oscillating circuit which instead of having an rpm, has a frequency. Usually the frequency is a bit less than 20,000Hertz. For the example above it would mean the tube would have to spin very fast indeed. A high frequency is used because it is a more efficient process at given frequencies (I think!!).

[ off topic: one hertz is one cycle per second, one rpm is one revolution (cycle) per minute. For the tube to be equivalent to a oscillating circuit of 20,000 Hz it would have to rotate at :    20,000 revolutions per second which is 20,000 *60 = 1,200,000 revolutions per minute (rpm)!, well there is really two on/off periods for each revolution so it would be 1,200,000/2 = 600,000 rpm which is just not possible to do]

The throttle on an ebike is used to vary the pwm cycle (also called the duty cycle...i think!) and hence control the speed of the motor. The throttle uses a linear hall sensor device to do that which I'll discuss in the throttle section at a later time.

The Mosfets:

T
here are usually 6 mosfets in a controller, 2 on each phase of the 3 phases in these motors. Having two in parallel on each phase reduces the resistance to the high current and allows the controller to be more efficient and also avoids overheating of the mosfets.

The mosfets are very small switching devices which allow a very small current to be used to switch a large current on and off. There are brushed and brushless motors. All these motors are 3 phase motors ( 3 phase is an efficient way to run a motor invented by Nicholas Tesla at about the turn of the century). The controller for a brushed motor is somewhat simpler than that of a brushless motor and hence also smaller in size usually.
But both controllers use mosfets. In a brushed motor the mosfets are used to turn the large current to the motor on and off in synchronisation with the pwm cycle (duty cycle), this also occurs in a brushless motor. But a brushless motor doesn't have a commutator to switch the current to make the motor turn so mosfets (and hall sensors in the motor) are used to do the switching.
How does a mosfet work?...........(glad you asked!)

A mosfet is a very small component with three legs (metal pins). One of the legs goes to the negative battery terminal or earth, another one goes to the the positive battery terminal via the motor. A very large current can flow through these two legs in some cases 30 or 40amps. Because it is such a small component and can have such large currents flowing through them they can get quite hot so they are always joined to a heat sink to dissipate this heat (yes it does mean some loss of efficiency!). The other leg (called the gate) is joined to the pwm circuit chip (in brushed motors) and is joined to the pwm circuit and also the motor hall sensors in a brushless motor.. When a very tiny current goes through this leg (only a few milliamps), or you can say when a very small voltage is applied to it (<10v usually) it allows the large current to flow through the other two legs. Hence its called the gate, it opens and closes the other two legs too allow high current to flow.

Mosfets are extremely sensitive devices, they will often be associated with controller failure in some way. Once they are put in place on a circuit and heatsinked they are very reliable, but there are some factors which can influence them into failing. The have maximum current and voltage limits. So if you try to run say a 24v controller on 48volts its likely you would damage the mosfets because they may not be rated to handle 48volts.
Another factor involved with their failure is the gate voltage. If they do not get enough voltage to be turned fully on (fully open) they can get very hot.
So a failure of some component on the circuit board which determines the voltage going to the gate of the mosfet could cause the mosfet to overheat.
One other thing that can be associated with mosfet failure is what is called voltage spikes. When a motor is turned off suddenly say a motor wire comes off accidentally, there can be a large voltage spike created (especially if the motor is under load at the time) which can be higher than what the mosfet is rated for and can cause its failure (so always make sure your thick wires to the motor are very secure).

[ off topic : I will insert here a nifty simple little experiment you can do with mosfets to show how sensitive they are....as time permits}

 

Voltage Regulator:

The voltage regulator is a device about the same size as a mosfet which converts the battery voltage to a lower voltage so the pwm chip and any other low voltage devices can be run from the battery power. They are sometimes also heatsinked (so may sit next to the mosfets) or may sit alone on the circuit board. They can also supply power for the hall sensors either in the throttle or the motor (if brushless).

Other things about Controllers:

Controllers always have some maximum current rating. It is usually written on the controller somewhere what the maximum current rating is. This means the controller has been designed to allow the motor to use a given amount of current and hence the motor will deliver a certain amount of torque depending on the current rating of the controller.

Interestingly (though I haven't tried this yet) I was told by the owner of one controller factory (who knew alot about building controllers) that you can vary the maximum current simply by adding or taking off solder from the buzz bar connection in a controller.

[postscript: max. current can be adjusted by adding taking away solder from buzz bar (or other suitable method) have done some experiments with this, current can be reduced to any value by increasing resistance across buzz bar conversely decreasing resistance of buzz bar the  max. amps can be increased........alot!  Increasing max. amps will mean mosfets will get hotter than normal and they may need additional heatsinking to absorb/dissipate the extra heat. Increasing amps will increase max. torque of motor but wont effect top speed]
Adjusting Maximum Amps of a controller

I've been asked quite nicely by someone who sells ebikes to remove this section as seems some customers have been uping the amps on the controllers and could lead to some problems for the ebike sellers........so this section removed for time being.

Regenerative Braking Controllers:

I only have a basic knowledge of regenerative braking of controllers. They use a complex IC circuit which has a gate, a wire is used with a switch to vary the logic on the gate which then switches the mosfet configuration from 6 mosfets to 3 mosfets. The pwm cycle is then used to turn on/off  these 3 mosfets which induces a current which is then directed to flow back to the batteries (directing the flow back to the batteries is also achieved by switching the mosfets on/off in a particular sequence.. I assume that variable regenerative controllers would vary the pwm cycle to achieve more control over the regenerative current.

Hall Sensors:

Throttles use linear hall sensor devices to vary the voltage (from 0-4volts approx.) which is then used to vary the pwm cycle to control motor speed.
(more in throttle section later). The output of the hall sensor depends on the proximity of the sensor to a magnetic field, the magnetic field is supplied by a small neodymium magnet, its proximity to the hall sensor is varied when the throttle is twisted.
Brushless motors use non-linear (switching) hall effect sensors to make the motor run (brushed motors dont use them they have a commutator).
They are glued into position inside the motor very close to the motor magnets, when a magnetic pole goes past a hall sensor it is switched on and off and this switching is used to make a very small current/voltage go to the mosfets which are in turn switched on and off in a given sequence so the  brushless motor can run correctly ( a brushed motor can be run without a controller as it has a commutator in it, a brushless motor you cannot run without a controller as it depends on the switching hall sensors to switch when current is on or off).

beware of spray ebike company: more info


back to home page
Copyright 1998-2006 by Brett White on all images/text/information and graphical materials on this website.