Holy mackeroni, I forgot about the encoder ticks. That needs to be programmable! I'll include that next with the rotor time constant addition. Then I'll send you a big fat .hex file and .c and .h files that have it all. Here's a pinout for the control board. (You don't need the index pin for the encoder. the microcontroller will just ignore it in the case of an ac induction motor):