11-10-2009, 11:50 PM
|
#41 (permalink)
|
|
PaulH
Join Date: Feb 2008
Location: Seattle, WA
Posts: 2,440
Thanks: 306
Thanked 188 Times in 132 Posts
|
The documentation for the dsPIC30F family is almost 800 pages, and is a train wreck. There are no "here's how you get started" basic sort of web site for the chip in all the searching that I have done. There are for other PICs, but as far as I can tell, it's dramatically different. Well, back to reading the 800 pages.
__________________
signature goes here.
|
|
|
|
Today
|
|
|
|
Other popular topics in this forum...
|
|
|
|
11-11-2009, 04:40 AM
|
#42 (permalink)
|
|
EcoModding Lurker
Join Date: Jul 2009
Location: Latvia
Posts: 13
Thanks: 0
Thanked 3 Times in 2 Posts
|
|
|
|
|
11-11-2009, 06:45 PM
|
#43 (permalink)
|
|
PaulH
Join Date: Feb 2008
Location: Seattle, WA
Posts: 2,440
Thanks: 306
Thanked 188 Times in 132 Posts
|
OK, I figured out how to do some stuff, and I have all the pin choices set up. I'm not super angry anymore. The Microchip documentation isn't as good as Atmel's, but is still useable.
__________________
signature goes here.
|
|
|
|
11-12-2009, 02:08 AM
|
#44 (permalink)
|
|
PaulH
Join Date: Feb 2008
Location: Seattle, WA
Posts: 2,440
Thanks: 306
Thanked 188 Times in 132 Posts
|
The encoder came today! ya! That goes over the motor shaft (motor not here yet). It has 512 pulses per revolution. That's used to know basically the rotor position. You need rotor position and the measurement of the current on 2 of the 3 phases to make field oriented control work.
My new fancy encoder.
If I can get sensorless field oriented control working later, I can do away with that part.
__________________
signature goes here.
|
|
|
|
11-12-2009, 02:55 AM
|
#45 (permalink)
|
|
PaulH
Join Date: Feb 2008
Location: Seattle, WA
Posts: 2,440
Thanks: 306
Thanked 188 Times in 132 Posts
|
First, check this out:
SPACE VECTORS
You use PWM to control the red, green and blue vectors (voltages). The net result is the rotating black vector.
Here's a graphical representation relating to the field oriented control:
Field oriented control
The upper left animation represents the vector sum of the 3 phase voltages. Notice that Xa and Xb change with time. Now, you do a transformation so that you are rotating with the rotor. That is the upper right animation. Now, Xd and Xq do not change with time. You can now use a PI loops with those values since they don't change with time. Then you do an inverse transform and modify the pwm duties accordingly. I'm still trying to understand it. I will soon.
__________________
signature goes here.
|
|
|
|
11-12-2009, 03:51 AM
|
#46 (permalink)
|
|
Master EcoModder
Join Date: Sep 2009
Location: Ireland
Posts: 559
Thanks: 18
Thanked 146 Times in 88 Posts
|
Microchip docs were always bad. I attended a few seminars years ago and have the course notes. If you like i can pack em up and send em over to you?
|
|
|
|
11-12-2009, 04:27 AM
|
#47 (permalink)
|
|
101% win
Join Date: Dec 2007
Location: Where I live
Posts: 1,354
Thanks: 81
Thanked 63 Times in 42 Posts
|
Quote:
Originally Posted by MPaulHolmes
I'm still trying to understand it. I will soon.
|
What part are you having trouble with? I bet you won't have an answer by the time you reply to this, if you reply. 
|
|
|
|
11-12-2009, 11:08 AM
|
#48 (permalink)
|
|
PaulH
Join Date: Feb 2008
Location: Seattle, WA
Posts: 2,440
Thanks: 306
Thanked 188 Times in 132 Posts
|
Hi Jack! Are any of the notes on the dsPIC specifically? Fran told me that it was "a completely different animal" from the 8 bit pics.
roflwaffle: I just need a couple hours where I do some of the transformations on some sample vectors to get a feel for what is going on. Check out page 3 on this application note to see the whole picture of what is going on-
Link to the thingy
__________________
signature goes here.
|
|
|
|
11-12-2009, 06:17 PM
|
#49 (permalink)
|
|
Moderate your Moderation.
Join Date: Nov 2008
Location: Troy, Pa.
Posts: 8,236
Thanks: 868
Thanked 294 Times in 248 Posts
|
Quote:
Originally Posted by MPaulHolmes
The encoder came today! ya! That goes over the motor shaft (motor not here yet). It has 512 pulses per revolution. That's used to know basically the rotor position. You need rotor position and the measurement of the current on 2 of the 3 phases to make field oriented control work.
My new fancy encoder.
If I can get sensorless field oriented control working later, I can do away with that part.
|
Would a car's ABS sensor work the same way? It's a hall-effect sensor, right?
__________________
"¿ʞɐǝɹɟ ɐ ǝɹ,noʎ uǝɥʍ 'ʇı ʇ,usı 'ʎlǝuol s,ʇı"
I'd like to think that people might open their eyes at some point... instead, I find it more and more likely that I'll just close mine.
-- Author kept secret.
Je ne veux pas d'une meilleure vie. Je veux être heureux avec celle que j'ai maintenant.
(I do not want a better life. I want to be happy with the one I have now.)
|
|
|
|
11-12-2009, 09:33 PM
|
#50 (permalink)
|
|
101% win
Join Date: Dec 2007
Location: Where I live
Posts: 1,354
Thanks: 81
Thanked 63 Times in 42 Posts
|
I think the resolution (or whatever the right word is) of most hall sensors is kind of an obstacle. I don't think it would be too hard to put four or whatever magnets around something in order to determine the rough rotor position, but 512 isn't doable AFAIK unless we're looking at something w/ a really large circumference. It also depends on the maximum speed at which the sensor can vary it's output voltage.
|
|
|
|
|