Sensor Calibration
Sensor Calibration
When should the various sensors be calibrated and how often? Should I be calibrating the gyro, ACC and mag before every flight or just once after the build is compete?
Also, if I have trimmed up the ACC, will an ACC calibration erase that trim?
Also, if I have trimmed up the ACC, will an ACC calibration erase that trim?
Re: Sensor Calibration
your Gyro gets calibrated everytime at bootup, thats why your copter should be level when plugging it in.
acc needs calibrated only when you first get started i believe, or if you clear the eeprom. same with mag.
or so my experience has been, im sure i will get corrected if i am wrong.
acc needs calibrated only when you first get started i believe, or if you clear the eeprom. same with mag.
or so my experience has been, im sure i will get corrected if i am wrong.
Re: Sensor Calibration
Does uploading a new or modified sketch clear the eeprom causing the need to calibrate ACC and Mag again? Thanks for the help!
Re: Sensor Calibration
I dont think so, but its easy to test once in flight. remember the Gyro gets calibrated every time you power on, and its all you need for flight. at this point if you are concerned you enable 1 sensor at a time and see if its calibration held.
Re: Sensor Calibration
Having an issue with my first build that I can't pinpoint. After plugging in on a flat surface at battery connect, and running an ACC calibration, my copter attempts to fly forward and to the left.
I assume this is natural and I need to adjust for this behavior.
What I don't understand is the correct way to make those adjustments.
Correct me if I am wrong, but the only valid way to trim unlevel flight in ACRO mode is to set trims on the transmitter.
I've been given some other procedures that don't really seems to work for me.
Some tell me to run the INFLIGHT_ACC_CALIBRATION but I don't think that has anything to do with ACRO flight, right? That would only be in LEVEL mode.
Please correct me if I am wrong, but after reviewing other procedures and some trial and error, the right way to trim up flight in all modes is this...
In ACRO, obtain level flight using the TX trims (and leave them in those positions forever)
Then switch to LEVEL mode and trim the ACC using either stick commands or the INFLIGHT_ACC_CALIBRATION.
This should give me level flight in both ACRO and LEVEL modes correct?
I have calibrated the ACC before to gain fairly level flight for LEVEL mode, but as soon as I flip the switch to ACRO, the copter wants to dart off to about 11 o'clock.
The only way to stop this that I can see is by setting TX trims and never changing them again.
I honestly expected a more level flight from stock than I am getting.
I assume this is natural and I need to adjust for this behavior.
What I don't understand is the correct way to make those adjustments.
Correct me if I am wrong, but the only valid way to trim unlevel flight in ACRO mode is to set trims on the transmitter.
I've been given some other procedures that don't really seems to work for me.
Some tell me to run the INFLIGHT_ACC_CALIBRATION but I don't think that has anything to do with ACRO flight, right? That would only be in LEVEL mode.
Please correct me if I am wrong, but after reviewing other procedures and some trial and error, the right way to trim up flight in all modes is this...
In ACRO, obtain level flight using the TX trims (and leave them in those positions forever)
Then switch to LEVEL mode and trim the ACC using either stick commands or the INFLIGHT_ACC_CALIBRATION.
This should give me level flight in both ACRO and LEVEL modes correct?
I have calibrated the ACC before to gain fairly level flight for LEVEL mode, but as soon as I flip the switch to ACRO, the copter wants to dart off to about 11 o'clock.
The only way to stop this that I can see is by setting TX trims and never changing them again.
I honestly expected a more level flight from stock than I am getting.
Re: Sensor Calibration
i used the stick clicks to cure that issue on both of my builds.
make sure your sticks are trimmed to 1500 using gui.
fly to see where your leaning.
land, disarm
full throttle while disarmed, and use your other stick to adjust the FC trim.
for instance, if your leaning forward and left, with throttle at full, pull your pitch back and you will see your FC blink once for each second you have it pulled back. 5 flashes i believe equals one degree of change, so if you are leaning at about 5 degrees forwards you will hold it for 25 flashes. do the same for the roll, hold the stick to the right to cure it leaning left.
arm, fly, and adjust again.
wash, rinse, repeat...
make sure your sticks are trimmed to 1500 using gui.
fly to see where your leaning.
land, disarm
full throttle while disarmed, and use your other stick to adjust the FC trim.
for instance, if your leaning forward and left, with throttle at full, pull your pitch back and you will see your FC blink once for each second you have it pulled back. 5 flashes i believe equals one degree of change, so if you are leaning at about 5 degrees forwards you will hold it for 25 flashes. do the same for the roll, hold the stick to the right to cure it leaning left.
arm, fly, and adjust again.
wash, rinse, repeat...
Re: Sensor Calibration
Right, that works for ACC/Level mode but what is the fix for acro/gyro mode? TX trims right?
Re: Sensor Calibration
so, with acc off, in air (not immediately after taking off), you level your quad and as soon as you let go of the sticks it leans forward and to the left?
no, acro should not be leaning if your TX is trimmed to 1500 (using the gui to make sure they are perfectly 1500 or to learn if you need to use a deadband), i apologize, i swore i saw you saying you had acc mode on.
try adjusting the weight balance of your quad. might have to clear your eeprom and start over, maybe someone else will clue into something im missing for you.
no, acro should not be leaning if your TX is trimmed to 1500 (using the gui to make sure they are perfectly 1500 or to learn if you need to use a deadband), i apologize, i swore i saw you saying you had acc mode on.
try adjusting the weight balance of your quad. might have to clear your eeprom and start over, maybe someone else will clue into something im missing for you.
Re: Sensor Calibration
Yes, when I get it level in acro and then release sticks, it then leans forward and left again. All channels show center at 1500 in gui. Do I need to increase P to hold that level angle? I don't have a whole lot of options to change the weight around. it feels pretty even in my hands.
Re: Sensor Calibration
ok, its funny that i should have been chatting with you about this problem, i made some changes to my big bird today as well as updated to 2.2 and i noticed i was having a very similar problem. my quad would slowly lose dip forward and slightly to the left after i manually leveled it each time.
I loaded the clear eeprom code into my arduino, then reloaded the 2.2, and I had to reset my PIDs (the only change i make is to crank up the rate on my yaw)and reset my level mode to aux 1, but the listing went away completely.
I loaded the clear eeprom code into my arduino, then reloaded the 2.2, and I had to reset my PIDs (the only change i make is to crank up the rate on my yaw)and reset my level mode to aux 1, but the listing went away completely.
Re: Sensor Calibration
So you think it was the clear eeprom code that did it? do you have a link to that code? I haven't tried it.
Re: Sensor Calibration
its one of the sketches that comes with arduino, look under eeprom.
Re: Sensor Calibration
Thanks. I'll give that a shot once I get my new prop adapters in.
Re: Sensor Calibration
as a side note, one of the changes i had made that may also be related to my problem, but because I'm dumb, I didn't think of this earlier.
when i bought this flip frame from witespyquad.com i didnt have appropriate mounting holes on my center plate for a FC so small, so i used some 2 sided adhesive tape to hold it in place and i believe it might have been loose a little. my new plastic offsets that are presently holding it in place have a piece of soft foam as a vibration dampener between them, instead of simple 2 sided tape, so my FC is not only more rigidly held in place but still has a vibration firewall active and this could very well be the resolution i blamed on clearing the eeprom.
what made me realize this? i was throwing away the old 2 sided tape and realized the FC wasnt stuck the FC very well because there was sand and dirt on half of it, meaning it could very well have been tilted forward and to the left a little bit...
when i bought this flip frame from witespyquad.com i didnt have appropriate mounting holes on my center plate for a FC so small, so i used some 2 sided adhesive tape to hold it in place and i believe it might have been loose a little. my new plastic offsets that are presently holding it in place have a piece of soft foam as a vibration dampener between them, instead of simple 2 sided tape, so my FC is not only more rigidly held in place but still has a vibration firewall active and this could very well be the resolution i blamed on clearing the eeprom.
what made me realize this? i was throwing away the old 2 sided tape and realized the FC wasnt stuck the FC very well because there was sand and dirt on half of it, meaning it could very well have been tilted forward and to the left a little bit...
Re: Sensor Calibration
Vibration most likely isn't my problem. Using these mounts.
http://www.rcdude.com/servlet/the-2412/ ... sh-/Detail
http://www.rcdude.com/servlet/the-2412/ ... sh-/Detail
Re: Sensor Calibration
Figured I would ask after looking at the clear eeprom code.
My FC has an atmega2560. Is the eeprom the same size on all chips, or can it vary?
If it varies, how to I find out what size mine is so I can modify the code to make sure it writes zeros to the entire thing?
My FC has an atmega2560. Is the eeprom the same size on all chips, or can it vary?
If it varies, how to I find out what size mine is so I can modify the code to make sure it writes zeros to the entire thing?
Re: Sensor Calibration
In-Flight wrote:Figured I would ask after looking at the clear eeprom code.
My FC has an atmega2560. Is the eeprom the same size on all chips, or can it vary?
If it varies, how to I find out what size mine is so I can modify the code to make sure it writes zeros to the entire thing?
Just use example in arduino eeprom_clear and that's it. It'll write zeros to entire chip.
Re: Sensor Calibration
So basically you are saying that all atmega use 512 eeprom? That can't be right.
Re: Sensor Calibration
He is saying that is enough for mwii.
Re: Sensor Calibration
I was able to find out for my 2560 that the total eeprom size is 4096.
I'm a stickler for doing do things the correct way. Thanks for the input.
Still waiting on some parts before I can try again after wiping. Ill send an update.
I'm a stickler for doing do things the correct way. Thanks for the input.
Still waiting on some parts before I can try again after wiping. Ill send an update.
Re: Sensor Calibration
So ACRO mode is now holding correctly and overall the quad performs much better.
I did a few things but I'm thinking the EEPROM clear was the trick.
1) Switched to GemFan from EPP.
2) Switched to 2.2 from 2.1
3) Bought new prop adapters and made sure they were straight
4) Cleared the EEPROM prior to writing 2.2
5) Verified the CG was at the center of the FC
The quad still initially takes off in that forward and left direction in ACRO but as soon as I correct it, the correction holds. (assume this is normal for all quads as level in the air is not necessarily be the same as level when sitting flat on the ground.)
I was able to trim the ACC and it holds level in ANGLE/HORIZON as well.
Thanks Tovrin!
I did a few things but I'm thinking the EEPROM clear was the trick.
1) Switched to GemFan from EPP.
2) Switched to 2.2 from 2.1
3) Bought new prop adapters and made sure they were straight
4) Cleared the EEPROM prior to writing 2.2
5) Verified the CG was at the center of the FC
The quad still initially takes off in that forward and left direction in ACRO but as soon as I correct it, the correction holds. (assume this is normal for all quads as level in the air is not necessarily be the same as level when sitting flat on the ground.)
I was able to trim the ACC and it holds level in ANGLE/HORIZON as well.
Thanks Tovrin!
Re: Sensor Calibration
Also, forgot to mention that the quad still like to slowly yaw left, even with mag turned on.
Would that be some sort of interference throwing off the mag sensor?
Would that be some sort of interference throwing off the mag sensor?
Re: Sensor Calibration
In-Flight wrote:Also, forgot to mention that the quad still like to slowly yaw left, even with mag turned on.
Would that be some sort of interference throwing off the mag sensor?
When you fly acro or level turn off mag. If you have YAW drift then incresae I term for Yaw.
Re: Sensor Calibration
scrat wrote:In-Flight wrote:Also, forgot to mention that the quad still like to slowly yaw left, even with mag turned on.
Would that be some sort of interference throwing off the mag sensor?
When you fly acro or level turn off mag. If you have YAW drift then incresae I term for Yaw.
Thanks, I'll give that a shot. I'm still a PID tuning novice.
Re: Sensor Calibration
Okay, so I kept increasing YAW I all the way up to .1 and it never stopped its slow turn to the left.
At .1, it actually started slow a oscillation that was increasing in intensity. I had to land quick before it became unstable.
I backed it back down to the default again for now. Any ideas?
Roll 3.4/.030/23
Pitch 3.4/.030/23
YAW 3.6/.045/0
YAW D is at zero. Should that be increased?
FYI, this is a VTail running Y4. That's why I had to drop my YAW P down.
At .1, it actually started slow a oscillation that was increasing in intensity. I had to land quick before it became unstable.
I backed it back down to the default again for now. Any ideas?
Roll 3.4/.030/23
Pitch 3.4/.030/23
YAW 3.6/.045/0
YAW D is at zero. Should that be increased?
FYI, this is a VTail running Y4. That's why I had to drop my YAW P down.
Re: Sensor Calibration
Hey there, had the same problem (Gyros only, would start leaning, could not really be cured with TX stick offset calibration) with a tri lately - then performed an Acro Gyro recalibration and afterwards there was no "leaning" in Acro mode. Maybe someone knows what is exactly going on with this stick command? (In ARM Mode: throttle back, yaw left, pitch back). It seems to be different than the "startup gyro calibration"), but then maybe I am wrong 
Thx + Bye,
Peter

Thx + Bye,
Peter