Hi! Thanks for stopping by.
Your first question probably would be “What is this blog
about?” As the name implies, it is about building from scratch quadro- or
multi-copter flight control board – the “brain inside the machine” that is
responsible for letting it fly.
There is a multitude of flight control boards on the market
today – AeroQuad, ArduCopter, DJI, KK, MultiWii - just to name a few. A rather
large list of these boards provided at http://robot-kingdom.com/best-flight-controller-for-quadcopter-and-multicopter/,
but if you search Google, you probably find many more. So if your interest is
in just flying a multicopter or building one and then flying it – you would be
much better off just buying either a kit or a RTF set.
This blog goes into the details of building the board and
developing firmware for it from scratch! That is from the bare-bone MCU – no
external libraries, no black-box code – everything is here and everything is
explained. All the code that will be discussed here is available at https://code.google.com/p/custom-pic-quad/
under the Open Source MIT License – look at it or use it at your own discretion WITHOUT ANY
WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The version of the board and corresponding firmware that
will be discussed here is for the Version 3 of the board, which I am working on
now. Thus, I will be publishing new articles for this blog as my development
effort progresses. Is there a promise that I will conclude this effort and do
not leave you, my readers, halfway there? I think so. I have been working on
flight control boards since about 2004. While the first couple of revisions
(starting with Version 0) were total failure, I finally succeeded with the
Version 2 (code and Eagle files for the board itself are at the link above),
which happily carries my quad in the air - https://www.youtube.com/watch?v=kEo5DSe7PDg. If you are interested, more details are provided
on the Project History page.
So why don’t I blog about the working Version 2? Oh, it is
boring! Since then I got some new idea, improved code, designed much better
board, etc. – so why bother with the old stuff when we can together delve into
the new one?
Another reason for this blog is rather selfish – while
working on Version 2 I implemented a lot of calibration of the sensors like
calibration of magnetometer for Hard and Soft-iron interference (Application
notes AN4246 and AN4248 from http://www.freescale.com/)
and temperature compensation and calibration of InvenSense IMU MPU-6050. Yes, I
have some Excel spreadsheets hanging around from that time, but I did not
document all of those efforts properly to assist me in calibrating sensors on
my new board. Now I plan to document calibrating sensors on my new board in
this blog, so when I get to the next iteration (maybe, Version 4 or 5) I will
have all my notes readily documented in this blog! This also applies to sensor
fusion, PID tuning, etc.
If you stayed with me up to here, you probably
would be interested in what is so special about my project and what is the
overall architecture of my board and the corresponding firmware? That will be
the topic of the next post.
Nice Project and nice work. I am also Planning to make something like this but on DSPic33FJ128GP202. Because its available Here my country. However, I cant download the Project Google Code. Can u Plz Upload it Github or 4Shared or Some Place else. It will be vary help for me. Thanks
ReplyDeleteRony, the Google Code is my SVN repository linked to MPLab development environment. I am not familiar with Github or 4Share, so it might be difficult for me to upload code there. What kind of problem do you have with Google Code? Can you navigate to the links to individual projects and files on Google Code that i provide in my posts?
ReplyDeleteRegards,
Alex
Dear Alex,
ReplyDeleteUr code is vary nice. lots of websites and projects but ur one is structural. Problem is only few of Microchip guys making this kind of good project. I am also microchip based developer and not comfortable with Arduino. I develop with Proton Basic. and i want to convert ur Development to Proton Basic compiler with ur permission. However it would be better if u Publish little tutorial type article specially on how ur code driving MPU6050 and feeding it to PID etc. For an example www.botched.co.uk. There is a big community of basic lovers waiting to taste quad copter with Proton basic code
Thanks
Rony, I plan to go through every step of the design, including the MPU-6050 communication, PID controller, etc. - just everything in its own time :) My next post will be about I2C library that I put together - and right after that we will get to devices on the I2C bus, including MPU-6050.
ReplyDeleteActually, the code is already on the site - and well commented, so you are welcome to go ahead and try to analyze the code before I get to the respective post.
Regards,
--Alex
Thanks and waiting for ur Tutorials. Not only me but alos the hole community of Proton24. And thanks for ur fast replay :)
ReplyDeleteDear Alex, All Porting are completed except One. That is Direction Cosine Matrix. Can u just explain how to Process Raw MPU6050 data to eular Angles. Suppose We have got Raw Data for x,y,z = 566,288,380
ReplyDeleteNow how to calculate This all for rotation Matrix and drift correction. I have already got MPU6050 raw data. It would be helpful if u explain like note book , Not like Programming language :) Thanks
Rony, raw MPU6050 data is meaningless (or almost meaningless :)) - you have to implement the DCM algorithm to "fuse" accelerometer and gyro feeds. Then it would be quite easy to retrieve Euleur angles from DCM. Check Bill Premerlani's post on DIYDrones.com explaining DCM algorithm - then it would be easier for you to read (and convert) my code.
ReplyDeleteRegards,
--Alex