View Full Version : Question Suitable MicroController
Chip&Dale
May 10, 2006, 01:23 AM
Hello All, :)
I've been a frequent visitor to rcgroups but didn't actually create an account until recently. I must say, this is an awesome forum/site because of all the cool information it gives, and especially all the projects and planes that you guys have! :D
Anyway, Just had a question in mind!
Currently I'm doing my last year in school and my group mates and I have selected the papparazzi project for our Final Year Submission. (or something very similar to it)
We are trying to make an RC plane (Multiplex Twinstar) takeoff and fly straight and level for a certain period, and finally land. All done autonomously via a Laptop at the site.
Our first stage is just to interface the laptop--->DAC-->Transmitter-->M.C.
We'll be borrowing the transmitter on the RC to send the signals.
So at the moment, We need advice on what Microcontroller to use. Or more precisely, what do we look for in a microcontroller...(RAM ? CPU? 8BIT/32bit Dual Proccessor? etc.) ...that is suitable to what we want to do.
Papparazzi use's a gumstix board which is linux based. There have been several other M.C.'s we've also considered. We need to have senors and GPS on board the plane for feedback as well.
Any info on this is much appreciated! :)
Sorry for the lengthy post!
Cameron
Singapore
dentompie
May 10, 2006, 12:30 PM
Hello,
First of all, the paparazzi had been using Atmel microcontrollors. In the future (now?) they will be using an arm7 microcontrollor.
Most of the low-cost/hobbyist microcontrollor projects are using Atmel or PICprocessor.
I have a PIC development board, so i use PIC's. Although I believe that Atmels are more appropriate since there is a free GNU-c compiler available for it. Unfortunately, PIC doenst have any free c-compilers (as far as i'm aware of) :-(
So, if you have the budget for it, i'd bye an Atmel development board and go for the Atmel128 (the same one paparazzi uses)
cheers,
Tom
PS: I'm beginning an MAV-blog
http://tom.pycke.be/mav
LukeZ
May 10, 2006, 01:17 PM
Unfortunately, PIC doenst have any free c-compilers (as far as i'm aware of) :http://tom.pycke.be/mavIf you don't mind using the 18F line of chips, Microchip offers a free c compiler - they call it C18. It's integrated with MPLAB and works quite well. They have a lot of libraries already written.
Anymore I don't see why one wouldn't want to use an 18 chip over a PIC16. So it's really not a bad way to go.
By the way, dentompie, nice blog. When you figure out those Kalman filters, let us know! :rolleyes:
Luke
dentompie
May 10, 2006, 01:59 PM
Hey Luke,
Thanks! As part of my thesis I used the 6DOF module from sparkfun electronics (with a bluetooth link that goes 100+meters. So i already made the code for kalman filters and stuff :cool:
I just finished measuring some time-constants for the MAV-airframe developed at my uni. It's pretty sweet :)
Hopefully I'll find time to update the blog from time to time. Whats to come: overview of autopilot systems, overview of usable IMU-modules, explanation about accelerometers and gyroscopes, and finally a kalman filtering tutorial! I'd bookmark it if I were you ;)
Cheers,
Tom
LukeZ
May 10, 2006, 02:33 PM
Thanks! As part of my thesis I used the 6DOF module from sparkfun electronics (with a bluetooth link that goes 100+meters. So i already made the code for kalman filters and stuff :cool:Tom, do you plan to make any of your code open source?! If you have a working Kalman filter implementation for fixed wing aircraft then you have accomplished something indeed! This is a big gaping hole in the hobby right now. Rotomotion has open source code but as you know it's for helos.
I definitely will bookmark your blog - and hope you decide to release some code. ;)
Luke
dentompie
May 10, 2006, 04:13 PM
Hey Luke,
I only have kalman code available in MatLab right now. But of course it's just a matter of writing all the matrix calculations as +, - and * and optimizing the result for speed! I'll probably do that one day, when I have time. In the more near future, I'll post a small kalman filter tutorial on my blog.
I've just added a simple accelerometer to pitch and roll tutorial on my blog (http://tom.pycke.be/mav ) (we have to start somewhere...). Feel free to comment!
Tom
LukeZ
May 10, 2006, 04:40 PM
Tom,
Great stuff! Tutorials are definitely needed, keep them coming!
And since we're swapping tutorials, you can check out mine on altitude (http://www.kansasflyer.org/index.asp?nav=Avi&sec=Alti&tab=Theory) and airspeed (http://www.kansasflyer.org/index.asp?nav=Avi&sec=Asi&tab=Theory). :)
Luke
LukeZ
May 10, 2006, 04:41 PM
Cameron, I'm sorry I've hijacked your thread! I'm done now. :o
AirBorne_AZ
May 10, 2006, 06:06 PM
Tom,
Are you planning on making your Matlab code public? I would really like to look at the Matlab code. I do pretty good with matlab and simulink coz thats all that I use at work. Its easy for me to understand things in Matlab than in C or C++. I would highly appreciate if you decide to make your code public.
Thanks.
space_case
May 10, 2006, 06:14 PM
Kalman MAtlab toolbox (http://www.cs.ubc.ca/~murphyk/Software/Kalman/kalman.html)
hugo_vincent
May 11, 2006, 03:58 AM
I'd also like to see your MATLAB code. Please share ;)
dentompie
May 11, 2006, 05:34 AM
Okay,
I'll try to write that tutorial ASAP :cool: (tonight or tomorrow)
I suppose the main problem is making the model that you need for the kalman filtering. I'll try to use a very basic one in the tutorial.
BTW Luke, those tutorials you have there are awsome. I guess you put alot of effort into those! Nice work. Maybe one day we can bundle ours in a book ;)
AntonK
May 11, 2006, 12:07 PM
To clarify, although someone mentioned it, the paparazzi project uses dual MCUs the atmel mega 8 and mega128 on the older boards, and the new version uses either 1 LPC2148 ARM7 or 2 LPC2148 ARM7s. The Gumstix is just available on the dual MCU ARM board as a processing unit, but its not expected that any autopilot functions will be done here.
Anton
UAVGeek
May 12, 2006, 10:25 AM
Tom,
Great stuff! Tutorials are definitely needed, keep them coming!
And since we're swapping tutorials, you can check out mine on altitude (http://www.kansasflyer.org/index.asp?nav=Avi&sec=Alti&tab=Theory) and airspeed (http://www.kansasflyer.org/index.asp?nav=Avi&sec=Asi&tab=Theory). :)
Luke
Oh I could have used that altitude tutorial earlier :) Thanks for presenting the information in such an easy to understand format.
I'm using netburners MOD5213 <http://www.netburner.com/products/core_modules/mod5213.html> for my processor. It's a 63 MIP processor and comes with uC OS as a free RTOS and the full GNU C toolchain. The development board with processor and compiler was $99 IIRC. It has 8 PWM outputs, 12bit A/D (7 channel), 2 serial ports 32k ram and 256k of flash so it's a pretty fast little bugger with lots of room for code. The multitasking RTOS makes it really nice for a UAV.
I'm working on servo drivers for the PWM output now.
I have GPS drivers and internal waypoint code running with a simple command processor. Commands like "climb x/fps" "waypoint [location]"
"land" etc..
I took a different approach for the altimeter by starting with a 3 volt offset on the sensor then amplifing the remainder ~4x I have a very narrow range (7500 feet) but about 1 foot resolution. Of course the A/D noise makes the accuracy a lot worse than that, but "in theory" it's pretty good. My driving tests say 0.93 bits/foot measured with a DVM
I used a 16F628A pic as a failsafe device. It has 4 channels from the receiver and 4 from the computer as inputs and 4 outputs to the servos.
If it sees the receiver go "valid" then it disconnects the computer and starts passing info from the receiver to the servos. That way I can turn on my radio and take control of the plane if things get crazy.
I'm hoping for initial flight tests in the next week or so.
Chuck
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.