Building my first drone.  Its a blimp inspired by the (currently unavailable) Blimpduino with a Quadcoptor-like sensor suite (ArduIMU+ v2, Sharp IR sensors, and Ultrasonic sensor).  The problem is no one seems to use the arduIMU in a stand alone configuration, even in a test/troubleshooting setup and I dont want the added complexity of adding the ardupilot since the base code isnt going to be very useful for this very simple stripped down drone implementation.  

 

The problem that had me stumped last night was trying to integrate my new GPS (MTK-3329 from DIYDrones) to the ArduIMU. The GPS locked but no solutions came through the serial feed from the ArduIMU via FTDI. I added debugging statements in the ArduIMU code and found that the GPS data packet is always incorrect so the Arduimu kicks out of the state machine after the first and second packets fail. I tried with all combinations of MTK firmware v1.4 and v1.6 as well as ArduIMU v1.7 and v1.8.1.  No obvious config/setup parameters seem to be the cause. All other serial data outputs from ArduIMU works fine. 

 

As far as I can tell the cause is one of two things.  A subtle config/setup issue that isnt discussed in forums becasue no one tries to runt he ArduIMU with GPS in a stand alone configuration. I noticed that FTDI-Rx and GPS-Rx go through a mux but Ive never worked with one of these before. I can figure this out but it will take some time to learn and troubleshoot so advice will be helpful.

 

Or there is a potential conflict between FTDI and GPS Tx. While mapping the pins on the ArduIMU+ I noticed on the schematic that the GPS and FTDI connectors appear to share the Tx-0 pin.  Could the FTDI serial interface be preventing the GPS from talking to the ArduIMU somehow? If so why would it always corrupt the GPS data output

 

Any other ideas will be helpful.

 

 

 

 

 

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

Join diydrones

Email me when people reply –

Replies

  • Moderator
    @Berto - did you get anywhere with the arduimu as a stand alone unit?

    @Mac - the second (flat) version has same prob with the 406. Can you share your code?
  • I got my ArduIMU V3 working.  I don't know what I was doing wrong before.  I ended up re-writing a lot of code, but I can't see why the original code didn't work with regard to the GPS I/0.

    Ok, so here's the deal on the MUX.   Set digital pin 7 to HIGH to enable receiving serial data from the GPS.

    Here are some semi-working code snippets.  I'll upload my full working code and schematics when it is worthy.

      enum ardu_imu_pins {
        SPI_SCK = 13,
        SPI_MISO = 12,
        SPI_MOSI = 11,
        SPI_SS = 10,
        NAV_DATA_PACKET_READY = 9, // LOW => IMU ready to send packet
        SAIL_CTRL_READY_RX = 8, // LOW => SAIL CONTROL ready to receive packet
        SERIAL_RX_MUX = 7,
        BLUE_LED = 6,
        RED_LED = 5,
        I2C_SDA = A4,
        I2C_SCL = A5
      };

      AP_GPS_NMEA gps_io(&Serial);

    void setup() {

      pinMode(RED_LED, OUTPUT);  // red led  
      pinMode(BLUE_LED, OUTPUT);  // blue led
      pinMode(SERIAL_RX_MUX, OUTPUT);

      digitalWrite(SERIAL_RX_MUX,HIGH); // set serial input from GPS
      Serial.begin(4800); // for EM406A GPS
      gps_io.init();

    }

    void loop() {

      delay(100);

      gps_io.update();
      digitalWrite(BLUE_LED, (m_gps.status() == 2) ? HIGH : LOW);
      float lat_degrees = float(m_gps.latitude)/10000000.0;

      float lon_degrees = float(m_gps.longitude)/10000000.0;

      // Serial.write() goes to both GPS and FTDI cable back to computer.  GPS seems to not care

      Serial.write("lat="); 

      Serial.write(lat);

      Serial.write("lon="); 

      Serial.writeln(lon);

    }

     

  • I am having the same problem with ArduIMU V3 and an EM406A GPS.  The data from the GPS seems to be all zeroes.

This reply was deleted.

Activity