Usually, it does not seem worthwhile to repair such small, inexpensive fan motors. A better solution is to buy a new one, whenever it's possible. But sometimes it has to be done. This internal connection (4 speeds, 8 poles, 32 slots) is one of countless examples. Hopefully it can help to understand the basic principles of this speed regulation. If you have a similar example that is reliable and already tested in practice, send us a diagram in order to publish it.
