Open the connector between a hub motor and its controller and you are looking at eight or nine wires in five or six colours. Most riders read those colours as a wiring diagram: match them up and the motor spins. Half of that is true. On many motors the colours hint at what each wire is for, but they are each maker's choice, not a standard, and they do not, on their own, promise that the motor will run correctly.
Before anything else: power down. Switch the bike off, take the battery out, and wait thirty seconds. Plugging or unplugging phase wires with power present arcs across the pins and destroys controller MOSFETs. Every step below assumes the battery is out while you change a connection.
What the eight or nine wires actually are
Three thick wires are the phase wires — often yellow, green and blue. They carry the three-phase current that turns the motor, which is why they are the heavy ones.
Five thin wires are the hall sensor group — a +5 V supply, a ground and the Hall A, B and C position signals. On many motors these are red, black, and yellow, green and blue; confirm yours with a meter or both wiring diagrams. These tell the controller where the rotor is, so it knows when to energise each phase.
If your motor has a ninth wire, it usually carries a temperature or speed signal.
Notice that yellow, green and blue each appear twice, once thick and once thin. Thickness is the reliable tell: power on the thick side, signal on the thin side. Never join a thin wire to a thick one.
Check the manual, fix the supply wires, then stop assuming
Check your controller's manual before you join anything by hand. Some controllers learn the order themselves, with self-learning wires, a display setting or an autotune routine; see what each self-learning result tells you. If you are joining wire to wire, connect +5 V, ground and any speed or temperature wire first, by function, and never move them again: reversed, +5 V and ground can destroy the Hall sensors. Like to like (yellow phase to yellow phase, and the same across the Hall signals) is a reasonable first try only when both parts are known to use the same colour scheme, as on a motor and controller built as a set.
The catch is that phase wires and hall wires are paired inside the controller logic — the blue phase belongs with the blue hall signal, and so on. When you mix parts from different manufacturers, the factory that wound the motor and the factory that programmed the controller may never have agreed on which colour sits in which position. The plugs still fit. The colours still match. The pairing underneath does not.
Why people talk about 36 combinations
Three phase wires can be ordered six ways. Three hall signal wires can be ordered six ways. Six times six is thirty-six possible wirings. According to Grin Technologies' Grinfineon controller manual, only three of them drive the motor properly forward and three more run it backward. That is the real reason a colour-matched connection can still fail.
Read the result from behaviour, not from the wire colours:
Smooth forward rotation with low no-load current. Very likely correct; confirm it with the current check below, then tidy the cables.
Smooth rotation, wrong direction. Close, but not finished. With the Hall sensors connected, swapping two phase wires breaks the combination rather than reversing it: swap a pair of Hall signal wires and search the phase arrangements again, as in the method below. Swapping two phase wires reverses a motor only when it runs sensorless, with the Hall plug disconnected.
Juddering, stuttering, or a knocking noise. Commutation is out of sequence — the controller is firing the phases in the wrong order.
No movement, or a locked, stalled feel. Wrong combination; the controller cannot get the motor started.
Unusually high no-load current, or heat building up fast. Cut power immediately. Continuing to test in this state damages the motor and the controller.
A method that beats guessing
Lift the driven wheel off the ground before every test, and change one thing at a time.
With +5 V, ground and any extra signal wire fixed, join the three Hall signal wires in any order and leave them there. Give it a brief, gentle test. If the motor does not run smoothly, work the three phase wires through their six arrangements, testing each one: rotate them one position at a time through three positions, then swap any two and rotate through three again. One of the six should run smoothly. If it runs smoothly but backward, swap a pair of Hall signal wires and repeat the six phase arrangements. Our 36-combination guide walks through it step by step.
Judge the winner by three things together: rotation that is quiet and smooth, the lowest no-load current of any combination you tried, and no hesitation on start. A digital multimeter is what turns that middle criterion from a guess into a measurement, and it is also how you confirm the hall group is receiving its 5V in the first place.
When there are no hall wires at all
Some controllers offer a sensorless mode that uses only the three phase wires. It behaves differently on purpose: starts are hesitant, low-speed pulling is weak, and everything feels normal once the wheel is turning. For a motor whose hall sensors have failed, that trade is often better than replacing the motor.
Before you cut anything
Replacement connectors and a clean crimp matter as much as the wiring order. A waterproof connector kit lets you re-pin a plug instead of splicing, and a complete main wiring harness is often the faster answer when the original loom has been cut about by a previous repair.
If you are replacing the motor or the controller rather than rewiring them, match any replacement on voltage and connector first; the wiring order above still has to be confirmed on the bench.
One last thing worth knowing: this whole exercise is about the electrical layer only. The controller and display talk over a separate protocol, and matching colours there proves nothing at all — that is covered in why a new display may not work with your controller. If the motor was behaving strangely before you opened anything, read the guidance on a motor that runs by itself first; that fault is not a wiring-order problem and should not be tested on the road.
Colour hints at what a wire does, and a meter confirms it. Behaviour tells you whether you got it right.
For the rest of the electrical system, checked symptom by symptom, see our e-bike repair DIY guide.