Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to TM4c129x #11

Closed
PAk-CatchFire opened this issue Aug 12, 2016 · 8 comments
Closed

Port to TM4c129x #11

PAk-CatchFire opened this issue Aug 12, 2016 · 8 comments

Comments

@PAk-CatchFire
Copy link

Hello,
first of all....excellent work.

Will you port it to latest TM4c129x Tivaware family?
Regards.

@Lauszus
Copy link
Owner

Lauszus commented Aug 12, 2016

Thanks :)
No I am not currently planning on it, but if you want to you are more than welcome to do so.

@PAk-CatchFire
Copy link
Author

Thanks @Lauszus. Finally I was able to port it for 129X and 123X devices. But unfortunatelly, the yaw, raw and theta I am getting are not correct.

Would you mind to take a look on it? All the code is on my Github

https://github.com/PAk-CatchFire/MPU9250-Tivaware

Regards

@Lauszus
Copy link
Owner

Lauszus commented Sep 23, 2016

@PAk-CatchFire what exactly do you want me to look at? If you want to use the driver for the MPU-9250, then you can just use mine. But you will have to change the I2C driver for the TM4C129x family: https://github.com/Lauszus/LaunchPadFlightController/blob/master/src/I2C.c.

@Lauszus
Copy link
Owner

Lauszus commented Sep 23, 2016

Btw the TM4c129x family is not the "latest family", but simply a different family, which purpose is to use it for IoT etc.

@PAk-CatchFire
Copy link
Author

Ok, the129x I2C driver is one part I already implemented.

In which file is located your MPU-9250 driver? Is it spreaded through some files?

Thanks

@Lauszus
Copy link
Owner

Lauszus commented Sep 28, 2016

As the MPU-9250 is the same sensor as the MPU-6500, but just with a AK8963 magnetometer inside. I simply use the MPU-6500 driver: https://github.com/Lauszus/LaunchPadFlightController/blob/master/src/MPU6500.c and then a dedicated driver for the magnetometer: https://github.com/Lauszus/LaunchPadFlightController/blob/master/src/AK8963.c.

Here is the commit that added support for the MPU-9250: 527d393.

You shouldn't have to modify the driver in any way, as I use the TivaWare librayr: https://github.com/Lauszus/LaunchPadFlightController/tree/master/lib. The part is then simply set in the Makefile: https://github.com/Lauszus/LaunchPadFlightController/blob/master/src/Makefile#L28.

You might want to use different pins for the I2C interface: https://github.com/Lauszus/LaunchPadFlightController/blob/master/src/I2C.c, that is all you might have to change.

@PAk-CatchFire
Copy link
Author

Thank you Lauszus, I was checking your drivers and they work fine for the accelerometer & gyro part, however the magnetometer gets stuck reading 0 values. So i used the function in my code:
https://github.com/PAk-CatchFire/MPU9250-Tivaware/blob/master/PAk_MPU9250_Tivaware/MPU9250/MPU9250.c#L472

I have improved my readings because I had some error on the scale, however my result is jittering (probably the filter is not good enough).

I haven't seen that you use any of the traditional Madgwick/Mahony QuaternionUpdate....are you using your own? Is it worth it?

Best Regards

@Lauszus
Copy link
Owner

Lauszus commented Oct 10, 2016

I am just using a complimentary filter: https://github.com/Lauszus/LaunchPadFlightController/blob/master/src/IMU.c.

@Lauszus Lauszus closed this as completed Mar 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants