Having issues on anything other than MANUAL

I have installed everything for my Ardupilot setup and am
having issues now using code 2.5.04. Therefore, I thought that I possibly had too much going on at once to test properly so I took out all but basic things for the Ardupilot. So I tried to fly my e* again and only had the Ardupilot, V2 shield, XYZ sensors, em406, XBee 900. When in manual everything is ok and has no issues. Once I turn on AUTO, FLY_BY_WIRE or STABLIZE the servos start glitching. By glitching I mean everything just goes haywire turning left right up down basically out of control. So I have now pulled the stuff out of the plane to try to do more testing with the equipment. The best I can think of is there maybe is some kind of RF interference going on somewhere.

 


On the board I have the black wires for the servo cables facing the outside on both connections to the board and have triple checked all other things I can in the wiki and still every time the servos are glitching. I also just tried briefly with the 2.6 code and still having the problem. My ESC did not come with a torrid on there could this be what is adding the issues? Also the other thing I have noticed is that once the ardu board is on anything other than manual the servos do not seem to have as much throw in them. I have tried to do the airframe test as I have seen that it has you test the radio and
servos for limits but I never have it ask me to move my sticks it just boots quickly and starts through the test. The last thing I notice is that occasionally after the ardu has been running for little bit the program I guess you could say hiccups. The data stream pauses come in even if using xbee’s or having the ftdi directly plugged in. It is not consistent and happens in all modes.


 http://diydrones.com/forum/topics/looking-for-input-on-my-layout 


This link will show you the layout I used on my plane, it was a post I did before final assembly. If there are other pictures needed or you need to see any files please let me know and I will happily post them. Sorry for the long post just wanted to give as much info as I can and thanks for your help and time.


