How to Determine the Wiring for a Brushless Motor

Archive of useful information. This is not a discussion area.

How to Determine the Wiring for a Brushless Motor

Postby fechter » Thu Feb 28, 2008 11:27 am

When experimenting or using parts from different sources, we frequently find the color codes on brushless motors and controllers do not correspond correctly. Just because the right colors are present does not mean they will match correctly, though that would be a good first guess.

Most brushless motors used on bikes, scooter, and motorcycles have 3 phase wires (the fat ones that take the power) and 5 hall sensor wires (the skinny ones). Some motors may also have a temperature sensor or shaft speed encoder (more wires).

The problem is how to determine which wire goes where without blowing anything up...

Motor Wires 3.jpg
Motor Wires 3.jpg (65 KiB) Viewed 33266 times


If full power is applied to the controller and the wires are not properly connected, there is a very good chance of destroying the motor, controller or both. :shock:

There are typically 3 hall sensors in the motor that tell the controller the position of the rotor.
Each sensor has a + and - power lead and a signal output. The first thing to sort out is the hall sensor power. The controller will supply a votage to the sensors that is typically between 5v and 12v. The most common color coding for the hall power is red= positive, black= ground.

If there are no black and red wires, or it is not clear which are the power wires, it may be necessary to open the motor and trace the wires going to the hall sensors. The hall supply wires will branch off and go to all three sensors. If + and - are not black and red, then it may be necessary to look up the datasheet for the hall sensor to determine the power connections.

Here is the most common style of hall sensor used in motors. This one is a Crystalyte:
HallSensor.jpg
HallSensor.jpg (30.69 KiB) Viewed 33147 times


Here's what the hall sensors look like in a Kollmorgen motor:
Kollmorgen hall and phase wires.jpg
Kollmorgen hall and phase wires.jpg (64.4 KiB) Viewed 33243 times


Now, once the hall supply wires are sorted out, it's a matter of matching the phase and signal wires. If the colors of the remaining wires seem to match, that would be the obvious first try.

When testing unknown wiring combinations, it is important to somehow limit the current that the controller can get during testing. If one wire is out of place, the current in the controller could be very high and cause the controller to blow. Testing with the batteries connected to directly to the controller is very risky.

The best approach is to use a bench power supply capable of enough current to run the motor at no load. This is the one I like to use:
Power Supply.JPG
Power Supply.JPG (153.84 KiB) Viewed 33144 times


If you do not have access to fancy, expensive test equipment, then you should put something in series with the batteries to limit the current, but still allow enough to run the motor at no load without tripping the low voltage cutout on the controller. At no load (wheel off the ground), most bike motors will draw around 2 amps or less. Larger motors may be up to 5 amps or more.

You could use a 5 amp fuse or circuit breaker if you have nothing else. A large resistor, like a car headlamp may suffice in a pinch.

You also need to measure the battery current while testing. This is very important, since you want to back off the throttle immediately if the current starts going too high, and it's about the only way to tell when you have the right wiring combination.

For the 3 phase wires, there are 6 possible combinations of wiring to the controller. It is good to use a piece of paper to write down the combinations so you can keep track of which ones have been tried. For each phase combination, there are 6 possible hall signal combinations. This gives a total of 36 possible configurations that may need to be tested.

If we label the motor wires A, B, and C and the controller wires Y (yellow), G (green) and B (blue), the combination table looks like this:
Phase combinations.jpg
Phase combinations.jpg (16.5 KiB) Viewed 33109 times


For each attempted combination, apply power and slowly advance the throttle while watching the current.

Incorrect combinations will have different effects depending on the combination.
Some combinations will result in the motor vibrating or not moving, but the current rises rapidly with throttle... bad.

Some combinations will result in the motor running, but the current will become excessive at higher speeds... bad.

Some combinations will result in the motor running backward... bad.

When you get the right combination, the motor will start from any position, run forward and the no-load current will be in the 'expected' range.

Be very careful when swapping the hall signal wires around. If a hall signal wire makes contact with the hall supply, there is a good chance of blowing the hall sensor. Best disconnect all power before swapping wires.

When swapping wires around, I found it very handy to use a barrier strip terminal block to hold the wires. In this setup, I used some connector pins from a serial connector to make swapping even quicker.
Motor Wires 2.jpg
Motor Wires 2.jpg (52.96 KiB) Viewed 33104 times


Hope this helps, and happy motor testing!
"One test is worth a thousand opinions"
User avatar
fechter
100 GW
100 GW
 
Posts: 10055
Joined: Sun Dec 31, 2006 3:23 pm
Location: California Bay Area, USA

BLDC Controller Wiring

Postby Knuckles » Sun Jul 20, 2008 10:26 am

BLDC Controller Wiring ...

So you just received a new controller and need help wiring it up.
Here is my procedure for installing a controller on any BLDC motor.

Installation Tip:
The colors of BLDC motors, controllers, throttles and e-brakes may not always match up.
There is no industry standard for matching the wire colors. A real 'pain-in-the-neck' but a reality.
This may seem confusing at first but it is very easy to find the correct combination.
I created a xls spreadsheet to assist you in finding the correct wire combination.
download/file.php?id=11560

Shenzhen Controller Technical Information:
A description of all the controller wiring is also seen here ...
http://98.131.176.65/endless-sphere/Infineon_Wiring.jpg

Safety:
When testing your controller, use a low amperage fuse (2 or 3 amp) on the positive (+) power supply lead.
For INFINEON controllers, the low voltage cutoff (LVC) will be set for a specific battery voltage. You must test your wiring with a (nominal) power supply GREATER than the LVC or the controller will not work.
Always use great care when working with the power supply (batteries and/or chargers).
Test your controller with your motor "no load" (motor/wheel off the ground and free to spin easily).

