Hi,
I made several tests today. I read 16 ADC samples and I sent it to matlab at 20Hz (I also tried 100Hz but results are the same). Then I computed the mean and the variance for each sensors and for several right shifting. (0 = raw data, 1 = divise by 2, 2 = divise by 4 ...). If we want to use oversampling and increase resolution to 12bits we need to right shift 2 times. Then we can made an average to reduce noise (but also bandwidth).
This is the main results I got:
For gyros it is better to average a lot (variance is lower) but for acceleros it is almost useless.
I also noticed than when we change the position of the IMU it takes a long time (20s) before acceleros data become stable.
If you want more information I have several curves and data.
This is my modification of the ADC reading. It took 16 samples to increase accuracy to 12 bits. However you also have to change your calibration values because output is now between 0 and 4095 (and not 0 and 1023).
The bandwidth is 83Hz. If your DCM algorithm is running at 50Hz you can try classical averaging to remove some noise.
I plan to do more tests to find the best way to read the sensors (oversampling or averaging?)
Hi Doug,
Just started working with ArduIMUv2 + EM406 on the bench yesterday. I had to change the baud rate and call init_gps in setup() of arduimu to get GPS data reported via PRINT_DEBUG. Diff file to rev49 attached (I hope).
Hello Doug,
thank you for the reply, right now I am sitting here to go through the steps and report the results. I am using arduino alpha 018. I downloaded the ardu-imu.zip and put it into the library folder from the arduino tree. Then I rename the folder from ardu-imu to arduimu, for otherwise I get an message to create this folder, which has to be the container for the arduimu.pde file. Then I load this file with the arduino compiler with all the other files loaded automatically. Then I chane the #define GPS_PROTOCOL 1 to #define GPS_PROTOCOL 2. THen I press the upload button. Uploading to IO Board appears, GRRR, it worked, sorry, don't know, what it was, I tried it 6 times yesterday. Now i have to see, whether i get the gps lock.
Thank you very much,
Tom
When you say the code will not load, do you mean you are getting a compiler error? If so can you please give me the error message. I have never seen code that would not load unless there was a compiler error.
I used this IMU on a flying wing and it works great. I have some remarks and suggestions:
-You read 8 ADC channels but 6 is enough. With an ADC clock at 200khz, 6 channels and 16 samples you can have a bandwith of 80Hz and a resolution of 12bits.
-You can store ADC data in int (2 bytes) instead of float (4 bytes)
-For the constrain of +-900, gyros and acceleros will saturate at +-310.
I think I will rewrite the ADC reading and put the code here soon. I will try to put what Read_adc_raw do in the ADC interrupt function to simplify it and increase the speed.
-When you read the sensors (in DCM) you scale the ADC values to physical values (°/secs) for the gyros but not for the accelerometers. I think I would be more readable to transform ADC value to G (or better m/s2) just after the reading.
Hello Doug,
i am pretty new to all this stuff, have some experience in programming and am quite fascinated with all this uav stuff. Right now i am trying to make the arduimu v2 flat work with the em406, but when I try to upload the code, it freezes. That does not happen, when I keep the GPS Protokoll 1 in the header file, but when I change from 1 to 2 it will not load anymore. Can you give me a tip, where to look for the problem. Evereything else like labviews cube works fine.
Thank you and greetings from munich germany,
Tom
Comments
I made several tests today. I read 16 ADC samples and I sent it to matlab at 20Hz (I also tried 100Hz but results are the same). Then I computed the mean and the variance for each sensors and for several right shifting. (0 = raw data, 1 = divise by 2, 2 = divise by 4 ...). If we want to use oversampling and increase resolution to 12bits we need to right shift 2 times. Then we can made an average to reduce noise (but also bandwidth).
This is the main results I got:
For gyros it is better to average a lot (variance is lower) but for acceleros it is almost useless.
I also noticed than when we change the position of the IMU it takes a long time (20s) before acceleros data become stable.
If you want more information I have several curves and data.
Loris
This is my modification of the ADC reading. It took 16 samples to increase accuracy to 12 bits. However you also have to change your calibration values because output is now between 0 and 4095 (and not 0 and 1023).
The bandwidth is 83Hz. If your DCM algorithm is running at 50Hz you can try classical averaging to remove some noise.
I plan to do more tests to find the best way to read the sensors (oversampling or averaging?)
ADC.pde
Just started working with ArduIMUv2 + EM406 on the bench yesterday. I had to change the baud rate and call init_gps in setup() of arduimu to get GPS data reported via PRINT_DEBUG. Diff file to rev49 attached (I hope).
arduimu.diff
thank you for the reply, right now I am sitting here to go through the steps and report the results. I am using arduino alpha 018. I downloaded the ardu-imu.zip and put it into the library folder from the arduino tree. Then I rename the folder from ardu-imu to arduimu, for otherwise I get an message to create this folder, which has to be the container for the arduimu.pde file. Then I load this file with the arduino compiler with all the other files loaded automatically. Then I chane the #define GPS_PROTOCOL 1 to #define GPS_PROTOCOL 2. THen I press the upload button. Uploading to IO Board appears, GRRR, it worked, sorry, don't know, what it was, I tried it 6 times yesterday. Now i have to see, whether i get the gps lock.
Thank you very much,
Tom
When you say the code will not load, do you mean you are getting a compiler error? If so can you please give me the error message. I have never seen code that would not load unless there was a compiler error.
I used this IMU on a flying wing and it works great. I have some remarks and suggestions:
-You read 8 ADC channels but 6 is enough. With an ADC clock at 200khz, 6 channels and 16 samples you can have a bandwith of 80Hz and a resolution of 12bits.
-You can store ADC data in int (2 bytes) instead of float (4 bytes)
-For the constrain of +-900, gyros and acceleros will saturate at +-310.
I think I will rewrite the ADC reading and put the code here soon. I will try to put what Read_adc_raw do in the ADC interrupt function to simplify it and increase the speed.
-When you read the sensors (in DCM) you scale the ADC values to physical values (°/secs) for the gyros but not for the accelerometers. I think I would be more readable to transform ADC value to G (or better m/s2) just after the reading.
Thank you for the good imu!
i am pretty new to all this stuff, have some experience in programming and am quite fascinated with all this uav stuff. Right now i am trying to make the arduimu v2 flat work with the em406, but when I try to upload the code, it freezes. That does not happen, when I keep the GPS Protokoll 1 in the header file, but when I change from 1 to 2 it will not load anymore. Can you give me a tip, where to look for the problem. Evereything else like labviews cube works fine.
Thank you and greetings from munich germany,
Tom
http://code.google.com/p/ardu-imu/source/browse/#svn/trunk
the link complet.
Sorry my English is very poor.
Thank you Doug Weibel