APM Setup issues

Hey 
First up im very grateful for all the support documentation , without which i wouldnt have gotten this far , with my build.
Im having a few issues (probably just my stupidity ) with the APM setup process .
I got my APM board and Oilpan(2.2) about a month ago .I finished assembly and ran the blinking LED program , and also the servo dance program (which seems fine to me.)
The APM Beta Code is currently loaded on my board , last evening i took it outside to test the  GPS LED behavior .

This is the behavior i got :


  1. Fast flashing - cablibrating gyros.
  2. BC go solid for 2-3 seconds - pause.
  3. A and BC flash alternating - rotation flashing.
  4. ABC flash slowly - waiting for GPS lock.
  5. B Solid ,C Flashing (for about 2 minutes)
  6. Then B and C solid.
Ive Included a picture showing my APM running on the Receiver battery .I hadnt done the radio setup before this .
I then connected the APM via usb and ran a gps test , the test confirmed that the home coordinates were accurate.
im wondering why didnt the A LED glow solid.

This morning i proceeded to the radio setup :

This is how the RX is connected to the APM

THRO == IN2
AILE  == IN0
ELEV == IN1
RUDD == IN3
AUX1 == IN7  (even tried AUX2)


This is my show output:

Radio:
CH1: 900 | 1520
CH2: 1200 | 2100
CH3: 900 | 1916
CH4: 1096 | 1902
CH5: 1000 | 2000
CH6: 1000 | 2000
CH7: 1000 | 2000
CH8: 1000 | 2000



when i tried setting up the mode, the 'pos' value did not change when i flipped the 3 way switch. (APM detected the inputs on my Aile channel in order to scroll through the available modes , but i couldnt change the switch position.

Help.




IMG_0004.JPG

IMG_0008.JPG

IMG_0010.JPG

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

Join diydrones

Email me when people reply –

Replies

  • I tried running the HIL sim on my Mac (10.6.5) , seems like serproxy doesnt play very nice .I open up the serial monitor , and everything on the APM and Xplane is set for HIL(i know this because everything ran fine on a friend's Windows desktop using the comm utility ), then i run the serproxy which says its waiting for clients , i open Xplane (demo) , then execute the perl script ; then serproxy gives me this after making the aircrafts control surfaces twitch for a second:

    Serproxy - (C)1999 Stefano Busti, (C)2005 David A. Mellis - Waiting for clients
    Server thread launched
    server(1) - thread started
    server(1) - EOF from sio
    server(1) exiting


    Here is my config file for serproxy :

    # Config file for serproxy
    # See serproxy's README file for documentation

    # Transform newlines coming from the serial port into nils
    # true (e.g. if using Flash) or false
    newlines_to_nils=false

    # Comm ports used
    comm_ports=1

    # Default settings
    comm_baud=38400
    comm_databits=8
    comm_stopbits=1
    comm_parity=none

    # Idle time out in seconds
    timeout=300

    # Port 1 settings (ttyS0)
    net_port1=5331
    serial_device1=/dev/tty.usbserial-A600dLQ1

    is there an updated version for the perl script ?or am i missing something else?
  • Developer
    I never get blue GPS lock LED to turn on, even though uBlox is locked! APM & OIP are beta boards No Lock indication on HappyK's new GCS either.
  • I have the same situation - all the LEDs function, the UBLOX ordered through DIY store, GPS tests fine with good LAT/LONG but when the APM board concludes self tests, calibration etc. and GPS appears to lock, I'm left with the B and C LEDs on. At this point I never get all three as indicated in the manual so the question is - do I really have a GPS lock and ready to fly? Curious, was there a clear solution to your problem GPS LED problem or have I missed something?
  • I had found a similar solution on the forums and this is how ive altered the 'control_modes' file to work with AUX switch and the GEAR switch :


    void read_control_switch()
    {
    byte switchPosition = readSwitch();
    if (oldSwitchPosition != switchPosition){

    set_mode(flight_modes[switchPosition]);

    oldSwitchPosition = switchPosition;

    // reset navigation integrators
    // -------------------------
    reset_I();
    }
    }

    byte readSwitch(void){
    int pulsewidth = APM_RC.InputCh(flight_mode_channel);
    int pulsewidth_a = APM_RC.InputCh(AUX2_CH);
    if (pulsewidth_a < 1230 && pulsewidth < 1230) return 1;// AUTO
    if (pulsewidth_a < 1230 && pulsewidth >= 1690) return 2;// RTL
    if (pulsewidth_a > 1690 && pulsewidth <= 1230) return 3; //Software Manual FBW A
    if (pulsewidth_a >= 1690 && pulsewidth >= 1690) return 4; // Hardware Manual
    //if (pulsewidth >= 1750)
    return 0;
    }

    void reset_control_switch()
    {
    oldSwitchPosition = 0;
    read_control_switch();
    Serial.print("MSG: reset_control_switch");
    Serial.println(oldSwitchPosition , DEC);
    }

    void update_servo_switches()
    {
    // up is reverse
    // up is elevon
    mix_mode = (PINL & 128) ? 1 : 0;
    if (mix_mode == 0) {
    reverse_roll = (PINE & 128) ? 1 : -1;
    reverse_pitch = (PINE & 64) ? 1 : -1;
    reverse_rudder = (PINL & 64) ? 1 : -1;
    } else {
    reverse_elevons = (PINE & 128) ? 1 : -1;
    reverse_ch1_elevon = (PINE & 64) ? 1 : -1;
    reverse_ch2_elevon = (PINL & 64) ? 1 : -1;
    }
    }


    adding
    #define AUX2_CH 6
    to the APM_Config.h file
  • Hey,

    I am getting the same problem except I do not get the C flashing and locking.

    1. Fast flashing - cablibrating gyros.
    2. BC go solid for 2-3 seconds - pause.
    3. A and BC flash alternating - rotation flashing.
    4. ABC flash slowly - waiting for GPS lock.
    5. B Solid. No A and C.

    Also, on the Mtk, the LED flashes blue for 30mins and doesn't lock.

    I have tried all my 4 AMP boards (2 of which I just purchased) and 3 Mtk GPS and have the same problem. The 2 new AMP has updated firmware and does not have any servo twitching problem the first 2 boards have.

    I updated the firmware of Mtk GPS successfully.

    The GPS is connected to the Red board that say "GPS port".

    The MUX LED turns on when I switch away from MANUAL.

    In the code, I defined the MTK GPS
    #define GPS_PROTOCOL GPS_PROTOCOL_MTK

    I did not change any other part of the ArduPilotMega Beta 1.0 code that is uploaded yesterday.

    I think I am missing something really simple, but I have been going through the manual for weeks and still cant solve this problem.

    Really appreciate your help. Thanks

    Joshua
  • Is it safe to power APM with a 11.1V, 2200mAh ,3 Cell , (35C) battery?
  • 3D Robotics
    Does the APM board's mode LED change when you flip your 3-way switch? (the one on in7).
This reply was deleted.

Activity