Accelerometer Drift

This forum is dedicated to software development related to MultiWii.
It is not the right place to submit a setup problem.
Software download
Post Reply
copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Accelerometer Drift

Post by copterrichie »

In this test, the copter was sitting level undisturbed for the length of ten minutes during this test period. I also repeated this test with the ACC connect to both 3.3 and 5 volts with the same results. I modified the playback speed to 3X but the total test time was ten minutes. Note the variances of ACC readings, I have observed a much greater spread but did not have the recorder running at the time. The largest variances is at about 40 seconds into the video.

Version 1.8 WiiCopter (also noted in Version 1.7)
Original Wii Motion Plus
Accelerometer is a BMA020
Arduino Pro-Mini 328

Note: I conducted this same test using a MMA7455 and it does not exhibit the same behavior.

I suspect that some of these Accelerometers are defective or they may require a different calibration procedure.

http://youtu.be/UIkPb-qTfT0

User avatar
shikra
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: Accelerometer Drift

Post by shikra »

That's better than mine....

I have also noticed that I get considerable drift as the temperature changes - particulalry sunny / cloud days as teh sun comes into view. I have yet to try shielding the sensor, but expect that to improve...

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: Accelerometer Drift

Post by mr.rc-cam »

I conducted this same test using a MMA7455 and it does not exhibit the same behavior.

Is there any chance the BMA020 was being affected by PCB temperature rise? For example, if there is a Vreg IC on the same board, as the Vreg's temperature increases it may affect the 0-g offset bias due to the sensor's temperature drift. So perhaps the difference in drift performance (BMA020 vs. MMA7455) was due to something like that.
Last edited by mr.rc-cam on Thu Aug 11, 2011 5:02 am, edited 1 time in total.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Accelerometer Drift

Post by copterrichie »

mr.rc-cam wrote:
I conducted this same test using a MMA7455 and it does not exhibit the same behavior.

Is there any chance the BMP020 was being affected by PCB temperature rise? For example, if there is a Vreg IC on the same board, as the Vreg's temperature increases it may affect the 0-g offset bias due to the sensor's temperature drift. So perhaps the difference in drift performance (BMP020 vs. MMA7455) was due to something like that.


There is that possibility but I personally do not see how that could be because I had the BMA020 will insulated from any other possible heat sources. It is possible, there is a bad connection on the board itself and when the on-board voltage regulator heats up, this could create a problem, I guess I could shoot the board with some canned air to cool it when it starts fluctuating.

Note in the video, just before the largest fluctuation, the ACC indicator will turns off, it is possible something is corrupting the data. On Page 9 of the Datasheet, it talks about critical calibration data Bits 5,6 and 7 of register address 14h and that these bits should be protected. MAYBE these bits are being corrupted in some way. I have no way at present to test this.

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: Accelerometer Drift

Post by mr.rc-cam »

Note in the video, just before the largest fluctuation, the ACC indicator will turns off, it is possible something is corrupting the data.

I think a possible reason that the ACC indicator turns off is because the ACC data has triggered the arming level threshold detection. That is to say, the * calibrated * ACC sensor is not sufficiently "level", so motor arming becomes disabled. However, if you had performed a fresh calibration on the ACC just before the test, and the model was not moved at all, then it is indeed very strange.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Accelerometer Drift

Post by copterrichie »

Just for clarity, I only have a MMA7455 for testing, so I am not sure how other accelerometers will react under similar conditions. I have two ADXL345 on order and upon receipt of them, I will perform this same test on them.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Accelerometer Drift

Post by copterrichie »

mr.rc-cam wrote:I think a possible reason that the ACC indicator turns off is because the ACC data has triggered the arming level threshold detection. That is to say, the * calibrated * ACC sensor is not sufficiently "level", so motor arming becomes disabled. However, if you had performed a fresh calibration on the ACC just before the test, and the model was not moved at all, then it is indeed very strange.


Yes, this is what had alerted me to this problem. I would calibrate the Accelerometer and minutes later, the values had changed with the copter remaining untouched.

What was more disturbing was, this would happen in flight and the copter would become uncontrollable when in stable mode.

mr.rc-cam
Posts: 457
Joined: Wed Jul 27, 2011 11:36 pm

Re: Accelerometer Drift

Post by mr.rc-cam »

