Take the 2-minute tour ×
Robotics Stack Exchange is a question and answer site for professional robotic engineers, hobbyists, researchers and students. It's 100% free, no registration required.

Im using my own code to create a quadcopter robot. The hardware part is done but I need to balance the copter.

This is the video of its current status: https://www.dropbox.com/s/53tpf1jzaly6m33/Movie%20on%202013-01-10%20at%2006.36.mov

I have tried to play with the speed of each motor to get it balanced. It didnt go. I actually have a gyro and accelerometer onboard. But how shall I adjust the motor speed based on these values? What are the rules that I should beware of?

Is there any better solution other that try and error? Where shall I begin? Any tips?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I believe a little Googling and you will find several of the existing controller boards have open source. For example I made a small change to hobby kings KK board last week, compiled it and it was fine (look for firmware 1.5 in the files tab). I think openAero is also readily available.

I sure would not try and start from scratch, but if you do, it is multiple PID loops on each axis, mixed with control signals from the receiver. Roll and pitch vary by changing motor speed as you guessed. Yaw is changed by changing opposite rotating pairs of motors. altitude is controlled by changing all motors at once. What code I have looked at leads me to believe you probably should be comfortable with euler angles in order to fuse sensor data from gyros and acceleration (which may or may not be I2C so learn that to if you are not familiar with it).

share|improve this answer
    
Just a followup; ran across some nice flowcharts you might find interesting; –  Spiked3 Jan 20 '13 at 18:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.