11-10-2009, 11:50 PM
|
#41 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 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.
|
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
11-11-2009, 04:40 AM
|
#42 (permalink)
|
EcoModding Lurker
Join Date: Jul 2009
Location: Latvia
Posts: 16
Thanks: 0
Thanked 6 Times in 4 Posts
|
|
|
|
11-11-2009, 06:45 PM
|
#43 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 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.
|
|
|
11-12-2009, 02:08 AM
|
#44 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 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.
|
|
|
11-12-2009, 02:55 AM
|
#45 (permalink)
|
PaulH
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 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.
|
|
|
11-12-2009, 03:51 AM
|
#46 (permalink)
|
Master EcoModder
Join Date: Sep 2009
Location: Ireland
Posts: 734
Thanks: 26
Thanked 304 Times in 171 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)
|
Master EcoModder
Join Date: Dec 2007
Location: Southern California
Posts: 1,490
Camryaro - '92 Toyota Camry LE V6 90 day: 31.12 mpg (US) Red - '00 Honda Insight Prius - '05 Toyota Prius 3 - '18 Tesla Model 3 90 day: 152.47 mpg (US)
Thanks: 349
Thanked 122 Times in 80 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: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832
Thanks: 1,362
Thanked 1,202 Times in 765 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
|
|
|
11-12-2009, 06:17 PM
|
#49 (permalink)
|
Moderate your Moderation.
Join Date: Nov 2008
Location: Troy, Pa.
Posts: 8,919
Pasta - '96 Volkswagen Passat TDi 90 day: 45.22 mpg (US)
Thanks: 1,369
Thanked 430 Times in 353 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,ʇı"
|
|
|
11-12-2009, 09:33 PM
|
#50 (permalink)
|
Master EcoModder
Join Date: Dec 2007
Location: Southern California
Posts: 1,490
Camryaro - '92 Toyota Camry LE V6 90 day: 31.12 mpg (US) Red - '00 Honda Insight Prius - '05 Toyota Prius 3 - '18 Tesla Model 3 90 day: 152.47 mpg (US)
Thanks: 349
Thanked 122 Times in 80 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.
|
|
|
|