Hi all,
I have builded my first DIY quadcopter and have some unresolved issues with it. Unfortunately it is not stable enough to hover and fly. Quad begins to overcompensate and lose control very quickly if given higher throttle (30% throttle or more).
Total weight of quad is around 1,5kg (with lipo) and total motor thrust is about 3,2kg.

Components used:
ESC - Emax 20A SimonK
Motors - Emax XA2212 980KV
Propellers - 10x4.7 (plastic)
Lipo 3S 5000 mAh 11.1V 30C Zop Power

Flight controller - Arduino Uno (running self made code)
Gyro/Accelerometer - GY-87 (10DOF sensor)
Frame - self made - mostly wooden with two aluminum bars for stronger construction​

Motors and propellers are balanced using tape method. Regardless of balancing there as still very high vibrations coming from motors that probably interfere with gyro/accelerometer sensor readings. Motors are isolated from wooden bar by rubber band and are held on bar using plastic ties. IMU sensor is mounted on top of wooden board held on ear plugs that are glued to frame.
I try everything I could think of to make it flyable but without no success. Tried replacing aluminum arms with wooden, putting rubber band on motor hold to reduce vibrations, putting IMU sensor on ear plug foam, balancing motors and propellers several times. I'm totally out of options now.
I think that problem could be in vibrations or frame or propeller adapter and propeller combination.

In following video quad is tied so it can move only around pitch axis. It has command to maintain zero angle position (horizontal).

Following are pictures of vibrations measurement taken with iSeismometer app (iOS).
http://tinypic.com/r/5bsknq/9
http://tinypic.com/r/2coiy5u/9
http://tinypic.com/r/2agks3b/9
http://tinypic.com/r/309lgl0/9


Help please. Any suggestions are welcome. :)

2ahb253.jpg

j6pr8h.jpg
 

You might have to lower your gains.....maybe divide the gain numbers in half because the overcompensation is extremly severe...What would also help is to use smaller props like maybe 8 inch and then when you get it stable you can go back to the longer props.....the problem is you need the flight controller to have full control of the motors and if your gains are too high and the props are too long it make it dificult for the flight controller to adjust to the motion of the frame hence the oscilation and the overcompansation.
 

Hi,
I made some progress by following suggestions from guys on other forum. First of all strings tying method that I used to test quadcopter at home was causing lot of trouble. I remove those strings and test it outside. Now I can get it airborne but it flips after second in air and fall to ground. Some folks said that this is probably flight controller fault and suggested that I try Multiwii or some other FC. I'm currently using my FC code that I made from stretch. Before I make this FC code I studied other successful FC projects and Multiwii's code also I studied technical manuals for programming IMU sensor that I'm using. I test this code in every possible step and it should work.

Why do you think that I get better results with smaller props? What do you think about vibration measurements that I posted are they normal or too high?

Here is video from today's test
 

linkages

New Member
It seems more a programming problem, than a structural problem, your quad is not correcting errors how it should... seems very slow doing that, and he seems missing D component in PID.
what frequency are you running your PID ? how did you set up your K gain values for your PID?
what algorithm are you using to get Euler Angles ? what IMU are you using? what de noise filters are you applying ? what fusion algorithm are you using?

I'm quite sure program is the main issue.

Regards
A
 

Hi,
I'm also investigating possibility that I have error somewhere in my FC code but I not sure where. To be sure I have uploaded MultiWii firmware onto my Arduino Uno board and plan to test it outside again in following days. If it works ok with known FC firmware such is MultiWii than I will known that problem is in software otherwise it is hardware issue.

About my FC code. My main loop is running at 500-600 times per second (Hz). PID is also calculated at this frequency. In test that is in video I have used only P gain, no I and D component. I have tried to find out ideal values for PID by using improvised home stand (with strings) but wasn't successful in finding the right values because of wobble problem.
To get angles from IMU sensor I'm using complementary filter algorithm. In earlier versions of my FC code I used Madgwick algorithm but recently switched to complementary filter because of speed and similar results. For IMU I'm using GY-87 (10DOF sensor, combination of gyro/acc MPU-6050, magnetometer HMC5883L and barometer BMP180). I'm applying LPF (low pass filter) on gyro/acc reading, by setting up sensor and because of this filter I get max sampling rate of 200 Hz. If you like I could upload my FC code on GitHub or somewhere.
 

linkages

New Member
hi

even if you upload another FC firmware won't work since , firmware is calibrated on dynamic model... and need to be concurrent with the physical object you are dealing with.

