mageshms / arducopter

Automatically exported from code.google.com/p/arducopter
0 stars 0 forks source link

Unable to Update Acceleromenter Offset #78

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
HI,

My Quad keep giving me an offset of -21 on Accel Roll and Accel Pitch of 29 
after pressing the Initialize EEPROM button. I tried to go to the Calibration 
to key in the offset but i wasnt able update successfully. 
This offset seem to cause my Quad to drift to the left. Is there a way to auto 
calibrate the Quad on power up so that the offset can be 0?

Tks
Rgds
YueKhing Toh

Original issue reported on code.google.com by tohyuekh...@gmail.com on 27 Oct 2010 at 4:45

GoogleCodeExporter commented 8 years ago
YueKhing,

     We do autocalibrate the gyros when the arduCopter is switched on but we purposely don't do it for the accelerometers.  The problem with the auto-calibrate-accelerometer-values-on-startup idea is that it would mean that you would always have to be sure to lay the quad flat when starting it up before a flight.  Instead you should set the accelerometer values through the configurator.

     To do it through the configurator do this:
       1. disconnect your battery on your arducopter
       2. connect your arducopter to your computer using the usb port
       3. make sure your arduCopter is sitting on a flat surface
       4. start up the configurator and select Connect
       5. select "Artificial Horizon" from the first drop down (if you roll/pitch the quad the values should change).  Put it back on a flat surface
       6. select "Calibration" from the 2nd drop down (on the far right at the top)
       7. change the Accelerometer Offset values and press the Update button until you get the artificial horizon level.  Use this basic guide:
       7a) if the artificial horizon is leaning right, reduce the RollAxis
       7b) if the artificial horizon is leaning left, increase the rollAxis
       7c) if the artificial horizon is pitching up,  increase the PitchAxis
       7d) if the artificial horizon is pitching down, decrease the PitchAxis

The Z axis is less important but if you want to set this perfectly, you should 
change the 1st drop down back to Flight Data.  then modify the Accelerometer 
Offsets Z-Axis value until the "Accel Z Axis" magnitude is the same when the 
quad is upside-down or right-side-up.  I.e. if it's 420 when it's 
right-side-up, you want it to be -420 when it's up-side-down.

good luck!

-Randy

Original comment by rmackay...@gmail.com on 31 Oct 2010 at 8:32

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Randy,

thank you for the reply, i tried your method but the problem is the sw will 
prompt me "update unsuccessfully Try again". IF i press yes the prompt will 
come out , if i press no, the acc roll and pitch will reset to 2040.\

Rgds
YueKhing

Original comment by tohyuekh...@gmail.com on 31 Oct 2010 at 2:02

Attachments:

GoogleCodeExporter commented 8 years ago
YueKhing,

     OK, I've heard of this type of issue if the user is using a computer where the decimal point is normally written as a comma (like french).  Presumably you're using an english computer and if it's windows can you check in your Control Panel under "Region and Language" and then hit the check under Regional Settings, look for the "Decimal Symbol".  On my Windows7 machine it's under "Formats", "Additional Settings", "Currency".

     I've reopened the issue.

-Randy

Original comment by rmackay...@gmail.com on 31 Oct 2010 at 2:21

GoogleCodeExporter commented 8 years ago
Hi randy,

I just check, it in decimal, i using windows 7 .  I also change my country from 
Singapore to USA ( i assume the you are from US), but it give me the same 
update error

Original comment by tohyuekh...@gmail.com on 31 Oct 2010 at 2:51

Attachments:

GoogleCodeExporter commented 8 years ago
YueKhing,

    Well, there are some other ways to update those values:

    Option #1 - using the Serial Monitor in the configurator:
       i. Open configurator attached to ArduCopter
       ii. go to Serial Monitor page (option in the 1st drop-down at the top)
       iii. type in I1659.0;1618.0;1673.0;2073.0;2056.0;2010.0 and push the send button
       iv. type in W and push send again
       v. restart configurator (or maybe just disconnect/connect) and check if the accelerometer offsets have been updated.

     What you're doing in step iii above is manually sending the gyro (roll, pitch, yaw) and accelerometer (x,y,z) offsets.  Then "W" writes everything to the EEPROM.

   Option #2 - change the defaults in the code and update the EEPROM
      a. Open Arduino IDE and open up the ArduCopter code
      b. switch to the UserConfig.h file
      c. search for acc_offset_x and change the value to what you want it to be
      d. do the same as (c) for acc_offset_y and acc_offset_z
      e. upload the code to arducopter
      f. run the configurator and select Initialise EEPROM.  Note: you will lose any other custom settings you've made but you should be able to update them again yourself.

    If the above works then it means there's some issue with the formatting of the messages that the configurator was sending to the arduCopter.  If it doesn't work then I need to think of something else.  Option #1 definitely should work though.

 -Randy

Original comment by rmackay...@gmail.com on 2 Nov 2010 at 12:41

GoogleCodeExporter commented 8 years ago
closing this 'cuz haven't heard anything back from YueKhing so I'm assuming 
he's ok.

Original comment by rmackay...@gmail.com on 8 Nov 2010 at 12:54

GoogleCodeExporter commented 8 years ago
Hi Randy,

Sorry for the late reply as i being busy with my work & have not being working 
on my quad, only option #2 work for me , option #1 cause the both roll and 
pitch to set to max value. My Quad is much stable now

Thank you very much
Rgds
YueKhing

Original comment by tohyuekh...@gmail.com on 13 Nov 2010 at 8:20

GoogleCodeExporter commented 8 years ago
Hi
I have a similar situation, have tried option 2 process and corrected to 0, 0, 
408 for x, y and z but the acc-roll and acc-pitch look like the attached. I 
have not connected RC or motors. Can you help?

Regards

Pete

Original comment by p.smith4...@gtempaccount.com on 20 Feb 2011 at 6:11

Attachments: