Can we make this so everyone can edit it? Or a certain set of everyones?
I am taking a stab at an outline but I don't very much.
Tools:
Most Basic: Ohms-Volts-Amps Multi Meter
Better: Multi-meter than can measure inductance, oscilloscope
E-bike as system:
Battery--controller--motor
"Brushless DC motors" are akin to 3 phase AC induction motors except that instead of 3 steady sine waves coming in from the grid, we have a DC battery and a "controller" to send three square waves into the three coils of the stator. In a "hub" motor, the stator is fixed and the hub (comprised of a ring of alternating polarity permanent magnets and two side plates that hold sealed bearings that slip over the axles of the the stator). The whole assembly rotates around the stator. This eliminates the need for brushes to convey power to a rotating stator.
For it all to work your controller needs to know or be able to figure out where the hub is relative to the stator and be able to alternately energize the coils to both push and pull the hub around the stator.
The knowing where things are part is done with Hall effect sensors: electronic thingies that pulse when they go past magnets (each other?). The set of five thin wires between the motor and the controller are for the Hall Effect sensors: black and red for power and yellow, green, and blue signal wires.
There are also three thicker wires: one each of yellow, green, and blue (YGB). These connect to one end of each coil. The other end of all three coils are tied together. Thus this is called a Y or WYE winding.
Various methods have been used to test the hall effect sensors the simplest of which is to connect a voltmeter between each small YGB colored wire and the black power wire. Apply six volts or so to the thin red and black wires to the wheel. You can also just leave them plugged into the controller with both the fat and thin YGB wires UNPLUGGED. Spin the wheel SLOWLY and see if you get 4.9V pulses across each of the small YGB wires and the small black wire. If you do, your hall effect sensors are good.
Use your ohm meter to measure the resistance between each of the large YGB wires and the stator (via the axle) and hub. Next measure the resistance between each of the large YGB wires. They should all be very close to the same very small number (< 1 ohm). If you have a meter that measures inductance, measure the inductance between each pair of the large YGB wires. These should also be similar but with values around 750 micro Henries.
Connect the motor to the controller and go through the phase setting procedure for your model controller--some use the power switch to jump between options while others use throttle bursts. Select the best option and disable the selection procedure.
Run the wheel with all power wires connected. Note speed and sound. Disconnect one power wire at a time and then rerun the motor noting any differences or absences of differences. If one or more power wires can be disconnected without affecting the speed and sound of the motor, something is wrong.
Remap the wires so blue goes to yellow, yellow to green, and green goes to blue (or some other remap--its not important--just be consistent. Re select the optimum phase and try the test again. If the wires of the same color that went wrong the first time are attached to the controller the second time, the fault belongs to the controller (its not producing a phase) but if the color that identified in the first test is attached to the wheel in the second test, the fault lies with the wheel.
What am I missing?
OK--how about something on how to replace the bearings? If I had done that, I'd still be riding my first motor. Has anyone done that? It looks like a simple press-out press-in to me but I have never done it.