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: 403

Comment by Joel Ryan on March 23, 2010 at 4:58pm
There is a way to do that that is much easier than using Uav Devboard... buy the arduIMU and use the desktop utility software. If you look in the store, you can find the arduimu+ V2, and all the instructions are in the manual provided there. You don't have to recreate the wheel

3D Robotics
Comment by Chris Anderson on March 23, 2010 at 6:48pm
Yes, the UAVDevBoard is overkill for what you want to do. Start with ArduIMU+, which already has exactly the rotating cube thing you want, and then modify the code for your purposes. Much cheaper and easier....

Comment by Pete Hollands on March 24, 2010 at 2:32am
Wouter van Verre: Other people within the UAV Devboard community are also working towards interfacing a magnetometer using I2C to the UAV DevBoard.

Your choice of board may be governed as much by community as by cost. In other words, who else in the ardupilot community is interfacing the ArduIMU+ to a magnetometer ? That is a key question.

The software for displaying the rotating cube from both ArudIMU+ and the UAV DevBoard has been around for some time, starting with the work which was done by Intel Research. The code uses Visual Python which does most of the heavy lifting for you.
Comment by Wouter van Verre on March 24, 2010 at 2:55am
Hi all,

Thanks for all of the quick replies. I had not yet thought of using the ArduIMU+, so I'll look into that.
However, I can't use a prefabricated board for this project, my school thinks that would be too easy.
Therefore I'm designing my own board, using the UAVDevBoard and/or the AdruIMU+ as a starting point.
Yes Joel, I im recreating the wheel, but thats part of the assignment I'm afraid.
So my original question still stands, because I can't use GPS information, I would need a magnetometer (Right?). While browsing through the store I came across the HMC5843, would this magnetometer be okay for IMU purposes?

And @Pete: Thanks for all the links, when I get home I'll read them.

Comment by Pete Hollands on March 24, 2010 at 3:03am
I've been looking for an example of the python script.

There is a post here worth reading .... which points to an example visual python script here.

Comment by William Premerlani on March 24, 2010 at 12:32pm
@Wouter van Verre,

Regarding your question about the frequencies that the CPU on UAV DevBoard can run at, I will answer it, but it probably does not matter, because you are going to build your own board.

The maximum frequency that the dsPIC30F4011 will run at is 120 MHz.

You are correct, that the PLL will give you a 4, 8, or 16 multiplier, with an input range from 4-10 MHz.

There are two frequency bases available in the UAV DevBoard, the 16 MHz crystal, and a 7.5 MHz fast RC oscillator built into the dsPIC30F4011. The 16 MHz crystal is too high for the PLL, but the 7.5 MHz is in range for the PLL

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

Best regards,
Comment by Wouter van Verre on March 24, 2010 at 12:46pm

Thank you for your explanation! Indeed it wouldn't matter very much, however on my own board I was planning on using dsPIC too and I was wondering what speed to set it at??
I've one question left though:
Does the UAV DevBoard run at 16 MHz, 120 MHz or a combination of both? 'Cause in the code I came across this line:
_FOSC( CSW_FSCM_OFF & HS ) ; // external high speed crystal
This means it uses 16 MHz, I think. If so, why then does sparkfun say it runs at 120 MHz?

With regards,

Comment by William Premerlani on March 24, 2010 at 1:29pm

All of the released firmware for the UAV DevBoard runs at 16 MHz. We are doing that to reduce the amount of power the board draws, and because the CPU loading is still only about 10% at the frequency.

SparkFun does not have any connection to the firmware, they only sell the hardware. The frequency is software configurable. The board could
run at 120 MHz, if you wanted it to. So, SparkFun advertises the top speed of the hardware, 120 MHz. To be precise, I suppose SparkFun should say that it can run at 120 MHz.

I have tested the board at 120 MHz, it does work at that speed.

As we continue to develop more firmware, and the CPU loading goes up, we may raise the frequency to 30 or 60 MHz. There would not be any change to the hardware, we would just change a couple of software option bits.

Best regards,
Comment by Wouter van Verre on March 24, 2010 at 2:25pm

Again thanks for the response! I now understand all the different clock speeds and settings :).
Thanks for all the help :).
Right now I'm reading through the UDB google discussion groups, a lot of interesting stuff there too!!

With regards,
Comment by Wouter van Verre on March 31, 2010 at 12:28pm
Hi all,

I've got another question. I've tried to find the answer myself, but I can't seem to find it.
My question is, should I get a tilt-compensated magnetometer or would a 'simple' one that is not tilt-compensated do?

With regards,


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