Yes; as soon as the current stabilizes there is no voltage across the inductor.
The \$EMF (voltage) = l \dfrac{di}{dt}\$; when the current is not changing, \$\dfrac{di}{dt} = 0\$; then the voltage is 0.
The base waveform can be divided into 6 points, each point with the same delay between them. The length of that delay defines the speed of the motor.
The 6 points, or phases are:
- Phase A HIGH
- Phase C LOW
- Phase B HIGH
- Phase A LOW
- Phase C HIGH
- Phase B LOW
You notice the sequence of phases is repeated, but the signals inverted. Basically it's 3 square waves with a 120° phase shift.
Here's another way of looking at it - as a circle split into 6 segments, each segment defining a changed signal level (the signal changes at the interfaces to each segment):
As you work around the circle so the motor turns.
If I were then to create concentric rings for each of the three phases you can see better how then then turn on and off and interact with each other:
You can see from that how three coils A B and C located A at 3:00, B at 7:30 and C at 10:30 (90°, 210° and 330°) the interaction between them forms 6 distinct locations - when A is on the magnet is pulled to A, when B is on, it's pulled to B, but when both A and B are on it's pulled to half-way between them.
In reality a motor would often have multiples of 3 coils forming multiples of 6 points around the circle, increasing the torque, smoothness of rotation, etc.
So your code would actually be much simpler as far as the switching goes:
PORTBbits.RB0 = 1; // Phase 1
Delay_x100uS(speed);
PORTBbuts.RB2 = 0; // Phase 2
Delay_x100uS(speed);
PORTBbuts.RB1 = 1; // Phase 3
Delay_x100uS(speed);
PORTBbits.RB0 = 0; // Phase 4
Delay_x100uS(speed);
PORTBbuts.RB2 = 1; // Phase 5
Delay_x100uS(speed);
PORTBbuts.RB1 = 0; // Phase 6
Delay_x100uS(speed);
What value should "speed" be? As I said, that defines the speed of rotation of the motor. I would suggest starting with a high value so the motor starts off slow, then gradually decreasing it, thus accelerating the motor to a higher speed. Maybe tie the value to an analogue input and use a potentiometer to set the speed?
Best Answer
If you can get at the winding ends without electronic switches etc in the way then there are a number of possible methods.
Direct measurement (some (few) multimeters).
Time constant response to an applied square wave.
Tc = L/R.
R of coil can be measured and additional R can be added, then apply a square wave and note current ramp rate of rise.
Add second known inductor in series. Apply AC to series string and note relative voltage drops which are proportional to inductance for pure inductors.