Let's Make Robots!

Agile Quadcopter From Scratch

I want to make a quadcopter from scratch.

that means, frame, motors, everything, including writing the code for stabilizing it.


I have several questions:

I read several blogs about gyroscopes vs accellerometers. Do i need both? From what i understand, i can just use an accellerometer to add power to an engine when it starts tilting? am i right?

Which microcontroller is suitable for the job? im thinking of arduino, but not using ardupilot, i wanna write my own stabilization code. Any ideas on this?

Do you have any reccommendations for gyroscopes/accellerometers? and a guide on how to read their inputs from the microcontroller?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hey Deller,

Building a aerial robot is something I plan on doing one day so I'd be very interested to see how yours goes using minimal components on top of motors and a microcontroller. Apart from the gyro/accellerometer combination, have you thought of using/ruling out ESC's?

And the award goes to:   Deller!!!

Oh, we have had a bad rash of poorly-written one-sentence questions lately from folks that seemed they wanted answers more than they wanted to put forth effort. But you sir, this question is poetry.


  • First line is a clear, simple explaination of what we want to buld
  • Line 2 --Refine the project (yeah I want to do everything)
  • Line 4 --I have read several blogs...  ... accel vs gyro questions

Now this is the real magic folks --"I have read some blogs" and also "accel vs gyro". This shows, "hey, I put in a little effort here and tried to make my own way, but I ran into these two things I need help with." This also means all of the answer'ers can refine their answers --Better questions, better answers, guys.

  • Last 2 lines --Again, clear simple questions. We tidy up the whole post and bring it back to these two clear questions. "These are the things I would like to know... boom, boom."

Deller, I apologize that I am not a quadcopter guy and really can't help much. I also apologize that I have to single-out your question to be used as an example but really --you have asked a beautifully worded question here and it has been a long time that we have seen one of those for a while. Refreshing.


Good luck with your quad --there are a lot of quad folks around here, they will be around soon.

A gyroscope reports tilt, but, over time, it can start to lose what level actually is (ie they drift over time).

Accelerometers only report a change in acceleration. Because they only report the change, they can be used to make sure the gyro still knows which way is straight up.

I would imagine that an accelerometer by itself could run into a similar problem, but, instead of the sensor being off, the code that attempts to maintain vertical could drift due to math errors.

The extra few dollars for a combo gyro/accel are probably worth the headache of keeping everything honest. :)

I can verify the above info based on my own experience:
• Accelerometers make for a solid reference, but you can't use them to handle quick motions as they respond to all sources of acceleration, not just gravity.
• Gyroscopes allow you to respond quickly so they're great for rapid stabilisation, but they can't be used to keep track of which way is down in the long term due to accumulated errors.

As birdmun said, go for a package that has both included. You'll need at least 2 gyroscope axes and 2 accelerometer axes... 3 accelerometer axes if you want the quad to be able to correct itself if it goes upside-down =)

Most gyroscopes/accelerometers use the I2C bus to communicate with a micro controller. Arduino / ATmega has support for that (wire library). There are loads of Arduino libraries for gyros, acceleromters and magnetometers. I have good experience with the ADXL345 accelerometer and the ITG3205 gyroscope.