Replies

  • I'm currently trying to integrate a VN-200 with a APM 2.5 or 2.6 or PixHawk. Has anyone made any progress on this?

    • Out of curiosity, what makes you want to use the VN over the onboard IMU?

      I've had some luck getting a vicon system integrated where the camera system feeds attitude information to the autopilot. It was a bit of a mess getting it put together. If you can read data from the VN I can walk you through the process of overriding the default AHRS

    • I happen to have acquired a VN-200 and I'm hoping it can improve my UAS, which currently uses a 2.5 but could be upgraded. Eventually, I'm going to try to move the Ardupilot software to a small linux box, which of course would have no built in sensors.

      Also, my VN-200 is the ruggedized version, which means only the serial pins are broken out while the SPI pins are hidden inside the aluminum casing. I can communicate with it (tell it which data to output) via puTTY, but I'm not sure how I will program the APM to use that data coming in on one of its UART ports (or maybe USB?)

    • If it's 5 volts you can hook it up to UART 2 on the APM 2.5. Just write a little device driver to read from it. You don't need putty for the communication between the VN and APM.

      If I had to guess, you're better bet for improving sensor performance on your vehicle is to reduce vibrations caused by the propulsion. Unless you need absurdly precise waypoint navigation I don't see the VN making too much of a difference over the MPU6K.

      The vast majority of Linux based operating systems are not real time. You cannot make a stabilization system using them. This is the reason there are no android or iPhone based autopilots. You can, however, have the linux box pass high-ish level commands to the APM to accomplish tasks which require more computing power. I've had luck passing attitude commands (roll, pitch, yaw, and thrust) to the APM from a linux machine and performance has been acceptable for waypoint following. You can also just pass waypoints directly and leave the APM in guided mode.

  • I am using now and arduino Due to interface VectorNAV_100 in SPI mode
    below is the link of the hardware 
    I am sending a request in spi to read yaw pitch roll(registry 8)
    0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    but the output is coming as
    0x01, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
    i even tried with other registry (0x13 etc) but the output is the same
    can anyone suggest where am i going wrong
    Below is the code uploaded to arduino due
    #include <SPI.h>
    /*
    code to read vectornav data via an arduino DUE SPI pins 
    */
    byte attitude[16]; // yaw, pitch, & roll
    int slaveSelectPin = 52; //52 or 4 or 10
    void setup() 
    {
      Serial.begin(115200); 
      SPI.begin(slaveSelectPin); 
    delay(1000);
      
      SPI.transfer(slaveSelectPin, 0x01, SPI_CONTINUE);
      SPI.transfer(slaveSelectPin, 0x08, SPI_CONTINUE);
      SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
      SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
      SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
      SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
      SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
      SPI.transfer(slaveSelectPin, 0x00);
      
      delayMicroseconds(100);
    void loop() 
    {
          attitude[0] = SPI.transfer(slaveSelectPin, 0x01, SPI_CONTINUE);
          attitude[1] = SPI.transfer(slaveSelectPin, 0x08, SPI_CONTINUE);
          attitude[2] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[3] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[4] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[5] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[6] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[7] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[8] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[9] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[10] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[11] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[12] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[13] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[14] = SPI.transfer(slaveSelectPin, 0x00, SPI_CONTINUE);
          attitude[15] = SPI.transfer(slaveSelectPin, 0x00);
     
           for (int i = 0; i < 16; i++) 
          {
            Serial.write(attitude[i]);
          }
    }
  • Hey guys thanks for the replies. I know it is possible, but was wondering if anyone had actually tried it yet. I will give it a red hot crack over the weekend (if I get time) and will post the results back. I think it might be time to study the source and get a complete understanding of the comms path to the onboard IMU...

  • Hey Luke,

    I've been considering doing this for a while. If you get any data comparing the VN-100 with the on board AHRS I'd love to see it.

    Nate

  • Hi Luke,

    I did this a while ago before I switched to 3dm due to noise problem with my (old) VN100. Here is a sample code that I wrote to read data from the VN100. Just attached the IMU to any available serial port of any APM/Arduino board (in my case serial #2 of APM 1.0).

    Good luck.

    VectorNAV.pde

  • Hi Luke,

    I think it is very much possible, but with changes to the current code base. You will have to know the pin connections to connect the sensors to the I2C bus of the APM board. This is an excellent IMU, size of a coin I believe.

    Have a look here in one of our forums, maybe you can get some idea if someone has already done this with APM x.x!

    Regards..

This reply was deleted.