other suggestions:
1) i strongly encourage to go back to Madgwick since he works with quaternions and avoid some Euler issues
from quaternions you can obtain Euler easily in a post process.
Madgwick ( AHRS version ... the one with MAG) is, indeed, more stable and less drifting.
2) your Quad will *NEVER* fly with P only ( no matter what you have read and where )
3) what LOW PASS are you using ? low pass filter doesn't decrease total frequency update.... is not too heavy complexity. total frequency is usually maintained and data output is "averaged" for better total performance
4) I would personally use a moving average filter for ACC , gyro can be averaged via software... check 6050 manual for configuration REGs
5) dont *EVER* use DMP in 6050 for quad ... is too slow updating
6) its very IMPORTANT to FILTER D component with a low pass ( check transfer functions ) inside the PID calculation algorithm or D will screw all the rest since is highly unstable
7) try to reach at leas 400Hz total refresh time .. read IMU > obtain angles > update PID > PWM > motors
8) check with UNO forums if is possible to increase MOTOR PWM refresh time... usually 50Hz, some ESC can go much more higher.
9) write another program to control and set up you Gains in PID you need a lot of testing before going out in the field.
Once you find the right settings your Quad should be stable, ( not perfectly on the position ) but good enough to fly.

Sorry i have not too much time to read your code...but if you got some issues you can contact me here.

Regards
 

Hi and thank you for so many great suggestions.

1) I agree, Madgwick (ARHS with MAG) algorithm is far superior in object orientation tracking then plain complementary filter. I already have working implementation of it in my code and will easily switch back to using it.
2) Ok, so I will try to find out best PD, PI or PID values for my quad. My test stand with strings wasn't good for testing, how are you testing your quads, what kind of stand are you using to find PID values? My quad starts to wobble back and forth when I give it more then 30% throttle, I think that this is due to vibrations coming from motors, I have measured those vibration with app and attached links to images in my original post, are they in normal range?
3) I'm using only low pass filter on MPU-6050 to filter some of vibrations. Should I use this filtering, documentation says that this lowers sampling frequency of MPU-6050? What kind of low pass filter do you propose I use?
4) I tried using moving average on final Euler angles (yaw, pitch, roll), is it better to do average on ACC only?
5) I read sensor registers directly, have give up from using DMP because of lot issues with it.
6) How should I filter D? Maybe this is problem with my code, could you explain this a little better?
7) My loop runs at 500-600Hz, read input from controller > read IMU > obtain angles > update PID > PWM > motors. This should be ok.
8) I have found out how to increase MOTOR PWM frequency to 400Hz using Arduino Uno and I use this in my code. Some Arduino Uno pins work at this frequency so I use them directly. In my earlier version of FC code I used Servo lib for Aruino which works at 50Hz.
9) Already have controller commands to dynamically change PID settings of quad without reprogramming :)
 

Hi everyone,
I have finally make my quadcopter fly after so many trials :)
I changed spinning direction of all motors now they spin cw-ccw-cw-ccw and configured MultiWii (FC) to be in angle mode. This combo made my quadcopter completely stable to fly.
I have taken a small video to show you results. While flying I had a problem maintaining quadcopter altitude so in next trial I plan to activate altitude hold mode. It's difficult to constantly adjust throttle manually to accomplish this.
Next thing I plan is to make my quadcopter flyable with my own FC code.

 

jackyoung

New Member
Hello PegasusSky,

You have to know how to calculate the lifting ability and thrust of quadcopter,As might be expected, the response to the question was very mixed.some ways are very complex.
quadcopter weight calculator formula, IF A= Motor Thrust ,B= Num of Motors, C= the weight of the craft itself, D= Hover Throttle % .
So,Payload Capacity = ( A * B *D) – C.
If you have a diy quadcopter plans , the best way is reference best brand name quadcopter parameters (battery, moter ,esc ,frame weight etc.) such as DJI, Yuneec, Ghost, Wingsland, Walkera, XIRO, etc Good luck for you.
 

Hi everyone,
I have finally make my quadcopter fly after so many trials :)
I changed spinning direction of all motors now they spin cw-ccw-cw-ccw and configured MultiWii (FC) to be in angle mode. This combo made my quadcopter completely stable to fly.
I have taken a small video to show you results. While flying I had a problem maintaining quadcopter altitude so in next trial I plan to activate altitude hold mode. It's difficult to constantly adjust throttle manually to accomplish this.
Next thing I plan is to make my quadcopter flyable with my own FC code.


Throttle control takes time and practice, some of it is fine motor skills that you may not have used for awhile or ever and some of it just getting use to how it flies. I seen several new pilots fly my beater drone like a pogo stick, just takes time.

Otherwise, make sure you have not limited your throttle travel range, too short of a throttle range you could lose some of the smoothness to your throttle. I am program escs in the 1020 to 2000 range and set my remote accordingly
 

Top