Colors:
B = black
R = red
G = green
Y = yellow
BL = blue
O = orange

Test Procedure:
1) Connect controller throttle wires (3 thin wires - B,R,G) to your (5v hall sensor) throttle.
2) Connect controller hall sensors (5 thin wires - B,R,G,Y,BL) to your motor hall sensor wires.
3) Connect controller phase wires (3 thick wires - G,Y,BL) to your motor phase wires.
4) Connect controller negative (thick black wire) to power supply negative (-) ground.
5) Connect controller main power positive (thick red wire) to (2 amp fuse) power supply positive (+).
6) Connect controller ignition positive (thin red wire) also to (2 amp fuse) power supply positive (+).
7) Slowly twist throttle and observe motor rotation. Use spreadsheet to record observed results.
'8) If no motor rotation occurs, leave the hall wires the same and switch 2 phase wires as shown in spreadsheet.
9) Again, slowly twist throttle and observe motor rotation. Use spreadsheet to record motor observations.
10) If no motor rotation occurs, again repeat step 8 with the next possible phase wire combination.

NOTE:
You may need to try all thirty-six combinations in the spreadsheet to be sure you have the correct hall and phase wire configuration.

For Direct Drive BLDC motors, at least one of these thirty-six combinations will produce a “smooth” forward motor rotation (and another one of these thirty-six combinations will produce a smooth reverse motor rotation).

For Geared BLDC motor (with an internal freewheel), at least one of these thirty-six combinations will produce a “smooth” forward motor rotation (geared motors with an internal freewheel will not spin the hub in reverse).

When you find a wiring combination that produces a "smooth" rotation is in the "forward" direction then you are done testing and can keep this configuration.

If the "smooth" rotation is in the "backward" direction then switch 2 hall wires (move to the next column in spreadsheet). Then try the six possible phase wire combinations in the next column of the spreadsheet.

Most of the Hall/Phase wire combinations will produce no rotation at all and some combinations will produce "rough" rotation in either the forward or reverse directions.

IMPORTANT: A correct Hall/Phase wire combination will run very smooth and draw very little current (1 or 2 amps) under no-load testing. A wrong Hall/Phase wire combination will generally run very rough and draw much higher current under no-load testing. Using the wrong wiring combo under a full load (on the road) can and will damage the controller and/or your motor.

Although this may sound complicated, it really is not so bad.
Take your time and try all 36 hall-phase wire combinations in spreadsheet until you are satisfied you have it correct.
Here is a completed spreadsheet example for a 'mystery motor' of unknown origin ...
http://98.131.176.65/endless-sphere/Pha ... ations.xls

Once you are satisfied you can 'hard wire' the controller and begin to enjoy it.

Here is a completed spreadsheet for the Bafang Motor and the Schenzhen (Infineon) Controller.

Phase-Hall-Wire-Combinations-Bafang-Infineon.xls
(23.5 KiB) Downloaded 2268 times


Cheers
Last edited by Knuckles on Tue Jan 27, 2009 11:32 am, edited 6 times in total.
Image
Now this is not the end.
It is not even the beginning of the end.
But it is, perhaps, the end of the beginning.
User avatar
Knuckles
100 kW
100 kW
 
Posts: 1135
Joined: Fri May 02, 2008 10:10 am
Location: Wrong Island, NY

Re: How to Determine the Wiring for a Brushless Motor

Postby fechter » Tue Jul 22, 2008 9:48 am

Here's a little test gadget you can build to test hall sensors. This should work with virtually any brushless motor that uses hall sensors. It will tell you if all the sensors are working properly, and whether your motor has 60deg. or 120deg. hall spacing. This connects directly to the motor, with the controller disconnected. The resistor values are not critical and pretty much any LEDs will work.

Hall Sensor Tester.jpg
Hall Sensor Tester.jpg (17.42 KiB) Viewed 32334 times


Joey built one on a small piece of perforated board and used test hooks. If you have a mating connector for your motor's sensors, you could use that also. Nice job Joey..

Hall_Sensor_Tester.jpg
Hall_Sensor_Tester.jpg (40.06 KiB) Viewed 32205 times


With the tester attached, slowly rotate the motor and you should see each LED blink on and off. If any LED does not blink, there is a problem.

If there are some positions where all 3 are lit and some positions where all 3 are off, your motor has 60 degree spacing. If there is a maximum of 2 on or off at any time, then your motor has 120 degree spacing.

Now the next step is to figure out how to use the tester to eliminate the trial and error guesswork...
"One test is worth a thousand opinions"
User avatar
fechter
100 GW
100 GW
 
Posts: 10055
Joined: Sun Dec 31, 2006 3:23 pm
Location: California Bay Area, USA

Re: How to Determine the Wiring for a Brushless Motor

Postby spinningmagnets » Fri Jul 05, 2013 1:26 pm

A trouble-shooting chart from ES member "accountant", for phase-wire and hall-wire combos:

http://endless-sphere.com/forums/viewtopic.php?f=2&t=48311#p711261
Image

Here is a link to the ES wiki page for brushless motor wiring:

http://www.endless-sphere.com/w/index.php/Determining_the_Wiring_for_a_Brushless_Motor
Last edited by spinningmagnets on Thu Apr 10, 2014 7:43 pm, edited 2 times in total. View post history.
User avatar
spinningmagnets
100 GW
100 GW
 
Posts: 6749
Joined: Fri Dec 21, 2007 10:27 pm
Location: Ft Riley, NE Kansas


Return to Technical Reference Area

Who is online

Users browsing this forum: No registered users and 0 guests