I have written a HAL component to control the Mesa 3pwmgen function
(though in theory it could be used with any PWM generator if you could
find a way to get the three analogue voltages out to hardware).

Discussing the implementation last night it was noted (by jepler) that
it can be reversed in two different ways, by a negative voltage input
(which is good, beacuse it means it works with the PID) or by setting
a pin. (which is handy for cases where the motor spins the wrong way,
or the demand is unipolar and direction).

However, internally the effect of the two is rather different. The HAL
component calculates the rotor angle from the encoder, then applies a
field at an angle to that. The angle is typically 90 degrees (for
maximum efficiency with a permanent magnet motor) but is set by a pin
and so could be made to vary with motor speed, for example.

The direction pin determines whether this angle is added or subtracted
from the rotor angle.
negating the  input value negates the output voltages.

Both of these ways of altering the motor direction work. I even think
that they might be completely equivalent, but I am not sure. (possibly
only equivalent for 90 degree lead-angle?)

In any case, the driver really ought to only use one method, either
negating the input voltage if the direction pin is set, or switching
the angle direction if the input is negative.

The question is, which way is better? I rather think that switching
the angle seems more correct. Is there an electrical engineer in the
house?

-- 
atp

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to