You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Hi, 

    My System Specs:

    • Hardware:        Ardu Pilot Mega
    • IMU/Stabiliser: Oil Pan Shield
    • APM :             1.064 version
    • Airframe:          Piper Cub , Electric R/C Aircraft, (Flies real smooth)
    • Remote:          Airtronics SD 10 G
    • Mode Switch:   Ratchet Knob Control for Mode Shifts

    I have the same problem. When I connect it to my Netbook, It works fine in all modes with my Airtronics SD10G remote. But it does not work when I take off my USB connection to my Netbook(After "Disconnecting" from the APM Software). It does not even get a GPS lock with out my USB connection. I think it could be the following.

    1. Power Supply: I use a 4 X AA battery pack to power my Receiver and that is the source to the Ardupilot Mega Unit
    2. RF interference: Not very likely(But the glitches I have are enough to take my Aircraft off)
    3. Code Bug: I dont think so, but any info are welcome.

    All/Any Suggestions welcome 

    :) Cheers,

    George

  • Is there a way to test just the shield and just the board separately?
  • Here are the results from all the tests I can run ( ran the tests with throttle at all the way down and did not touch any of the sticks, only flipped the switch where you see in results). I tried my second RX of the same make and model and same results. I also turned off anything broadcasting a 2.4 signal and no improvement. I also live in area where there are NO other signals like that bleeding into my area. My closest neighbor is 6 miles away and I know for sure that there are no other signals coming in the 2.4 range anywhere on my property from doing other projects and testing progs for school.

    Results from Airframe test.
    ch3_timer_trim 13
    ch3_timer_trim 13
    ch3_timer_trim 13
    Radio IN: R:151Radio IN: R:1520 E:1514 T:1101 Analog IN: 0:518, 1: 517, 2: 505 Sensors: ir_max:40 roll:-14 pitch:-1 PWM OUT: R:1520 E:1514 T:1096
    ch3_timer_trim 11
    ch3_timer_trim 11
    Init Ardupilot Airframe Tester 2.5.0
    GPS: EM406
    Startup: Ground
    ch3_timer_trim 10
    Radio IN: R:1519 E:1513 T:1086 Analog IN: 0:518, 1: 517, 2: 507 Sensors: ir_max:40 roll:-14 pitch:-1 PWM OUT: R:1500 E:1500 T:1160

    #define CH1_MIN 1000
    #define CH1_MAX 2000
    #define CH2_MIN 1000
    #define CH2_MAX 2000
    #define CH3_TRIM 1086
    #define FAILSAFE_PWM 1036
    ch1_trim 1519
    ch2_trim 1513

    Turning On Stabilization
    Throttle input is enabled
    Battery Voltage input is disabled
    Throttle output is enabled
    ##0| MANUAL

    Ready to FLY.
    Radio IN: R:1519 E:1513 T:1086 Analog IN: 0:510, 1: 517, 2: 504 Sensors: ir_max:40 roll:-5 pitch:7 PWM OUT: R:1500 E:1500 T:1160
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    Radio IN: R:1519 E:1514 T:1086 Analog IN: 0:509, 1: 515, 2: 504 Sensors: ir_max:40 roll:-2 pitch:6 PWM OUT: R:1519 E:1514 T:1080
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    Radio IN: R:1519 E:1515 T:1086 Analog IN: 0:508, 1: 514, 2: 504 Sensors: ir_max:40 roll:0 pitch:6 PWM OUT: R:1519 E:1514 T:1080
    ch3_timer_trim 10
    ##2| FLY BY WIRE
    ch3_timer_trim 10
    Radio IN: R:1519 E:1514 T:1090 Analog IN: 0:506, 1: 513, 2: 503 Sensors: ir_max:40 roll:3 pitch:7 PWM OUT: R:1546 E:1468 T:1344
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    ##1| STABILIZE
    Radio IN: R:1519 E:1514 T:1090 Analog IN: 0:509, 1: 514, 2: 503 Sensors: ir_max:40 roll:-1 pitch:5 PWM OUT: R:1546 E:1468 T:1432
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    ch3_timer_trim 10
    Radio IN: R:1519 E:1515 T:1090 Analog IN: 0:510, 1: 519, 2: 511 Sensors: ir_max:40 roll:-7 pitch:10 PWM OUT: R:1546 E:1469 T:1080
    ch3_timer_trim 10


    Radio Test:
    090
    MS: 20 ch1:1520 ch2:1515 ch3:1090
    MS: 20 ch1:1520 ch2:1516 ch3:1090
    MS: 20 ch1:1520 ch2:1516 ch3:1090
    MS: 20 ch1:1520 ch2:1515 ch3:1090
    MS: 20 ch1:1520 ch2:1515 ch3:1090
    MS:MS: 2240 ch1:1519 ch2:1515 ch3:1087
    MS: 20 ch1:1519 ch2:1514 ch3:1087
    MS: 20 ch1:1519 ch2:1514 ch3:1087
    MS: 20 ch1:1519 ch2:1514 ch3:1087
    MS: 20 ch1:1519 ch2:1514 ch3:1087
    MS: 20 ch1:1519 ch2:1514 ch3:1087
    MS: 20 ch1:1519 ch2:1514 ch3:1087
    MS: 20 ch1:1519 ch2:1514 ch3:1087
    MS: 20 ch1:1519 ch2:1514 ch3:1087


    Switch Test:
    Init Ardupilot Control Switch Tester 2.5.0
    ##0| MANUAL
    ##2| FLY BY WIRE
    ##1| STABILIZE
    ##2| FLY BY WIRE
    ##0| MANUAL
    ##2| FLY BY WIRE
    ##1| STABILIZE
    ##2| FLY BY WIRE
    ##0| MANUAL


    Gps tests give expected results. Full Lock and correct long lat are displayed

    Waypoint Writer:
    Waypoint writer
    1: 37716232, -122381200, 100
    2: 37717764, -122379856, 75
    3: 37717376, -122383128, 50
    4: 37718860, -122381800, 25
    5: 37716232, -122381200, 50
    6: 37717764, -122379856, 75
    7: 37717376, -122383128, 100
    8: 37718860, -122381800, 75
    9: 37716232, -122381200, 50
    10: 37717764, -122379856, 25
    11: 37717376, -122383128, 50
    12: 37718860, -122381800, 75
    13: 37716232, -122381200, 100
    options:0
    Alt to hold:76
    waypoint # 1 lat: 377162320 long: -1223812000 alt: 10000
    waypoint # 2 lat: 377177640 long: -1223798560 alt: 7500
    waypoint # 3 lat: 377173760 long: -1223831280 alt: 5000
    waypoint # 4 lat: 377188600 long: -1223818000 alt: 2500
    waypoint # 5 lat: 377162320 long: -1223812000 alt: 5000
    waypoint # 6 lat: 377177640 long: -1223798560 alt: 7500
    waypoint # 7 lat: 377173760 long: -1223831280 alt: 10000
    waypoint # 8 lat: 377188600 long: -1223818000 alt: 7500
    waypoint # 9 lat: 377162320 long: -1223812000 alt: 5000
    waypoint # 10 lat: 377177640 long: -1223798560 alt: 2500
    waypoint # 11 lat: 377173760 long: -1223831280 alt: 5000
    waypoint # 12 lat: 377188600 long: -1223818000 alt: 7500
    waypoint # 13 lat: 377162320 long: -1223812000 alt: 10000
    total # of points:13


    Analog Sensor Test, same results as before:
    A0: 506 A1: 516 A2: 505 A3: 220 A4: 226 A5: 0
    A0: 505 A1: 514 A2: 504 A3: 220 A4: 222 A5: 0
    A0: 505 A1: 515 A2: 504 A3: 221 A4: 223 A5: 0
    A0: 505 A1: 514 A2: 504 A3: 221 A4: 222 A5: 0
    A0: 506 A1: 516 A2: 505 A3: 221 A4: 223 A5: 0
    A0: 505 A1: 514 A2: 504 A3: 221 A4: 222 A5: 0
    A0: 505 A1: 514 A2: 504 A3: 221 A4: 223 A5: 0
    A0: 505 A1: 516 A2: 504 A3: 221 A4: 222 A5: 0
    A0: 505 A1: 513 A2: 504 A3: 221 A4: 222 A5: 0
    A0: 505 A1: 516 A2: 504 A3: 221 A4: 223 A5: 0
    A0: 505 A1: 513 A2: 504 A3: 221 A4: 221 A5: 0
    A0: 505 A1: 516 A2: 504 A3: 221 A4: 222 A5: 0
    A0: 506 A1: 515 A2: 504 A3: 221 A4: 222 A5: 0

    Throttle test I havent run as I have not adjusted the code to make it compile properly yet.
    My scheerer LRS uhf system should be here next week so I can attach that to my radio and test it with that. Best I can do for a different radio and RX
  • Chris, here is my .h for ardu 2.5.4

    [code]
    //Hardware Configuration
    #define SHIELD_VERSION 1 // Old (red) shield versions is 0, the new (blue) shield version is 1, -1 = no shield
    #define AIRSPEED_SENSOR 1 // 1 if an airspeed sensor is attached and pitot tube connected. 0 if not (throttle will be restricted to altitude error)
    #define GROUNDSTATION 0 // 0 = Ardupilot GS,

    // Flight Modes
    // these Flight modes can be changed either here or directly in events.pde
    // options are MANUAL, STABILIZE, FLY_BY_WIRE, AUTO, RTL, LOITER
    #define POSITION_1 MANUAL
    #define POSITION_2 AUTO
    #define POSITION_3 FLY_BY_WIRE
    // Try and run FLY_BY_WIRE to verify you have good gains set up correctly
    // before you try Autopilot and wreck your plane. I'll sleep better that way...


    // Airframe settings
    //1-1
    #define GPS_PROTOCOL 1 // 0 = NMEA, 1=SIRF, 2=uBlox, 3 = IMU, 5 = Simulated GPS mode (Debug)
    //1-2
    #define REVERSE_ROLL 1 //To reverse servo roll, PUT -1 to invert it!!!
    //1-3
    #define REVERSE_PITCH 1 //To reverse servo pitch, PUT -1 to invert it!!!
    // NOTE - IF USING ELEVONS 1-2 AND 1-3 SHOULD BE 1
    //1-4
    #define REVERSE_ELEVONS 1 //Use 1 or -1 if you need to reverse roll direction
    //1-5
    #define REVERSE_CH1_ELEVON 1 //To reverse channel 1 elevon servo, PUT -1 to reverse it!!!
    //1-6
    #define REVERSE_CH2_ELEVON 1 //To reverse channel 2 elevon servo, PUT -1 to reverse it!!!
    //1-7
    #define REVERSE_THROTTLE 0 // 0 = Normal mode. 1 = Reverse mode - Try and reverse your radio first!
    //1-8
    #define INPUT_VOLTAGE 5090.0 // (Millivolts) voltage your power regulator is feeding your ArduPilot to have an accurate pressure and battery level readings. (you need a multimeter to measure and set this of course)
    //1-9
    #define BATTERY_EVENT 0 // (boolean) 0 = don't read battery, 1 = read battery voltage (only if you have it wired up!)
    //1-10
    #define MIXING_MODE 0 //Servo mixing mode 0 = Normal, 1 = V-tail (v tail not tested yet).


    // IR sensors
    //2-1
    #define ENABLE_Z_SENSOR 1 // 0 = no Z sensor, 1 = use Z sensor (no Z requires field calibration with each flight)
    //2-2
    #define XY_SENSOR_LOCATION 0 //XY Thermopiles Sensor placement
    //Mounted right side up: 0 = cable in front, 1 = cable behind
    //Mounted upside down: 2 = cable in front, 3 = cable behind
    //2-3
    #define PITCH_TRIM 0 //(Degrees +- 5) allows you to offset bad IR placement
    //2-4
    #define ROLL_TRIM 0 // (Degrees +- 5) allows you to offset bad IR placement


    // RADIO
    //3-1
    #define SET_RADIO_LIMITS 0 // 0 = no, 1 = set the limits of the Channels with the radio at launch each time
    //3-2
    #define RADIO_TYPE 0 // 0 = sequential PWM pulses(Fasst, Spektrums), 1 = simultaneous PWM pulses (Corona RP8D1)
    //3-3
    #define CH1_MIN 1000 // (Microseconds) Range of Ailerons/ Rudder
    //3-4
    #define CH1_MAX 2000 // (Microseconds)
    //3-5
    #define CH2_MIN 1000 // (Microseconds) Range of Elevator
    //3-6
    #define CH2_MAX 2000 // (Microseconds)
    //3-7
    #define CH3_TRIM 1000 // (Microseconds) Trims are normally set automatically in setup.
    //3-8
    #define THROTTLE_IN 1 // (boolean) Disables throttle when set to 0
    //3-9
    #define THROTTLE_OUT 1 // 1 = throttle, 0 = no throttle at all! (good for saving fingers on the bench.)


    //NAVIGATION: HEADING
    //Note: Some Gains are now variables
    #define HEAD_P .8 //Heading error proportional.
    //4-1
    #define HEAD_I 0 //heading error integrator. Do not add too much or you will overshoot.

    #define HEAD_D 0 //heading error derivitive

    //4-2
    #define ROLL_MAX 4000 //(Degrees *100) The maximum output in degrees to control the roll setpoint
    //4-3
    #define HEAD_I_MAX 500 //(Degrees *100) The maximum output in degrees to control the roll setpoint
    //4-4
    #define XTRACK_GAIN .3 // amount to compensate for crosstrack - use debug mode to find correct value
    //4-5
    #define LOITER_RADIUS 45 // radius in meters of a Loiter
    //4-6
    #define REMEMBER_LAST_WAYPOINT_MODE 1 //If set 1 = will remember the last waypoint even if you restart the autopilot. 0 = Will start from zero everytime you restart the system.


    //NAVIGATION: ALTITUDE
    //5-1
    #define PITCH_P 1.5 //Altitude error proportional, pitch setpoint
    //5-1
    #define PITCH_I 0 //Altitude error proportional, pitch setpoint
    //5-2
    #define ALTITUDE_PITCH_MAX 1000 // most the plane will pitch up in degrees to raise altitude
    //5-3
    #define ALTITUDE_PITCH_MIN -1500 // (Degrees *100) most the plane will pitch down in degrees to lower altitude


    //NAVIGATION: SPEED GAINS
    //6-1
    #define ALTITUDE_THROTTLE_P 1.33
    //6-2
    #define ALTITUDE_AIRSPEED_MAX 15 //(0-125) Maximum extra speed for gaining altitude
    //6-3
    #define ALTITUDE_AIRSPEED_MIN -25 //(0-125) Maximum reduced speed for loosing altitude
    //6-4
    #define AIRSPEED_TURN_P 1 // (.25 - 1) The amount we scale down our roll when going slow; 1 = no effect
    //6-5
    #define AIRSPEED_MAX_TURN_SPEED 25 // Turn full-on above this airspeed, Hint: set less than or equal to throttle_cruise
    //6-6
    #define AIRSPEED_MIN_TURN_SPEED 12 // Used to limit the effect

    #define CRUISE_AIRSPEED 13 // If we have airspeed sensor pitch is used to maintain desired airspeed and throttle is used for climb/descent
    // NOTE - Airspeed is stored and used in the program as an integer pressure value
    // Use the formula: pressure = 0.1254 * speed * speed
    // where speed is the airspeed in meters per second.
    // For example if you want cruising airspeed to be 10 meters per second use a value of 13

    //ATTITUDE: Rudder gains / Aileron gains
    //7-1
    #define RUDDER_P .55 // START WITH THIS VALUE TO TUNE - overall proportional term determines how much rudder you use to turn.
    //7-2
    #define RUDDER_I 0.0 // Roll PID integrator
    //7-3
    #define RUDDER_MAX 2500 // (Degrees *100) Maximum output of Rudder


    //ATTITUDE: Elevator gains
    //8-1
    #define ELEVATOR_P .40 // Pitch Proportional- overall proportional term determines how much elevator you use to correct pitch
    //8-2
    #define ELEVATOR_I 0 // Pitch PID integrator
    //8-3
    #define PITCH_COMP .10 //<------Very important, Pitch compensation vs. Roll bank angle.


    //ATTITUDE: THROTTLE OUTPUT GAINS
    //9-1
    #define THROTTLE_ABSOLUTE 3 //Absolute
    //9-2
    #define THROTTLE_P .32 //Proportional
    //9-3
    #define THROTTLE_I .04 //Integrator
    //9-4
    #define THROTTLE_I_MAX 50 // (0-125) 50 = 40% Integrator limit.
    //9-5
    #define THROTTLE_CRUISE 30 // (0-125) 30 = 24% throttle, or (int)target airspeed for cruising
    //9-6
    #define THROTTLE_MAX 100 // (0-125) 60 = 48% maximum throttle


    /*****************/
    /*Debugging Stuff*/
    /*****************/
    /*9-1
    #define FAKE_BEARING 0 //If set to 1, will fake the bearing and will try to always head to the defined DESIRED_FAKE_BEARING
    //9-2
    #define DESIRED_FAKE_BEARING 0 //Will try to go NorthEast, you can change that to 0 = NORTH, 90 = EAST, 180 = SOUTH, 270 = WEST or whatever!
    //9-3
    #define FAKE_GPS_LOCK 0 //If is set to 1 will jump the GPS lock process to set home position. FOR TESTING ONLY!
    //9-4
    #define PRINT_WAYPOINTS 1 //If set to 1, at bootup will print all the waypoints set in the eeprom!
    //9-5
    #define TEST_THROTTLE 0 // If set 1 will test the throttle increasing the speed slowly.
    //9-6
    #define WALK_AROUND 1 //Must be "0" to test the GPS and heading against the servo and "1" for normal operation
    //9-7
    #define CALIBRATE_SERVOS 0// Use to move the servos center, left and right or center right and left. You must adjust using 3-1 and 3-2.
    //9-8
    #define TEST_SENSORS 0 // Set 1 for enable, overwrite the servos with the raw IR sensors data, to test orientation. This will overwrite everything.
    //10-1
    #define TURNRATE 85 // (degrees) how fast we turn per second in degrees at full bank
    //10-2
    #define CLIMBRATE_UP 1000 // (meters * 100) how fast we climb in simulator at 90°
    //10-3
    #define CLIMBRATE_DOWN 3000 // (meters * 100) how fast we climb in simulator at 90° */
    [/code]


    Here is the .h for 2.6
    [code]
    //HARDWARE CONFIGURATION
    //0-1
    #define SHIELD_VERSION 1 // Old (red) shield versions is 0, the new (blue) shield version is 1, -1 = no shield
    //0-2
    #define AIRSPEED_SENSOR 1 // (boolean) Do you have an airspeed sensor attached? 1= yes, 0 = no.
    //0-3
    #define GPS_PROTOCOL 1 // 0 = NMEA, 1=SIRF, 2=uBlox, 3 = ArduIMU, 5 = Simulated GPS mode (Debug)
    //0-4 Ground Control Station:
    #define GCS_PROTOCOL 0 // 0 = Ardupilot Text, 1 = special test, 2 = Ardupilot Binary(not implemented), 5 = Jason's GCS

    //0-5 and 0-6 are for use with Thermopile sensors
    //0-5
    #define ENABLE_Z_SENSOR 1 // 0 = no Z sensor, 1 = use Z sensor (no Z requires field calibration with each flight)
    //0-6
    #define XY_SENSOR_LOCATION 0 //XY Thermopiles Sensor placement
    //Mounted right side up: 0 = cable in front, 1 = cable behind
    //Mounted upside down: 2 = cable in front, 3 = cable behind

    //0-6
    #define BATTERY_EVENT 0 // (boolean) 0 = don't read battery, 1 = read battery voltage (only if you have it wired up!)
    //0-7
    #define INPUT_VOLTAGE 5200.0 // (Millivolts) voltage your power regulator is feeding your ArduPilot to have an accurate pressure and battery level readings. (you need a multimeter to measure and set this of course)


    // Flight Modes
    // these Flight modes can be changed either here or directly in events.pde
    // options are MANUAL, STABILIZE, FLY_BY_WIRE_A, FLY_BY_WIRE_B, AUTO, RTL, LOITER
    //0-8
    #define POSITION_1 MANUAL
    //0-9
    #define POSITION_2 STABILIZE
    //0-10
    #define POSITION_3 FLY_BY_WIRE_A
    // So why isn't AUTO here by default? Well, please try and run Stabilize first,
    // then FLY_BY_WIRE_A to verify you have good gains set up correctly
    // before you try Auto and wreck your plane. I'll sleep better that way...

    // FLY_BY_WIRE_A has manual throttle control, FLY_BY_WIRE_B = the throttle stick input controls desired airspeed.
    // Fly By Wire B = Fly By Wire A if you have AIRSPEED_SENSOR 0

    /***************************************/
    // AIRFRAME SETTINGS
    //1-1
    #define MIXING_MODE 0 //Servo mixing mode 0 = Normal, 1 = Elevons (or v tail)
    //1-2
    #define REVERSE_ROLL 1 //To reverse servo roll, PUT -1 to reverse it!!!
    //1-3
    #define REVERSE_PITCH 1 //To reverse servo pitch, PUT -1 to reverse it!!!

    // NOTE - IF USING ELEVONS 1-2 AND 1-3 SHOULD BE 1
    //1-4
    #define REVERSE_ELEVONS 1 //Use 1 or -1 if you need to reverse roll direction
    //1-5
    #define REVERSE_CH1_ELEVON -1 //To reverse channel 1 elevon servo, PUT -1 to reverse it!!!
    //1-6
    #define REVERSE_CH2_ELEVON 1 //To reverse channel 2 elevon servo, PUT -1 to reverse it!!!

    //1-7
    #define REVERSE_THROTTLE 0 // 0 = Normal mode. 1 = Reverse mode - Try and reverse your radio first, most ESC use low values for low throttle.

    //1-8
    #define PITCH_TRIM 0 //(Degrees +- 5) allows you to offset bad IR or IMU placement
    //1-9
    #define ROLL_TRIM 0 // (Degrees +- 5) allows you to offset bad IR or IMU placement


    /***************************************/
    // AIRSPEEDS
    // NOTE - Airspeed is stored and used in the program as an integer pressure value
    // Use the formula: pressure = 0.1254 * speed * speed
    // where speed is the airspeed in meters per second.
    // For example if you want cruising airspeed to be 20 meters per second use a value of 50
    //2-1
    #define CRUISE_AIRSPEED 13 // If we have airspeed sensor pitch is used to maintain desired airspeed and throttle is used for climb/descent
    //2-2
    #define AIRSPEED_FBW_MIN 8 //Minimum airspeed for Fly By Wire mode B
    //2-3
    #define AIRSPEED_FBW_MAX 20 //Maximum airspeed for Fly By Wire mode B

    /***************************************/
    // THROTTLE
    // NOTE - The range for throttle values is 0 to 125
    //2-4
    #define THROTTLE_CRUISE 55 // Default throttle value - Used for central value. Failsafe value
    // NOTE - For proper tuning the THROTTLE_CRUISE value should be the correct value to produce CRUISE_AIRSPEED in straight and level flight with your airframe
    //2-5
    #define THROTTLE_MAX 65 // (0-125) 70 = 56% maximum throttle
    //2-6
    #define THROTTLE_MIN 45 // (0-125)
    //2-7
    #define THROTTLE_IN 1 // (boolean) Disables throttle input when set to 0
    //2-8
    #define THROTTLE_OUT 1 // 1 = throttle, 0 = no throttle output at all! (good for saving fingers on the bench.)


    /***************************************/
    // RADIO
    //3-1
    #define SET_RADIO_LIMITS 0 // 0 = no, 1 = set the limits of the Channels with the radio at launch each time
    //3-2
    //3-3
    #define RADIO_TYPE 0 // 0 = sequential PWM pulses, 1 = simultaneous PWM pulses
    //3-4
    #define CH1_MIN 1000 // (Microseconds) Range of Ailerons/ Rudder
    //3-5
    #define CH1_MAX 2000 // (Microseconds)
    //3-6
    #define CH2_MIN 1000 // (Microseconds) Range of Elevator
    //3-7
    #define CH2_MAX 2000 // (Microseconds)
    //3-8
    #define CH3_TRIM 1000 // (Microseconds) Trims are normally set automatically in setup.


    /***************************************/
    //NAVIGATION: PARAMETERS
    //Note: Some Gains are now variables
    //4-1
    #define HEAD_MAX 4500 // The maximum commanded bank angle (left and right) degrees*100
    //4-2
    #define PITCH_MAX 1000 // The maximum commanded pitch up angle degrees*100
    //4-3
    #define PITCH_MIN -1500 // The maximum commanded pitch down angle degrees*100
    //4-4
    #define XTRACK_GAIN 00 // amount to compensate for crosstrack (degrees/100 per meter)
    //4-5
    #define XTRACK_ENTRY_ANGLE 3000 // Max angle used to correct for track following degrees*100
    //4-5
    #define LOITER_RADIUS 40 // radius in meters of a Loiter
    //4-6
    #define REMEMBER_LAST_WAYPOINT_MODE 0 // If set 1 = will remember the last waypoint even if you restart the autopilot.
    // 0 = Will start from WP 1 (not 0) every time you switch into AUTO mode.
    //4-7
    #define WP_ALTITUDE_RADIUS 10 // (meters) accuracy needed to find our waypoint in meters
    //4-8
    #define ABSOLUTE_WAYPOINTS 1 // 0 = relative, 1 = absolute
    //4-9
    #define AP_STICK_MIXING 0 // 0 = no mix, 1 = mix. Mixing lets you "nudge" when in auto modes


    /***************************************/
    //ATTITUDE: ROLL GAINS
    //5-1 IMPORTANT!! Servo Gain values will be 100 times less than equivalent gains for ArduPilot 2.5
    #define SERVO_ROLL_P .006 // Primary value to tune - overall proportional term determines how much rudder/aileron you use to turn
    //5-2
    #define SERVO_ROLL_I .0 // roll PID integrator gain (value should generally be low)
    //5-3
    #define SERVO_ROLL_D 0.0 // roll PID derivative gain (for advanced users - should be zero for most airframes)
    //5-4
    #define SERVO_ROLL_INTEGRATOR_MAX 500 //Maximium integrator value in degrees * 100
    //5-5
    #define ROLL_SLEW_LIMIT 0 // Use to limit slew rate of roll servo. If zero then slew rate is not limited
    // Value is degree per second limit

    /***************************************/
    //ATTITUDE: PITCH GAINS
    //6-1 IMPORTANT!! Servo Gain values will be 100 times less than equivalent gains for ArduPilot 2.5
    #define SERVO_PITCH_P .006 // Pitch Proportional gain
    //6-2
    #define SERVO_PITCH_I .0 // Pitch integrator gain (value should generally be low)
    //6-3
    #define SERVO_PITCH_D 0.0 // Pitch derivative gain (for advanced users - should be zero for most airframes)
    //6-4
    #define SERVO_PITCH_INTEGRATOR_MAX 500 //Maximum integrator value in degrees * 100
    //6-5
    #define PITCH_COMP .10 //Pitch compensation vs. Roll bank angle.
    // NOTE!! The implementation of pitch compensation has been changed.
    // The optimal value for your airframe will likely differ between 2.5 and 2.6


    /***************************************/
    //NAV: ROLL GAINS
    //7-1
    #define NAV_ROLL_P .6 // Primary value to tune - overall proportional term determines how aggressively we bank to change heading
    //7-2
    #define NAV_ROLL_I .0 // roll PID integrator gain (value should generally be low)
    //7-3
    #define NAV_ROLL_D 0.0 // roll PID derivative gain (for advanced users - should be zero for most airframes)
    //7-4
    #define NAV_ROLL_INTEGRATOR_MAX 500 //Maximium integrator value in degrees * 100


    /***************************************/
    //NAV: PITCH GAINS
    //8-1
    #define NAV_PITCH_P .65 // Overall proportional term determines how aggressively we change pitch to maintain airspeed
    //8-2
    #define NAV_PITCH_I .0 // PID integrator gain (value should generally be low)
    //8-3
    #define NAV_PITCH_D 0.0 // PID derivative gain (for advanced users - should be zero for most airframes)
    //8-4
    #define NAV_PITCH_INTEGRATOR_MAX 500 //Maximium integrator value in degrees * 100


    /***************************************/
    //ENERGY HEIGHT: THROTTLE OUTPUT GAINS
    //9-1
    #define THROTTLE_P .32 //Proportional
    //9-2
    #define THROTTLE_I .04 //Integrator
    //9-3
    #define THROTTLE_D 0.0 //Derivative
    //9-4
    #define THROTTLE_INTEGRATOR_MAX 20 // (0-125) 70=50% Integrator limit.
    //9-5
    #define THROTTLE_SLEW_LIMIT 0 // Use to limit slew rate of throttle output. If zero then slew rate is not limited
    // Value is throttle value (0-125) per second limit


    /***************************************/
    //FLY BY WIRE AIRSPEED: THROTTLE OUTPUT GAINS
    //10-1
    #define THROTTLE_FBW_P .32 //Proportional
    //10-2
    #define THROTTLE_FBW_I .04 //Integrator
    //10-3
    #define THROTTLE_FBW_D 0.0 //Derivative
    //10-4
    #define THROTTLE_FBW_INTEGRATOR_MAX 20 // (0-125) 70=50% Integrator limit.

    /*****************/
    /*Advanced Stuff*/
    /*****************/

    // This section is for auto launch. This feature is not appropriate for all airframes.
    // If you are using ArduIMU the minimum recommended TAKE_OFF_PITCH is 30 degrees due to linear acceleration effects on the IMU
    // If your airframe cannot climb out at 30 degrees do not use this feature if using ArduIMU
    //11-1
    #define USE_AUTO_LAUNCH 0 // If set to 1 then in AUTO mode roll will be held to zero and pitch to TAKE_OFF_PITCH until TAKE_OFF_ALT is reached
    //11-2
    #define TAKE_OFF_ALT 50 // Meters. Altitude below which take-off controls apply
    //11-3
    #define TAKE_OFF_PITCH 33 // Pitch value to hold during take-off in degrees

    // This section is for setting up auto landings
    // You must have your airframe tuned well and plan your flight carefully to successfully execute auto landing
    //11-4
    #define SLOW_WAYPOINT 999 // When this becomes the current waypoint we will decrease cruise_airspeed to AIRSPEED_SLOW
    //11-5
    #define AIRSPEED_SLOW 10
    //11-6
    #define THROTTLE_SLOW 30 // This should be the throttle value that produces AIRSPEED_SLOW in straight and level flight
    //11-7
    #define THROTTLE_CUT_WAYPOINT 999 // When this becomes the current waypoint we will cut the throttle
    //Set the final waypoint well beyond the touchdown zone so that it is not reached, else you will enter RTL mode or loop waypoints

    /*****************/
    /*Debugging Stuff*/
    /*****************/
    //12-1
    #define TURNRATE 85 // (degrees) how fast we turn per second in degrees at full bank
    //12-2
    #define CLIMBRATE_UP 1000 // (meters * 100) how fast we climb in simulator at 90°
    //12-3
    #define CLIMBRATE_DOWN 3000 // (meters * 100) how fast we climb in simulator at 90°
    [/code]


    Morli- Not sure what you mean about the hot air gun. Also I have walked far away from the computer with the setup and as well it was in the air with same results nothing changes for that one.
    Also dont understand why if I got the exact radio that was recomended and the RX's that came with it that I would have radio issues. The servos tested were digital futaba's and hitec hs-81. I have no access to any other radio setup though.

    Hosplink I will try what you suggested but I have already checked for bad solder or connections and everything apears to be good to me.
  • I just now tried both versions again powering it with a RX battery and no ESC to see if it was the ESC causing my issue and I noticed no difference.
  • Here is the groundstation while running fly by wire using code 2.5.4

    Here are the servos for the same code and mode as above

    Here is the GS in manual mode -- servos act correctly here but the GS does not

    I will post the videos of the behavior from using code 2.6 in a few minutes trying to upload them now. Only reason I did not want to use youtube as I do not like uploading to video sites just a preference of mine.
  • Ok I uploaded a rar file of a few different videos showing different things. Each video is labeled as to what mode and Ardu version it's running. Each video and its labeling I hope is easy to figure out.

    When playing the videos showing Ardu V. 2.5.4

    You can see the video of the GS software in Manual mode here the servos do not move, only moving when the TX sticks are moved as they are suppose to so only posted to GS video as that shows what the software is seeing in Manual.
    There is also a video of the Servos and GS software in fly by wire mode showing what I mean by the glitching.


    When playing the videos showing Ardu V. 2.6
    For this version I showed what the ground station software is showing for manual which you can see does not hold steady BUT the servos act as they should full throw and everything. But from viewing the software on manual with this version of code it holds the closest to stable on the software.

    The video showing stabilize mode with 2.6 you can see how the servos are acting with everything sitting stable and nothing moving. There is also a corresponding video showing what the ground station software was displaying while the servos where twitching.

    I have not flown with this code and just tried it today in hopes it would fix a bug or something. but the glitch I am seeing in 2.5.4 seems to be here as well but I dont think its software I think its something in my hardware setup.


    When I had 2.5.4 up in the air and flipped on stabilize and AP my plane started acting pretty close to what you see the GS software showing. Now my understanding is stabilize and fly by wire are to basically just smooth things out and basically do what they say so I would assume sitting still they should not be trying to move as the servos are in manual mode. Or am I wrong in thinking this? Because it was acting the same in the air as it is on the ground. When it was in the air it would pitch side to side and up and down. Let me know what other info I can provide or anything else along those lines. Thanks for the help so far.

    ArduVids.rar

  • 3D Robotics
    That's very strange. Any chance you upload a video of your servos glitching? I've never seen that....
  • Admin
    switch off the xbee 900 for starters.
    next try with different ESC if you have a spare

    Keep the receiver as far as possible from AP board.
This reply was deleted.

Activity