My gut feeling from reviewing the video is that there isn't anything shown to indicate a serious problem. The ACC status turning off in the GUI is more likely a result of the arming protection feature rather than a corruption of the sensor's cal data.

I can't really say how much drift is expected on a BMA020. My quad uses the BMA180 and even though it is a more sophisticated/newer part I can see some minor data drift with environmental temperature changes. Given that the BMA020 is an earlier technology it is quite possible that the small drift you see is well within its specs. Perhaps someone that is using it can repeat your 10 minute test to see if they witness similar data crawling.

Long story short, I don't think what is seen in the video can explain your loss of control while in stable mode. The data drift may indeed be a symptom of a poor quality sensor or perhaps one that is failing. But it could also be normal nuisance for that part too. Since I don't have one to test I'm not able to offer any useful comparisons.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Accelerometer Drift

Post by copterrichie »

mr.rc-cam wrote:My gut feeling from reviewing the video is that there isn't anything shown to indicate a serious problem. The ACC status turning off in the GUI is more likely a result of the arming protection feature rather than a corruption of the sensor's cal data.

I can't really say how much drift is expected on a BMA020. My quad uses the BMA180 and even though it is a more sophisticated/newer part I can see some minor data drift with environmental temperature changes. Given that the BMA020 is an earlier technology it is quite possible that the small drift you see is well within its specs. Perhaps someone that is using it can repeat your 10 minute test to see if they witness similar data crawling.

Long story short, I don't think what is seen in the video can explain your loss of control while in stable mode. The data drift may indeed be a symptom of a poor quality sensor or perhaps one that is failing. But it could also be normal nuisance for that part too. Since I don't have one to test I'm not able to offer any useful comparisons.


In the spirit of discovery and investigation, here is a segment of a real-time inflight data-logging. Note the data time stamp of 23 seconds into the flight, note the variance between the AccX and AccY while this data is not reflected in the corresponding gyro Axises. This precise moment can be seen at about 25 seconds in the video, the timing is about 2 seconds off. I need to find a better way to sequent the timing of the datalogger and video but I think it does illustrate my point.

http://www.youtube.com/watch?v=5dzwtbZv_kQ
Attachments
Datalog showing Accelerometer drift in flight
Datalog showing Accelerometer drift in flight

spagoziak
Posts: 171
Joined: Thu Jan 20, 2011 1:18 am

Re: Accelerometer Drift

Post by spagoziak »

I'm pretty interested in how this'll be solved.. my BMA020 behaves exactly the same way. Seems a few folk are having this happen where it never happened before. Pretty interesting!

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Accelerometer Drift

Post by copterrichie »

spagoziak wrote:I'm pretty interested in how this'll be solved.. my BMA020 behaves exactly the same way. Seems a few folk are having this happen where it never happened before. Pretty interesting!


I replaced both that I have with another type of Accelerometer, MMA7455. I am sure others like the ADXL345 will work too. I believe (no evidence) there is a defective batch of the BMA020 which would explain why some people are having great success using them.

spagoziak
Posts: 171
Joined: Thu Jan 20, 2011 1:18 am

Re: Accelerometer Drift

Post by spagoziak »

I could believe that... but it'd be pretty incredible... I got 2 from Kinderkram at the same time... one has been riding around on a tricopter for weeks with perfect behavior. Just popped it onto my quad and things haven't gone well!

I'm going to desolder BMA180 from my bread board and remount it onto my shield, I think. Maybe that'll work.

copterrichie
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: Accelerometer Drift

Post by copterrichie »

spagoziak wrote:I could believe that... but it'd be pretty incredible... I got 2 from Kinderkram at the same time... one has been riding around on a tricopter for weeks with perfect behavior. Just popped it onto my quad and things haven't gone well!

I'm going to desolder BMA180 from my bread board and remount it onto my shield, I think. Maybe that'll work.


Well, In my situation, both started out working very Well, then then something happened. Not sure if it was voltage or something that I was doing. I used 3.3 volts to power both but I did not use a logic level changer. The BMA020 to my understanding have pullup resistors and don't require the logic changer. I don't know and just gave up on them.

ziss_dm
Posts: 529
Joined: Tue Mar 08, 2011 5:26 am

Re: Accelerometer Drift

Post by ziss_dm »

Hi copterrichie,

And how you captured in-flight data? OpenLog?

regards,
ziss_dm

Post Reply