I’m making a driver for a small 15V, hall sensored, 9-slot BLDC motor I got off of AliExpress. It has u,v,w inputs. Three hall outputs and Vcc, Gnd for them. No datasheet :)

I understand the working principle: I’ll have to use the hall sensors to figure out the location of the rotor, then power the appropriate windings.

Trouble is, I don’t know how the windings for the three phases are arranged within the motor. So I don’t know which pin to give power to, because I don’t know which windings within the motor will then be powered.

How can I figure out where the windings are for each phase?

I’m guessing I’ve got to manually spin the motor and do some detective work with back-emf measurements and hall sensor outputs to figure this out?