External IMU configuration

Hello,
i am trying to configure how to mount an external IMU to pixhawk 2.4.8,because the internal one has a very big error and in combination with the GPS error the position of the vehicle is way of track.
First of all is it possible to do it?
If it is do i have to program it to feed the data in a certain way, or is there a more automated way?
Thank you in advance.

Even if it was possible, it is likely cost-prohibitive.

Probably you get better resuts by buying a better GPS. Did you try using RTK GPSs?

The 2.4.8 pixhawk that I have has 2 imu devices. Mpu6000 and Lsm303. If yours is the same then one of the two imus could be faulty? Check in your bin file imu and you should see the two sets unless one has been deactivated already. Assume you are logging your flights. Compare the 2 gyrox, then y and z with each other. They should track closely. The same for the accelerometers. Look for any bias developing during the flight.
If you find one that is suspect you can switch off that whole imu in parameters. Then test.
If you have only 1 imu and is faulty then it maybe a case of replace the pixhawk or repair. Same if both are faulty.
Check the board voltage is ok as well.
If the imus are ok then check compass/gps.

Hello,

If you want to add a new external IMU, it is possible. You need to add a new backend in AP_inertialsensor and modify your hal to use it, and adapt the EKF gain for it… Quite a big work

But unless you are paying a quite expensive IMU (>1000$) you won’t have much improvement…
Default imu on pixhawk serie are quite good. At 1000$ it would be better to replace the whole controller …

Could you details what you mean by very big error ? I fear that you are thinking that the imu is faulty when it is the attitude that is the culprit. The attitude comes from fusing the imu, magnetometer, and gps in the ekf… But the task is complex as many parameters influence the accuracy : raw parameters, frame response, motor response, electromagnetic perturbations etc…
Like I said, it is more likely that only use better imu won’t improve much the system. Investing in a better GPS could be a better and easier start even if it won’t solve everything.
Many companies use only a pixhawk like to attain sumetric accuracy (and dji got the same sensors too) so you need to identify the correct source of issue on your build before investing big money on theorical improvement.
I invite you to create a post on copter section with the maximum information on your build and a dataflash log (the one from sd card). That way many expert on the forum will be able to help you to improve your build !

Hey, sorry for waking up this post from the dead.
Let’s say I’m using a known-to-Ardupilot IMU sensor, Modifying HAL (hwdef ?) has been done.
What’s the next step, regarding the EKF?
If I’m giving up one of the existing ones in order to use the new one - should it be disabled via hwdef or via configuration?

I would also be quite curious on what to change on the EKF? Shouldnt it just be the process covariances? Sorry for waking it up again. Any Insights would be appreciated.

1 Like