Stumped

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, and then adds the new output/offset to the throttle coming in from the RC controller and sends it straight to the motors. I am using interrupts which make it a lot faster that PulseIn as I was hoping for more responsiveness. I think my issue is vibration of the accel/gyro or the gyro is updating too slowly...? Here is a video of me trying to tune it. I increased and decreased the PID by 0.01 and it either doesn't have enough or goes insane...

I'm sure you guys have seen this before and can help me out!

Thanks

Video (TinyPic)
 
Last edited:
Hi mate any gyro that you feel is being messed up by vibrations need to be mounted on gyro foam , this will suck up the vibs if its really bad, use foam then a small fin metal plate then more foam , this foam has a special vibration absorbing make up , works better than rubber
 
I'll see what I can find, do you have any suggestions on brand, ect.?

Do you think gyro vibration is causing my problem from the video?
 
In the video I am giving the quadcopter almost constant throttle and just changing the P value to attempt to get the quadcopter to level itself out. Getting the readings isn't my problem I am getting accurate readings but they might be noisy from vibration when I turn on the motors.
 
Hi you normally adjust in flight turn I gain to zero then turn up P till the quad wags fast then drop P till it stops then up the I till you get a slow wag then reduce till that stops
 
The thing is it won't come anywhere close to leveling its self out. Its on a test rig because it isn't even close to being ready to fly. There is no way to tune anything in the air because it wont get off of the ground.

Here is a log from my debugger:
(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

I'm guessing/hoping its just a vibration that is causing the gyro/accel to jump all over like that
 
Back
Top