SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
#127276
Hi to everyone,
I would like to get Euler Angles from the IMU but I don't have the bootloader, so I would need to perform the transformations out of the firmware. I 'vet got a program in C catching IMU data (angular velocities,accelerations and magneto) and I'd like to get Euler Angles from the angular velocities IMU gives us.

Thanks in advance.
#127534
Hi,
You should start with the great work of Mr. Madgwick:

http://code.google.com/p/imumargalgorit ... loads/list

But be aware, it is not trivial (at least not to me). As an alternative kalman based fusion algorithm can be used (try to google or a search in this forum, not easy as well).

By the way, if you want to get accurate values the sensors should be calibrated (There are a few topics in this forum). Furthermore you should think about removing the RC HP filters of your gyros (if you use this device: SEN-09623). Its worth a search in this forum...

Do u use SEN-09623? Did you already try the "9DOF AHRS Code Base" link at the product infos?
If you use SEN-09623: "The board comes programmed with the 8MHz Arduino bootloader". You can use the free Arduino software to program your board.

Hami
#127542
Yes, I do use SEN-09623 and I'm following 9DOF AHRS Code Base (https://github.com/a1ronzo/SparkFun-9DO ... ter/main.c) but the point is we don't have any bootloader to load the code so we do a C program out of the firmware to gather data and we would need the algorithm to get Euler Angles because we can't modify the source code. How can we calibrate the IMU initially?

Thanks in advance.
#127615
Hey,
tcpsi wrote:the point is we don't have any bootloader to load the code
A bootloader is software! The software should already be programmed at your atmega: "The board comes programmed with the 8MHz Arduino bootloader" (from the product infos). That means, you shold be able to programm your atmega with the arduino software (open-source) with an serial connection.
tcpsi wrote: How can we calibrate the IMU initially?
http://www.google.de/url?sa=t&source=we ... qQ&cad=rja (just 1 example)

Again, there are a few topics in this forum, adressing calibration and data fusion of IMU/MARG-Sensors. This theme is not trivial.

Hami
#127656
Now, I was searching for a way to make a backup of the default firmware (v18) to load a new firmware by means of the Arduino IDE. The thing this program just let to upload and i'd need to download first the software it came from the factory. I've been having a look avrdude but it doesn't take into account ATMEGA328 device. Do you know other way to do it?

Thanks a lot.
#127659
tcpsi wrote:The thing this program just let to upload and i'd need to download first the software it came from the factory. I've been having a look avrdude but it doesn't take into account ATMEGA328 device. Do you know other way to do it?
Whats with the link "test firmware" of the product infos? Is that an other firmware? But i am not sure how to reprogram a "normal" hex (wiht arduino-bootloader) .... . I never did it that way, i use an AVRISP mkII (AVR Studio).

This could be interasting for you:
http://www.google.de/url?sa=t&source=we ... qg&cad=rja
#127691
Thanks for all the helping you're giving to me.Now one of the issues to take into account is the synchronization between IMU and the PC. How have you solved this problem since serial port, as known, it's asynchronous?? I'm decreasing the interval of the timer of my program in the PC but it shouldn't be enough because sometimes I gather the data which is not requested, for instance, if I want angular velocities sometimes I catch manometers data (the next to angular velocities in the raw).I haven't found anything related to synchronization through serial port.What do you propose?

Thanks a lot.