rabno1

  • *
  • 34
Re: Revo AuxMag
« Reply #165 on: April 22, 2016, 02:12:10 am »
Quick update from me. Realized my outputs were set to PWMSync  :-[ 
I was using a imported .uav i had setup (and flew) using the Vehicle wizard.
TBH Im new to this and dont know what setting is right or not but it all works together when setting the outputs to PWM and 50Hz.
Ive got cheap (no doubt generic Chinese) 12or15A "simonK" ESCs.

f5soh

  • *****
  • 4549
    • LibrePilot
Re: Revo AuxMag
« Reply #166 on: April 22, 2016, 02:19:07 am »
Do not use output setting to 50Hz, this give bad stabilization results.
Try PWM-490Hz, well the higher you can...

rabno1

  • *
  • 34
Re: Revo AuxMag
« Reply #167 on: April 22, 2016, 02:37:00 am »
490Hz seems to work too. Ill try to get it flying tomorrow if the weather allows.

Re: Revo AuxMag
« Reply #168 on: April 22, 2016, 05:56:48 am »
Quick update from me. Realized my outputs were set to PWMSync  :-[ 
I was using a imported .uav i had setup (and flew) using the Vehicle wizard.
TBH Im new to this and dont know what setting is right or not but it all works together when setting the outputs to PWM and 50Hz.
Ive got cheap (no doubt generic Chinese) 12or15A "simonK" ESCs.

Rapid esc set on 400Hz

heubie

  • *
  • 22
Re: Revo AuxMag
« Reply #169 on: April 22, 2016, 09:09:59 am »
Sorry for the late reply (had some battery issues and lack of time...) but I finaly got to test the delay.

In the installed of the firmware the delay was already set to 8 so the first time the AuxMag worked.
I lowered it to 7 and it failed..... back to 8 -> OK.
Back to 7 -> OK (4 times in a row)
Then I stared from zero like mentioned in https://forum.librepilot.org/index.php?topic=1110.msg10186#msg10186

If the delay is 0 it still doesn't work (like expected)
From 1 on everything worked OK. Not one out of at least 15 failed.

I gues the one failing with 7 was a glitch....
Everthing is done without any calibration. I hope to do this this weekend.
I will unplug everything now and leave it that way untill tonight and do a fresh boot with setting to 1.
This to make sure any leftover voltage is drained from al the capacitors in the boards.

Jhinta

  • ***
  • 198
Re: Revo AuxMag
« Reply #170 on: April 22, 2016, 11:08:21 am »
f5soh could you give me a indication or patch file for delay ?
also does i2s inits before mainport?

f5soh

  • *****
  • 4549
    • LibrePilot
Re: Revo AuxMag
« Reply #171 on: April 22, 2016, 02:19:13 pm »
Mainport init is after flexiport init for Revo.

Code: [Select]
------------ flight/targets/boards/revolution/firmware/pios_board.c ------------
@@ -492,11 +497,18 @@ void PIOS_Board_Init(void)
         PIOS_Board_configure_com(&pios_usart_flexi_cfg, PIOS_COM_TELEM_RF_RX_BUF_LEN, PIOS_COM_TELEM_RF_TX_BUF_LEN, &pios_usart_com_driver, &pios_com_telem_rf_id);
         break;
     case HWSETTINGS_RM_FLEXIPORT_I2C:
+        // Add big delay for buggy I2C AuxMag chips: 4x50ms=200ms
+        for (uint8_t i = 0; i < 4; ++i) {
+#ifdef PIOS_INCLUDE_WDG
+            PIOS_WDG_Clear();
+#endif /* PIOS_INCLUDE_WDG */
+            PIOS_DELAY_WaitmS(50);
+        }

Jhinta

  • ***
  • 198
Re: Revo AuxMag
« Reply #172 on: April 22, 2016, 06:20:35 pm »
So what if we init main first what will happen ?

Verstuurd vanaf mijn LG-D855 met Tapatalk


Jhinta

  • ***
  • 198
Re: Revo AuxMag
« Reply #173 on: April 22, 2016, 06:24:01 pm »
Will test power swap on main and flex for gps see what it does

Verstuurd vanaf mijn LG-D855 met Tapatalk


Jhinta

  • ***
  • 198
Re: Revo AuxMag
« Reply #174 on: April 22, 2016, 06:43:29 pm »
Intresting. Power swap made it possible to have 4 (but esc dont arm 3 does arm but yellow)

Verstuurd vanaf mijn LG-D855 met Tapatalk


f5soh

  • *****
  • 4549
    • LibrePilot
Re: Revo AuxMag
« Reply #175 on: April 22, 2016, 06:56:15 pm »
Can be an interesting way put Flexi in last position.
But this maybe made the delay dependent on others port configuration.
example:
Mainport as telemetry / i2c ok
MainPort disabled / I2c not ok

rabno1

  • *
  • 34
Re: Revo AuxMag
« Reply #176 on: April 25, 2016, 01:06:48 am »
Sorry to be a pain in the ass noob but can someone tell me what i need to edit to add the I2C delay? Im trying to use another branch (autotune) and it doesnt have the delay built in i need for my external mag to work.

f5soh

  • *****
  • 4549
    • LibrePilot
Re: Revo AuxMag
« Reply #177 on: April 25, 2016, 01:25:01 am »

rabno1

  • *
  • 34
Re: Revo AuxMag
« Reply #178 on: April 25, 2016, 01:45:42 am »
thanks again

rsk

  • *
  • 12
Re: Revo AuxMag
« Reply #179 on: May 04, 2016, 04:00:27 pm »
Hi guys,

I have been trying out auxmag (I2C) and can report the following:

Configuration:
- Revo Nano
- 250 frame
- PWM Futaba receiver
- Rctimer NEO-7M GPS & MAG V2.0 (UBX & I2C)

Operation:
- GPS health: green
- Homeposition: set
- I2C health: green
- MAG: health: black (in complementary mode) green (In INS13 mode)
- I get regular updates of data on settings/data objects/auxmagsensor
- for my configuration pitch=180; roll=0; yaw=0
- I have only been able to get a good calibration once; calibration normally fails. When calibration succeeded, AuxMagSettings/mag_bias was very high ~10000 and mag_transform values were very low ~0.05
- All stab and atti health indicators are green, but stabilizatrion engine is not really working. AI is all over the place and compass does not show correct bearing.
- Randomly (I cannot link it to any particular event), settings/data objects/auxmagsensor stops beeing refreshed and Auxmagsensor tab shows no change whatsoever and health indicators stay green no matter what I do
- Only way to get it back is to reboot nano controller.

Any ideas?

Thanks.