Hi all!

First I wanna congratulate all of you with all the things you've achieved already!
Now I have question:
I have to do a large school project, I have almost a year to complete it, and I want to make an IMU and display the data graphically using a rotating cube. I've done a lot of reading on this site already, and this is what i came up with:

My idea is to use the UAV Dev Board as a starting point. I would make my own board based on the UAVDevBoard, and rewrite the code (Yes I know I'd be reinventing the wheel, but thats part of the assignment :P).
Because the IMU would not be moving a lot, I won't be able to use GPS data for yaw correction (Right?), so I would need to use a magnetometer (Right?). And if so, what kind of magnetometer would I have to use? I was thinking a 3-axis tilt-compensated magnetometer like this one: http://www.sparkfun.com/commerce/product_info.php?products_id=8656

Also the sparkfun description of the UAVDevBoard kind of confuses me, because it says
"dsPIC runs at 120MHz with 16MHz resonator and PLL"
Now I understand that PLL can multiply the clock speed. But my understanding is that it can only multiply by 4, 8 or 16, none of which give 120MHz. Also the datasheet says that PLL can only be used with a 4-10MHz oscillator.
And finally, in the code i can't seem to find the place where the PLL is set?
Could someone maybe explain to me how they got to 120 MHz?

With regards,
Wouter van Verre

Views: 391

Comment by Pete Hollands on March 31, 2010 at 12:38pm

I think you probably will want to get the magnetometer that is in the DIY Drones.com Store if you are going to use it with the UAV DevBoard. Why ?

1) There is an ongoing project to integrate that device with the UavDevBoard. Progress is being made.
2) Tilt compensated magnetometers usually have on board acclerometers to detect gravity. I don't think these will work well when a plane is pulling say 2g in a tight continuous turn.
However, the UDB already has all of that calculation completely done. The UDB knows exactly what orientation it is in all the time. So it can provide the tilt compensation functionality itself in it's own firmware. So we do not need the more expensive tilt compensated magnetometers. We can use the more basic and cheaper ones.
Comment by Wouter van Verre on March 31, 2010 at 1:10pm
Hi Pete,

Thanks for you quick response! I'll go and that magnetometer.
Also, another question just popped up in my mind. How does the DCM algorithm perform without yaw compensation?


Comment by Pete Hollands on March 31, 2010 at 1:23pm
The DCM algorithm does yaw correction using the course reported by the GPS when the plane is moving.
So when the plane takes off it is normally in stabilized mode, but does not need at that point to know whether it is pointing North,South,East or West. But over the next 20 seconds the Yaw Gyro is calibrated by the GPS course. So after 20 seconds of flight, if you switch into waypoint mode, the plane (and it's gyros and the DCM), know exactly which course the plane is on. The gyros control the heading of the plane 40 times / second. The Gyros are corrected every 1/4 or every 1 second (depending on whether you use a Ublox or an EM406A).

The Magnetometer for flight in a plane is only needed really for two distinct conditions. 1) When the plane is in hover mode (hanging of it's propellor) or 2) for fully automated take off.

Comment by William Premerlani on March 31, 2010 at 3:36pm
You are 100% correct. Thank you so very much for supplying this information.
Comment by Dave_fr on March 10, 2012 at 3:12am

So, here are the frequencies the UAV DevBoard will run at:

7.5 MHz : fast RC
16 MHz : crystal
30 MHz : fast RC + 4X PLL
60 MHz : fast RC + 8X PLL
120 MHz : fast RC + 16X PLL

I don't underdand why these frequencies are the only ones acceptable. I see that N1 & N2 are limited to a few values but can't you set M (PLLFBDbits.PLLDIV) to get,say 80Mhz ?

Comment by Wouter van Verre on March 10, 2012 at 3:52am

Hi Dave_fr, 

This thread is about the UDB2 board, which runs on a dsPIC30F4011 processor (the UDB3 board has this processor as well). I quickly skimmed through the documents on this cpu and I don't think it supports a PLL feedback divisor. It does have a Programmable Oscillator Postcaler, but I am not very familiar with it, so I wont comment on it. Maybe I will have some time to read about it this afternoon.

I guess you are talking about the dsPIC33F256GP710A processor on the UDB4 boards. This processor does feature the PLL Feedback Divisor you mentioned. The frequencies mentioned in this thread are not applicable to the UDB4 boards, because the cpu and the crystal are different. 

I hope this helps!

Kind regards,

Wouter van Verre


You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service