Need some help

Discussion in 'Misc. Quadcopter & Multirotor discussions' started by st.johnr, Feb 28, 2015.

  1. st.johnr

    st.johnr New Member

    I have been working on my quad for about two months now. It utilizes a MPU6050 accelerometer and gyro, hobby king ECS , motors, and frame. I am using a 3cell lipoly batter with a China RC controller (4 channel). I have recently moved the acell/gyro chip onto a peice of soft wood ontop of some harder rubber to cut down on vibrations. I am using an arduino uno with custom code to control the quadcopter. My code is simple right now and gets the input from the MPu6050 chip and uses the arduino PID library. Then it adds the new output/offset to the throttle coming in from the RC controller and sends it straight to the motors (one side +offset and the opposite -offset). I am using interrupts to get the pulses from the RC controller which makes it a lot faster that PulseIn function as I was hoping for more responsiveness. I think my issue is vibration of the accel/gyro but i'm not too sure. Here is a video of me trying to tune it, in the video I increased and decreased the P value of the PID controller by 0.01. It seems to either not have enough to level itself out and sits on one side, or goes crazy and just overshoots really hard and gets into a loop of going to either side.

    I am hoping someone has seen something like this before!

    Video:
    http://tinypic.com/r/2lwrbsl/8

    Here is apart of my debugging logs if these help at all:
    (Gap from 0 Degrees/horizontal) (Roll Angle) (Throttle Input)
    Code:
    gap: -62.51    62.51    1292
    gap: -18.10    18.10    1292
    gap: -25.75    25.75    1296
    gap: 6.35    -6.35    1296
    gap: -8.47    8.47    1296
    gap: -4.34    4.34    1296
    gap: -142.55    142.55    1296
    gap: -18.03    18.03    1296
    gap: -47.51    47.51    1296
    gap: -125.54    125.54    1296
    gap: -4.81    4.81    1296
    gap: 3.87    -3.87    1292
    gap: -37.99    37.99    1292
    gap: -1.71    1.71    1292
    gap: -99.73    99.73    1292
    gap: -31.15    31.15    1292
    gap: -18.48    18.48    1292
    gap: -118.11    118.11    1292
    gap: 0.09    -0.09    1292
    gap: -136.26    136.26    1296
    gap: -14.60    14.60    1296
    gap: -38.50    38.50    1296
    gap: -16.70    16.70    1296
    gap: -26.61    26.61    1296
    gap: -134.26    134.26    1296
    gap: -6.10    6.10    1296
    gap: 3.15    -3.15    1296
    gap: -20.22    20.22    1288
    gap: -10.46    10.46    1288
    gap: -158.48    158.48    1288
    gap: -19.24    19.24    1288
    gap: -73.74    73.74    1288
    gap: -42.27    42.27    1288
    gap: -2.67    2.67    1288
    gap: -174.94    174.94    1288
    gap: -6.30    6.30    1288
    gap: -140.12    140.12    1292
    gap: -43.78    43.78    1292
    gap: -15.56    15.56    1292
    gap: -100.67    100.67    1292
    gap: -5.82    5.82    1292
    gap: 165.22    -165.22    1292
    gap: -39.52    39.52    1292
    gap: -18.87    18.87    1292
    gap: -154.75    154.75    1296
    gap: -15.23    15.23    1296
    gap: -106.98    106.98    1296
    gap: -20.80    20.80    1296
    gap: -0.54    0.54    1296
    gap: -166.24    166.24    1296
    gap: -4.88    4.88    1296
    gap: -23.17    23.17    1296
    gap: -29.55    29.55    1292
    gap: -31.31    31.31    1292
    gap: -53.38    53.38    1292
    gap: -21.31    21.31    1292
    gap: -171.49    171.49    1292
    gap: -7.08    7.08    1292
    gap: -42.18    42.18    1292
    gap: -153.39    153.39    1292
    gap: -10.07    10.07    1292
    gap: -130.52    130.52    1292
    gap: -2.20    2.20    1292
    gap: -5.91    5.91    1292
    gap: -167.78    167.78    1292
    gap: -10.70    10.70    1292
    gap: -26.92    26.92    1292
    gap: -122.75    122.75    1292
    gap: -87.76    87.76    1296
    gap: -5.26    5.26    1296
    gap: -22.44    22.44    1296
    gap: -0.13    0.13    1296
    gap: -79.66    79.66    1296
    gap: -18.76    18.76    1296
    gap: -148.68    148.68    1296
    gap: -10.78    10.78    1296
    gap: -109.93    109.93    1292
    gap: -15.57    15.57    1292
    gap: -0.15    0.15    1292
    gap: -170.35    170.35    1292
    gap: -8.23    8.23    1292
    gap: -43.65    43.65    1292
    gap: -52.47    52.47    1292
    gap: -32.21    32.21    1292
    gap: -29.40    29.40    1292
    gap: -23.65    23.65    1292
    gap: -110.98    110.98    1292
    gap: -11.42    11.42    1292
    gap: -51.24    51.24    1292
    gap: -46.62    46.62    1292
    gap: -10.58    10.58    1292
    gap: -107.65    107.65    1292
    gap: -4.53    4.53    1292
    gap: -7.77    7.77    1292
    gap: -117.81    117.81    1292
    gap: -16.92    16.92    1292
    gap: -23.48    23.48    1292
    gap: -119.53    119.53    1292
    gap: -86.10    86.10    1292
    gap: -3.23    3.23    1292
    gap: -26.03    26.03    1292
    gap: -8.28    8.28    1292
    gap: -29.01    29.01    1292
    gap: -54.68    54.68    1292
    gap: -135.00    135.00    1292
    gap: -9.81    9.81    1292
    gap: -98.72    98.72    1292
    gap: -1.60    1.60    1292
    gap: -3.21    3.21    1292
    gap: -157.48    157.48    1292
    gap: -12.28    12.28    1296
    gap: -45.60    45.60    1296
    gap: -56.98    56.98    1296
    gap: -34.81    34.81    1296
    gap: -21.46    21.46    1296
    gap: -28.64    28.64    1296
    gap: -2.49    2.49    1296
    gap: -10.66    10.66    1296
    gap: -65.86    65.86    1300
    gap: -19.94    19.94    1300
    gap: -31.24    31.24    1300
    gap: -52.79    52.79    1300
    gap: -1.28    1.28    1300
    gap: -10.30    10.30    1300
    gap: -117.41    117.41    1300
    gap: -9.01    9.01    1300
    gap: -72.79    72.79    1292
    gap: -124.49    124.49    1292
    gap: -13.58    13.58    1292
    gap: -77.20    77.20    1292
    gap: -4.07    4.07    1292
    gap: -1.42    1.42    1292
    gap: -41.33    41.33    1292
    gap: -27.49    27.49    1292
    gap: -21.18    21.18    1296
    gap: -110.72    110.72    1296
    gap: -82.47    82.47    1296
    gap: -5.14    5.14    1296
    gap: -35.67    35.67    1296
    gap: -5.07    5.07    1296
    gap: -22.07    22.07    1296
    gap: -65.71    65.71    1296
    gap: -111.02    111.02    1296
    gap: -10.88    10.88    1292
    
    as you can see the roll jumps around alot, is this just from vibration?
     
  2. webman

    webman Administrator Staff Member

    Well, you may get an answer from someone - but, I should mention.....that we are largely a beginners and RTF site:


    "
    What defines a Beginner?
    In general, someone who has been in the hobby for a less than a year or two! The other forums do a great job of answering very technical questions, but such things can intimidate newer users who need basic info.
    As an example, if you know what any of this is, you are not a beginner:
    :cool:
    "the 2.4G IC is a 'NRF24LE1' and it appears to have an amplifier IC marked 2206 which I think is a 'UP2206'....looking at the spec's of the amp, max input is -8dBm which means the NRF24LE1 is probably putting out either -12 or -18dbm and the amp is listed as 28dB gain means it should be putting out somewhere between 10 - 40mW

    #2
    Who and What is Droneflyers.com?
    See: https://www.droneflyers.com/about-2/

    Basically, this is a hobby site tailored toward Beginners in the field of multirotor hobby aircraft. There are a number of great sites for more advanced hobbyists including the following:
    RCGroups Multirotor forums - http://www.rcgroups.com/aircraft-electric-multirotors-790/
    DIYdrones forums - http://diydrones.com/forum
    HobbyKing forums and comments under each product: http://www.hobbyking.com/hobbyking/forum/
    Lots of others too!
     
  3. IceFyre13th

    IceFyre13th Guest

  4. st.johnr

    st.johnr New Member

    Thanks for the information and link. I'll check it out and see if it fits my project!
     

Share This Page