Welcome To DroneVibes

DroneVibes is a COMMUNITY of drones enthusiasts. We are experts at drones for all professional and consumer applications. We welcome you to register and join the conversation.

First DIY Quadcopter wont fly

Discussion in 'Beginners Drone Forum' started by PegasusSky, Sep 7, 2016.

  1. PegasusSky

    PegasusSky Member

    5
    0
    1
    Sep 6, 2016
    Zagreb
    Posted by PegasusSky, Sep 7, 2016 #1
    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. :)

    [​IMG]
    [​IMG]
     
  2. steven swanciger

    steven swanciger New Member

    2
    0
    1
    Jul 17, 2016
    manville n.j.
    Posted by steven swanciger, Sep 12, 2016 #2
    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.
     
  3. PegasusSky

    PegasusSky Member

    5
    0
    1
    Sep 6, 2016
    Zagreb
    Posted by PegasusSky, Sep 13, 2016 #3
    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
     
  4. linkages

    linkages New Member

    2
    0
    1
    Sep 16, 2016
    italy
    Posted by linkages, Sep 16, 2016 #4
    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
     
  5. PegasusSky

    PegasusSky Member

    5
    0
    1
    Sep 6, 2016
    Zagreb
    Posted by PegasusSky, Sep 16, 2016 #5
    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.
     
  6. linkages

    linkages New Member

    2
    0
    1
    Sep 16, 2016
    italy
    Posted by linkages, Sep 17, 2016 #6
    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
     
  7. PegasusSky

    PegasusSky Member

    5
    0
    1
    Sep 6, 2016
    Zagreb
    Posted by PegasusSky, Sep 17, 2016 #7
    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 :)
     
  8. PegasusSky

    PegasusSky Member

    5
    0
    1
    Sep 6, 2016
    Zagreb
    Posted by PegasusSky, Sep 24, 2016 #8
    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.

     
  9. jackyoung

    jackyoung New Member

    1
    0
    1
    Oct 22, 2016
    USA
    Posted by jackyoung, Oct 22, 2016 #9
    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.
     
  10. moonpie57108

    moonpie57108 Member

    136
    14
    1
    May 21, 2016
    South Dakota
    Posted by moonpie57108, Oct 23, 2016 #10
    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
     
Loading...

Share This Page

Loading...