View Single Post
Old 12-31-2010, 07:21 PM   #475 (permalink)
MPaulHolmes
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,368
Thanked 1,202 Times in 765 Posts
Man, does anyone want to condense that gnu thing down to 10 words or less? Holy cow. I "read" it, but I don't know what I read. haha.

OK! I've been debugging the software. Everything is all set up. The encoder is now working. At first the index pulse wasn't resetting the counter, but now it is working! ya! It was just one bit I forgot to set in initializing the Quadrature Encoder Interface module. The annoying thing is you need the rotor flux angle, which has nothing to do with the location of the index. So, now I need to run the motor with Id chasing throttle, and Iq chasing 0, until there's no movement with the motor. Then, I need to mark the angle that the motor post is at, and that's the official rotor flux angle for all eternity, well until I get a new motor or encoder! Then, you make Iq chase throttle, and Id chase 0, and the stupid thing should spin!

I also did some time tests. All in C, my field oriented control code takes 25uS, and I have 125uS available if I run the motor PWMs at 8kHz. Or, if I switch to 16kHz, I'll still have around 62.5uS, which is more than enough! HUrray! I don't have to learn PIC assembly at this time. hahaha
__________________
kits and boards
  Reply With Quote