Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
searchwing-ardupilot-parameters [2020/02/28 14:11] wf68spef |
searchwing-ardupilot-parameters [2020/07/04 04:27] wf68spef |
||
---|---|---|---|
Line 65: | Line 65: | ||
|SR2_RC_CHAN |0 |0 Hz | | | |SR2_RC_CHAN |0 |0 Hz | | | ||
|SR2_RAW_CTRL |0 |0 Hz | | | |SR2_RAW_CTRL |0 |0 Hz | | | ||
- | |SR2_POSITION |1 |1 Hz | Contains GLOBAL_POSITION_INT, LOCAL_POSITION_NED messages | | + | |SR2_POSITION |2 |2 Hz | Contains GLOBAL_POSITION_INT, LOCAL_POSITION_NED messages | |
- | |SR2_EXTRA1 |1 |1 Hz | Contains ATTITUDE message | | + | |SR2_EXTRA1 |2 |2 Hz | Contains ATTITUDE message | |
|SR2_EXTRA2 |0 |0 Hz | | | |SR2_EXTRA2 |0 |0 Hz | | | ||
|SR2_EXTRA3 |1 |1 Hz | Contains SYSTEM_TIME message | | |SR2_EXTRA3 |1 |1 Hz | Contains SYSTEM_TIME message | | ||
Line 90: | Line 90: | ||
1 1 BATT_VOLT_PIN 2 2 | 1 1 BATT_VOLT_PIN 2 2 | ||
1 1 BATT_WATT_MAX 0 4 | 1 1 BATT_WATT_MAX 0 4 | ||
+ | | ||
+ | | ||
+ | ===== RPM ===== | ||
+ | |||
+ | To measure the RPM of the motor we can use a BACK-EMF Measurement from 2 of the 3 motorcables. For more info check out the page: | ||
+ | |||
+ | https://www.hobbywingdirect.com/products/rpm-sensor | ||
+ | |||
+ | We connected the output pins to a AUX pin of the FC. Check out the info from Ardupilot for some info regarding the following config: | ||
+ | |||
+ | https://ardupilot.org/copter/docs/common-rpm.html | ||
+ | |||
+ | |||
+ | ^Parametername ^Value ^Description ^Remark ^ | ||
+ | |RPM_MAX |100000.000000000000000000 | | | | ||
+ | |RPM_MIN |10.000000000000000000 | | | | ||
+ | |RPM_MIN_QUAL |0.100000001490116119 | | | | ||
+ | |RPM_PIN |Pin | PIN | depending on FC | | ||
+ | |RPM_SCALING |0.143 | | check the hints below for this setting | | ||
+ | |RPM_TYPE |2 | AUX | Type needs to be AUX to calc using the given sensor | | ||
+ | |||
+ | The RPM in general can be calculated using the formula from https://www.radiocontrolinfo.com/brushless-motor-efficiency/measuring-motor-rpm/ : | ||
+ | |||
+ | ''RPM = ( 120 x Frequency ) / # of Motor Poles'' | ||
+ | |||
+ | Thats because: | ||
+ | |||
+ | ''The AC current that is produced alternates each time 2 magnetic poles pass by a winding in the stator. | ||
+ | '' | ||
+ | |||
+ | As Ardupilot measures the periode duration ''dt_avg'' of the sensor rectangular signal, and calculates the RPM using | ||
+ | |||
+ | ''float rpm = scaling * (1.0e6 / dt_avg) * 60;'' | ||
+ | |||
+ | the scaling needs to correct this using | ||
+ | |||
+ | ''SCALING = ( 1 / # of Motor Poles ) * 2'' | ||
+ | |||
+ | For the Extron 800KV Motor , we have 14 Poles. | ||
===== Tuning ===== | ===== Tuning ===== |