10-Nov-2020, 06:29 AM (This post was last modified: 10-Nov-2020, 07:23 AM by clone2002.)
I'm running Betaflight 4.2 on a Succex D F7 Twing on a new BNF quad i bought. I wanted to add a GPS unit and got the Beitan 880 that has a built in compass/magnetometer.
I wired up the 5v, GND, RX, and TX yesterday to get the GPS working and it works perfectly works perfectly. However, today I tried to get the magnetometer working as well and connected the SDA/SCL to UART RX/TX and set the I2C settings to those pins.
I have SCOURED the internet all day and have tried everything I could but cannot seem to understand how to get Betaflight to recognize the magnetometer. I'm sharing my diff all below and I've read people mentioning something about clock rates for the I2C being too fast in betaflight but have no idea how to edit that (I'm on a MAC, in case that has an impact).
Please help! I'm pretty sure the magnetometer is not needed by the way, and RTH will work with just the GPS, but now I NEED to solve this. :-)
Let me know what else would help. Note on the MAG settings below, I've tried several settings at this point, the CLI bellow is basically the point where I gave up to ask for help.
See Diff all here:
Code:
#
# diff all ###WARNING: NO CUSTOM DEFAULTS FOUND###
# version # Betaflight / STM32F7X2 (S7X2) 4.2.0 Jun 14 2020 / 03:05:26 (8f2d21460) MSP API: 1.43 ###ERROR: diff: NO CONFIG FOUND### # start the command batch batch start
# reset configuration to default settings defaults nosave
# serial serial 0 64 115200 57600 0 115200 serial 1 1 115200 57600 0 115200 serial 3 2 115200 38400 0 115200
# aux aux 0 0 0 1700 2100 0 0 aux 1 1 1 900 1225 0 0 aux 2 2 1 1300 1700 0 0 aux 3 46 3 1800 2100 0 0 aux 4 13 2 1825 2100 0 0 aux 5 28 1 1300 2100 0 0
# adjrange adjrange 0 0 3 900 1675 12 3 0 0
# vtxtable vtxtable bands 6 vtxtable channels 8 vtxtable band 1 BOSCAM_A A CUSTOM 5865 5845 5825 5805 5785 5765 5745 5725 vtxtable band 2 BOSCAM_B B CUSTOM 5733 5752 5771 5790 5809 5828 5847 5866 vtxtable band 3 BOSCAM_E E CUSTOM 5705 5685 5665 5645 5885 5905 5925 5945 vtxtable band 4 FATSHARK F CUSTOM 5740 5760 5780 5800 5820 5840 5860 5880 vtxtable band 5 RACEBAND R CUSTOM 5658 5695 5732 5769 5806 5843 5880 5917 vtxtable band 6 BAND_D D CUSTOM 5362 5399 5436 5473 5510 5547 5584 5621 vtxtable powerlevels 5 vtxtable powervalues 25 100 200 400 600 vtxtable powerlabels 25 100 200 400 600
# master set gyro_lowpass2_hz = 325 set gyro_to_use = BOTH set dyn_notch_width_percent = 0 set dyn_notch_q = 250 set dyn_notch_min_hz = 90 set dyn_notch_max_hz = 350 set dyn_lpf_gyro_min_hz = 260 set dyn_lpf_gyro_max_hz = 650 set acc_trim_pitch = 2 set acc_trim_roll = 2 set acc_calibration = -13,-64,-28,1 set mag_align_yaw = 1800 set mag_bustype = I2C set mag_i2c_device = 1 set mag_i2c_address = 60 set mag_hardware = HMC5883 set baro_bustype = I2C set baro_i2c_device = 2 set baro_hardware = NONE set min_check = 1000 set max_check = 2000 set serialrx_provider = CRSF set adc_device = 3 set blackbox_device = SPIFLASH set dshot_idle_value = 500 set dshot_burst = ON set dshot_bidir = ON set motor_pwm_protocol = DSHOT600 set motor_poles = 12 set failsafe_delay = 8 set failsafe_procedure = GPS-RESCUE set vbat_max_cell_voltage = 450 set vbat_min_cell_voltage = 310 set vbat_warning_cell_voltage = 320 set current_meter = ADC set battery_meter = ADC set ibata_scale = 100 set beeper_inversion = ON set beeper_od = OFF set yaw_motors_reversed = ON set small_angle = 180 set gps_provider = UBLOX set gps_sbas_mode = AUTO set gps_ublox_use_galileo = ON set gps_rescue_descent_dist = 50 set gps_rescue_min_sats = 5 set gps_rescue_min_dth = 60 set osd_vbat_pos = 374 set osd_rssi_pos = 2474 set osd_tim_1_pos = 503 set osd_tim_2_pos = 2369 set osd_flymode_pos = 2112 set osd_current_pos = 321 set osd_mah_drawn_pos = 357 set osd_craft_name_pos = 2539 set osd_gps_speed_pos = 2487 set osd_gps_sats_pos = 2337 set osd_home_dir_pos = 2472 set osd_flight_dist_pos = 2433 set osd_altitude_pos = 2478 set osd_warnings_pos = 14602 set osd_avg_cell_voltage_pos = 2465 set osd_rate_profile_name_pos = 2144 set debug_mode = GYRO_SCALED set max7456_spi_bus = 2 set dashboard_i2c_bus = 1 set pinio_config = 129,1,1,1 set pinio_box = 0,255,255,255 set flash_spi_bus = 3 set gyro_1_bustype = SPI set gyro_1_spibus = 1 set gyro_2_spibus = 1 set gyro_2_sensor_align = CW90 set gyro_2_align_yaw = 900 set name = Titan H3
profile 0
# profile 0 set dyn_lpf_dterm_min_hz = 91 set dyn_lpf_dterm_max_hz = 221 set dterm_lowpass2_hz = 195 set vbat_pid_gain = ON set anti_gravity_gain = 5000 set iterm_relax_cutoff = 20 set throttle_boost = 10 set p_pitch = 51 set d_pitch = 45 set f_pitch = 114 set p_roll = 46 set d_roll = 45 set f_roll = 108 set p_yaw = 50 set f_yaw = 108 set d_min_boost_gain = 30
profile 1
profile 2
# restore original profile selection profile 0
rateprofile 0
# rateprofile 0 set thr_expo = 50 set roll_rc_rate = 75 set pitch_rc_rate = 75 set yaw_rc_rate = 75 set roll_expo = 50 set pitch_expo = 50 set yaw_expo = 20 set tpa_rate = 56 set tpa_breakpoint = 1650
rateprofile 1
# rateprofile 1 set roll_expo = 20 set pitch_expo = 20 set yaw_expo = 20 set tpa_breakpoint = 1500
rateprofile 2
rateprofile 3
rateprofile 4
rateprofile 5
# restore original rateprofile selection rateprofile 0
You can't just connect SDA and SCL connections from the GPS unit to a UART. You need to remap I2C resources to pins on the MCU which have breakout pads, but you can't just remap any pins to I2C. Only certain pins on the MCU support I2C functions.
First of all we need a full Betaflight "dump". A "diff all" doesn't give us all of the information we need.
Next we need a list of what UARTs and other pads on the FC you are already using. Some photos might also help us to identify those.
Once we have that info we can then advise what remappings are possible to get an I2C input working on the FC for the magnetometer.
10-Nov-2020, 05:22 PM (This post was last modified: 10-Nov-2020, 05:28 PM by clone2002.)
Hi SnowLeopardFPV,
Thanks for offering to help. I thought I had remapped it to the right ones, but good chance I am totally wrong! So I'm posting the following: 1. Link to, and photo of, the GPS/Magnetometer unit 2. Full dump from my betaflight 3. Photos of the FC board and the schematic that came with it.
I think that's all of it, but do let me know if you need anything else and thank you again!
# serial serial 20 1 115200 57600 0 115200 serial 0 64 115200 57600 0 115200 serial 1 1 115200 57600 0 115200 serial 3 2 115200 38400 0 115200 serial 4 0 115200 57600 0 115200
# led led 0 0,0::C:0 led 1 0,0::C:0 led 2 0,0::C:0 led 3 0,0::C:0 led 4 0,0::C:0 led 5 0,0::C:0 led 6 0,0::C:0 led 7 0,0::C:0 led 8 0,0::C:0 led 9 0,0::C:0 led 10 0,0::C:0 led 11 0,0::C:0 led 12 0,0::C:0 led 13 0,0::C:0 led 14 0,0::C:0 led 15 0,0::C:0 led 16 0,0::C:0 led 17 0,0::C:0 led 18 0,0::C:0 led 19 0,0::C:0 led 20 0,0::C:0 led 21 0,0::C:0 led 22 0,0::C:0 led 23 0,0::C:0 led 24 0,0::C:0 led 25 0,0::C:0 led 26 0,0::C:0 led 27 0,0::C:0 led 28 0,0::C:0 led 29 0,0::C:0 led 30 0,0::C:0 led 31 0,0::C:0
# color color 0 0,0,0 color 1 0,255,255 color 2 0,0,255 color 3 30,0,255 color 4 60,0,255 color 5 90,0,255 color 6 120,0,255 color 7 150,0,255 color 8 180,0,255 color 9 210,0,255 color 10 240,0,255 color 11 270,0,255 color 12 300,0,255 color 13 330,0,255 color 14 0,0,0 color 15 0,0,0
# rxfail rxfail 0 a rxfail 1 a rxfail 2 a rxfail 3 a rxfail 4 h rxfail 5 h rxfail 6 h rxfail 7 h rxfail 8 h rxfail 9 h rxfail 10 h rxfail 11 h rxfail 12 h rxfail 13 h rxfail 14 h rxfail 15 h rxfail 16 h rxfail 17 h
# master set gyro_hardware_lpf = NORMAL set gyro_lowpass_type = PT1 set gyro_lowpass_hz = 200 set gyro_lowpass2_type = PT1 set gyro_lowpass2_hz = 325 set gyro_notch1_hz = 0 set gyro_notch1_cutoff = 0 set gyro_notch2_hz = 0 set gyro_notch2_cutoff = 0 set gyro_calib_duration = 125 set gyro_calib_noise_limit = 48 set gyro_offset_yaw = 0 set gyro_overflow_detect = ALL set yaw_spin_recovery = AUTO set yaw_spin_threshold = 1950 set gyro_to_use = BOTH set dyn_notch_width_percent = 0 set dyn_notch_q = 250 set dyn_notch_min_hz = 90 set dyn_notch_max_hz = 350 set dyn_lpf_gyro_min_hz = 260 set dyn_lpf_gyro_max_hz = 650 set gyro_filter_debug_axis = ROLL set acc_hardware = AUTO set acc_lpf_hz = 10 set acc_trim_pitch = 2 set acc_trim_roll = 2 set acc_calibration = -13,-64,-28,1 set align_mag = DEFAULT set mag_align_roll = 0 set mag_align_pitch = 0 set mag_align_yaw = 1800 set mag_bustype = I2C set mag_i2c_device = 2 set mag_i2c_address = 0 set mag_spi_device = 0 set mag_hardware = HMC5883 set mag_declination = 0 set mag_calibration = 0,0,0 set baro_bustype = NONE set baro_spi_device = 0 set baro_i2c_device = 0 set baro_i2c_address = 0 set baro_hardware = NONE set baro_tab_size = 21 set baro_noise_lpf = 600 set baro_cf_vel = 985 set mid_rc = 1500 set min_check = 1000 set max_check = 2000 set rssi_channel = 0 set rssi_src_frame_errors = OFF set rssi_scale = 100 set rssi_offset = 0 set rssi_invert = OFF set rssi_src_frame_lpf_period = 30 set rc_interp = AUTO set rc_interp_ch = RPYT set rc_interp_int = 19 set rc_smoothing_type = FILTER set rc_smoothing_input_hz = 0 set rc_smoothing_derivative_hz = 0 set rc_smoothing_debug_axis = ROLL set rc_smoothing_input_type = BIQUAD set rc_smoothing_derivative_type = AUTO set rc_smoothing_auto_smoothness = 10 set fpv_mix_degrees = 0 set max_aux_channels = 14 set serialrx_provider = CRSF set serialrx_inverted = OFF set spektrum_sat_bind = 0 set spektrum_sat_bind_autoreset = ON set srxl2_unit_id = 1 set srxl2_baud_fast = ON set sbus_baud_fast = OFF set crsf_use_rx_snr = OFF set airmode_start_throttle_percent = 25 set rx_min_usec = 885 set rx_max_usec = 2115 set serialrx_halfduplex = OFF set rx_spi_protocol = V202_250K set rx_spi_bus = 0 set rx_spi_led_inversion = OFF set adc_device = 3 set adc_vrefint_calibration = 0 set adc_tempsensor_calibration30 = 0 set adc_tempsensor_calibration110 = 0 set input_filtering_mode = OFF set blackbox_p_ratio = 32 set blackbox_device = SPIFLASH set blackbox_record_acc = ON set blackbox_mode = NORMAL set min_throttle = 1070 set max_throttle = 2000 set min_command = 1000 set dshot_idle_value = 500 set dshot_burst = ON set dshot_bidir = ON set dshot_bitbang = AUTO set dshot_bitbang_timer = AUTO set use_unsynced_pwm = OFF set motor_pwm_protocol = DSHOT600 set motor_pwm_rate = 480 set motor_pwm_inversion = OFF set motor_poles = 12 set thr_corr_value = 0 set thr_corr_angle = 800 set failsafe_delay = 8 set failsafe_off_delay = 10 set failsafe_throttle = 1000 set failsafe_switch_mode = STAGE1 set failsafe_throttle_low_delay = 100 set failsafe_procedure = GPS-RESCUE set failsafe_recovery_delay = 20 set failsafe_stick_threshold = 30 set align_board_roll = 0 set align_board_pitch = 0 set align_board_yaw = 0 set gimbal_mode = NORMAL set bat_capacity = 0 set vbat_max_cell_voltage = 450 set vbat_full_cell_voltage = 410 set vbat_min_cell_voltage = 310 set vbat_warning_cell_voltage = 320 set vbat_hysteresis = 1 set current_meter = ADC set battery_meter = ADC set vbat_detect_cell_voltage = 300 set use_vbat_alerts = ON set use_cbat_alerts = OFF set cbat_alert_percent = 10 set vbat_cutoff_percent = 100 set force_battery_cell_count = 0 set vbat_display_lpf_period = 30 set vbat_sag_lpf_period = 2 set ibat_lpf_period = 10 set vbat_duration_for_warning = 0 set vbat_duration_for_critical = 0 set vbat_scale = 110 set vbat_divider = 10 set vbat_multiplier = 1 set ibata_scale = 100 set ibata_offset = 0 set ibatv_scale = 0 set ibatv_offset = 0 set beeper_inversion = ON set beeper_od = OFF set beeper_frequency = 0 set beeper_dshot_beacon_tone = 1 set yaw_motors_reversed = ON set crashflip_motor_percent = 0 set crashflip_expo = 35 set 3d_deadband_low = 1406 set 3d_deadband_high = 1514 set 3d_neutral = 1460 set 3d_deadband_throttle = 50 set 3d_limit_low = 1000 set 3d_limit_high = 2000 set 3d_switched_mode = OFF set servo_center_pulse = 1500 set servo_pwm_rate = 50 set servo_lowpass_hz = 0 set tri_unarmed_servo = ON set channel_forwarding_start = 4 set reboot_character = 82 set serial_update_rate_hz = 100 set imu_dcm_kp = 2500 set imu_dcm_ki = 0 set small_angle = 180 set auto_disarm_delay = 5 set gyro_cal_on_first_arm = OFF set gps_provider = UBLOX set gps_sbas_mode = AUTO set gps_sbas_integrity = OFF set gps_auto_config = ON set gps_auto_baud = OFF set gps_ublox_use_galileo = ON set gps_ublox_mode = AIRBORNE set gps_set_home_point_once = OFF set gps_use_3d_speed = OFF set gps_rescue_angle = 32 set gps_rescue_initial_alt = 50 set gps_rescue_descent_dist = 50 set gps_rescue_landing_alt = 5 set gps_rescue_landing_dist = 10 set gps_rescue_ground_speed = 2000 set gps_rescue_throttle_p = 150 set gps_rescue_throttle_i = 20 set gps_rescue_throttle_d = 50 set gps_rescue_velocity_p = 80 set gps_rescue_velocity_i = 20 set gps_rescue_velocity_d = 15 set gps_rescue_yaw_p = 40 set gps_rescue_throttle_min = 1100 set gps_rescue_throttle_max = 1600 set gps_rescue_ascend_rate = 500 set gps_rescue_descend_rate = 150 set gps_rescue_throttle_hover = 1280 set gps_rescue_sanity_checks = RESCUE_SANITY_ON set gps_rescue_min_sats = 5 set gps_rescue_min_dth = 60 set gps_rescue_allow_arming_without_fix = OFF set gps_rescue_alt_mode = MAX_ALT set gps_rescue_use_mag = ON set deadband = 0 set yaw_deadband = 0 set yaw_control_reversed = OFF set pid_process_denom = 1 set runaway_takeoff_prevention = ON set runaway_takeoff_deactivate_delay = 500 set runaway_takeoff_deactivate_throttle_percent = 20 set thrust_linear = 0 set transient_throttle_limit = 0 set tlm_inverted = OFF set tlm_halfduplex = ON set frsky_default_lat = 0 set frsky_default_long = 0 set frsky_gps_format = 0 set frsky_unit = IMPERIAL set frsky_vfas_precision = 0 set hott_alarm_int = 5 set pid_in_tlm = OFF set report_cell_voltage = OFF set ibus_sensor = 1,2,3,0,0,0,0,0,0,0,0,0,0,0,0 set mavlink_mah_as_heading_divisor = 0 set telemetry_disabled_voltage = OFF set telemetry_disabled_current = OFF set telemetry_disabled_fuel = OFF set telemetry_disabled_mode = OFF set telemetry_disabled_acc_x = OFF set telemetry_disabled_acc_y = OFF set telemetry_disabled_acc_z = OFF set telemetry_disabled_pitch = OFF set telemetry_disabled_roll = OFF set telemetry_disabled_heading = OFF set telemetry_disabled_altitude = OFF set telemetry_disabled_vario = OFF set telemetry_disabled_lat_long = OFF set telemetry_disabled_ground_speed = OFF set telemetry_disabled_distance = OFF set telemetry_disabled_esc_current = ON set telemetry_disabled_esc_voltage = ON set telemetry_disabled_esc_rpm = ON set telemetry_disabled_esc_temperature = ON set telemetry_disabled_temperature = OFF set ledstrip_visual_beeper = OFF set ledstrip_visual_beeper_color = WHITE set ledstrip_grb_rgb = GRB set ledstrip_profile = STATUS set ledstrip_race_color = ORANGE set ledstrip_beacon_color = WHITE set ledstrip_beacon_period_ms = 500 set ledstrip_beacon_percent = 50 set ledstrip_beacon_armed_only = OFF set sdcard_detect_inverted = OFF set sdcard_mode = OFF set sdcard_dma = OFF set sdcard_spi_bus = 0 set sdio_clk_bypass = OFF set sdio_use_cache = OFF set sdio_use_4bit_width = OFF set osd_units = METRIC set osd_warn_arming_disable = ON set osd_warn_batt_not_full = ON set osd_warn_batt_warning = ON set osd_warn_batt_critical = ON set osd_warn_visual_beeper = ON set osd_warn_crash_flip = ON set osd_warn_esc_fail = ON set osd_warn_core_temp = ON set osd_warn_rc_smoothing = ON set osd_warn_fail_safe = ON set osd_warn_launch_control = ON set osd_warn_no_gps_rescue = ON set osd_warn_gps_rescue_disabled = ON set osd_warn_rssi = OFF set osd_warn_link_quality = OFF set osd_warn_over_cap = OFF set osd_rssi_alarm = 20 set osd_link_quality_alarm = 80 set osd_rssi_dbm_alarm = -60 set osd_cap_alarm = 2200 set osd_alt_alarm = 100 set osd_distance_alarm = 0 set osd_esc_temp_alarm = -128 set osd_esc_rpm_alarm = -1 set osd_esc_current_alarm = -1 set osd_core_temp_alarm = 70 set osd_ah_max_pit = 20 set osd_ah_max_rol = 40 set osd_ah_invert = OFF set osd_logo_on_arming = OFF set osd_logo_on_arming_duration = 5 set osd_tim1 = 2560 set osd_tim2 = 2561 set osd_vbat_pos = 374 set osd_rssi_pos = 2474 set osd_link_quality_pos = 234 set osd_rssi_dbm_pos = 234 set osd_tim_1_pos = 503 set osd_tim_2_pos = 2369 set osd_remaining_time_estimate_pos = 234 set osd_flymode_pos = 2112 set osd_anti_gravity_pos = 234 set osd_g_force_pos = 234 set osd_throttle_pos = 234 set osd_vtx_channel_pos = 234 set osd_crosshairs_pos = 205 set osd_ah_sbar_pos = 206 set osd_ah_pos = 78 set osd_current_pos = 321 set osd_mah_drawn_pos = 357 set osd_motor_diag_pos = 234 set osd_craft_name_pos = 2539 set osd_display_name_pos = 234 set osd_gps_speed_pos = 2487 set osd_gps_lon_pos = 234 set osd_gps_lat_pos = 234 set osd_gps_sats_pos = 2337 set osd_home_dir_pos = 2472 set osd_home_dist_pos = 234 set osd_flight_dist_pos = 2433 set osd_compass_bar_pos = 234 set osd_altitude_pos = 2478 set osd_pid_roll_pos = 234 set osd_pid_pitch_pos = 234 set osd_pid_yaw_pos = 234 set osd_debug_pos = 234 set osd_power_pos = 234 set osd_pidrate_profile_pos = 234 set osd_warnings_pos = 14602 set osd_avg_cell_voltage_pos = 2465 set osd_pit_ang_pos = 234 set osd_rol_ang_pos = 234 set osd_battery_usage_pos = 234 set osd_disarmed_pos = 234 set osd_nheading_pos = 234 set osd_nvario_pos = 234 set osd_esc_tmp_pos = 234 set osd_esc_rpm_pos = 234 set osd_esc_rpm_freq_pos = 234 set osd_rtc_date_time_pos = 234 set osd_adjustment_range_pos = 234 set osd_flip_arrow_pos = 234 set osd_core_temp_pos = 234 set osd_log_status_pos = 234 set osd_stick_overlay_left_pos = 234 set osd_stick_overlay_right_pos = 234 set osd_stick_overlay_radio_mode = 2 set osd_rate_profile_name_pos = 2144 set osd_pid_profile_name_pos = 234 set osd_profile_name_pos = 234 set osd_rcchannels_pos = 234 set osd_camera_frame_pos = 35 set osd_efficiency_pos = 234 set osd_stat_rtc_date_time = OFF set osd_stat_tim_1 = OFF set osd_stat_tim_2 = ON set osd_stat_max_spd = ON set osd_stat_max_dist = OFF set osd_stat_min_batt = ON set osd_stat_endbatt = OFF set osd_stat_battery = OFF set osd_stat_min_rssi = ON set osd_stat_max_curr = ON set osd_stat_used_mah = ON set osd_stat_max_alt = OFF set osd_stat_bbox = ON set osd_stat_bb_no = ON set osd_stat_max_g_force = OFF set osd_stat_max_esc_temp = OFF set osd_stat_max_esc_rpm = OFF set osd_stat_min_link_quality = OFF set osd_stat_flight_dist = OFF set osd_stat_max_fft = OFF set osd_stat_total_flights = OFF set osd_stat_total_time = OFF set osd_stat_total_dist = OFF set osd_stat_min_rssi_dbm = OFF set osd_profile = 1 set osd_profile_1_name = - set osd_profile_2_name = - set osd_profile_3_name = - set osd_gps_sats_show_hdop = OFF set osd_displayport_device = AUTO set osd_rcchannels = -1,-1,-1,-1 set osd_camera_frame_width = 24 set osd_camera_frame_height = 11 set task_statistics = ON set debug_mode = GYRO_SCALED set rate_6pos_switch = OFF set cpu_overclock = OFF set pwr_on_arm_grace = 5 set scheduler_optimize_rate = AUTO set enable_stick_arming = OFF set vtx_band = 0 set vtx_channel = 0 set vtx_power = 0 set vtx_low_power_disarm = OFF set vtx_freq = 0 set vtx_pit_mode_freq = 0 set vtx_halfduplex = ON set vtx_spi_bus = 0 set vcd_video_system = AUTO set vcd_h_offset = 0 set vcd_v_offset = 0 set max7456_clock = DEFAULT set max7456_spi_bus = 2 set max7456_preinit_opu = OFF set displayport_msp_col_adjust = 0 set displayport_msp_row_adjust = 0 set displayport_msp_serial = 0 set displayport_msp_attrs = 0,0,0,0 set displayport_msp_use_device_blink = OFF set displayport_max7456_col_adjust = 0 set displayport_max7456_row_adjust = 0 set displayport_max7456_inv = OFF set displayport_max7456_blk = 0 set displayport_max7456_wht = 2 set esc_sensor_halfduplex = OFF set esc_sensor_current_offset = 0 set frsky_spi_autobind = OFF set frsky_spi_tx_id = 0,0 set frsky_spi_offset = 0 set frsky_spi_bind_hop_data = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 set frsky_x_rx_num = 0 set frsky_spi_a1_source = VBAT set cc2500_spi_chip_detect = ON set led_inversion = 0 set dashboard_i2c_bus = 1 set dashboard_i2c_addr = 60 set camera_control_mode = HARDWARE_PWM set camera_control_ref_voltage = 330 set camera_control_key_delay = 180 set camera_control_internal_resistance = 470 set camera_control_button_resistance = 450,270,150,68,0 set camera_control_inverted = OFF set rangefinder_hardware = NONE set pinio_config = 129,1,1,1 set pinio_box = 0,255,255,255 set usb_hid_cdc = OFF set usb_msc_pin_pullup = ON set flash_spi_bus = 3 set rcdevice_init_dev_attempts = 6 set rcdevice_init_dev_attempt_interval = 1000 set rcdevice_protocol_version = 0 set rcdevice_feature = 0 set gyro_1_bustype = SPI set gyro_1_spibus = 1 set gyro_1_i2cBus = 0 set gyro_1_i2c_address = 0 set gyro_1_sensor_align = CW0 set gyro_1_align_roll = 0 set gyro_1_align_pitch = 0 set gyro_1_align_yaw = 0 set gyro_2_bustype = SPI set gyro_2_spibus = 1 set gyro_2_i2cBus = 0 set gyro_2_i2c_address = 0 set gyro_2_sensor_align = CW90 set gyro_2_align_roll = 0 set gyro_2_align_pitch = 0 set gyro_2_align_yaw = 900 set i2c1_pullup = OFF set i2c1_overclock = ON set i2c2_pullup = OFF set i2c2_overclock = ON set i2c3_pullup = OFF set i2c3_overclock = ON set mco2_on_pc9 = OFF set timezone_offset_minutes = 0 set gyro_rpm_notch_harmonics = 3 set gyro_rpm_notch_q = 500 set gyro_rpm_notch_min = 100 set dterm_rpm_notch_harmonics = 0 set dterm_rpm_notch_q = 500 set dterm_rpm_notch_min = 100 set rpm_notch_lpf = 150 set flysky_spi_tx_id = 0 set flysky_spi_rf_channels = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 set stats = OFF set stats_total_flights = 0 set stats_total_time_s = 0 set stats_total_dist_m = 0 set name = Titan H3 set display_name = - set position_alt_source = DEFAULT set box_user_1_name = - set box_user_2_name = - set box_user_3_name = - set box_user_4_name = -
profile 0
# profile 0 set profile_name = - set dyn_lpf_dterm_min_hz = 91 set dyn_lpf_dterm_max_hz = 221 set dyn_lpf_dterm_curve_expo = 5 set dterm_lowpass_type = PT1 set dterm_lowpass_hz = 150 set dterm_lowpass2_type = PT1 set dterm_lowpass2_hz = 195 set dterm_notch_hz = 0 set dterm_notch_cutoff = 0 set vbat_pid_gain = ON set vbat_sag_compensation = 0 set pid_at_min_throttle = ON set anti_gravity_mode = SMOOTH set anti_gravity_threshold = 250 set anti_gravity_gain = 5000 set feedforward_transition = 0 set acc_limit_yaw = 0 set acc_limit = 0 set crash_dthreshold = 50 set crash_gthreshold = 400 set crash_setpoint_threshold = 350 set crash_time = 500 set crash_delay = 0 set crash_recovery_angle = 10 set crash_recovery_rate = 100 set crash_limit_yaw = 200 set crash_recovery = OFF set iterm_rotation = OFF set iterm_relax = RP set iterm_relax_type = SETPOINT set iterm_relax_cutoff = 20 set iterm_windup = 100 set iterm_limit = 400 set pidsum_limit = 500 set pidsum_limit_yaw = 400 set yaw_lowpass_hz = 0 set throttle_boost = 10 set throttle_boost_cutoff = 15 set acro_trainer_angle_limit = 20 set acro_trainer_lookahead_ms = 50 set acro_trainer_debug_axis = ROLL set acro_trainer_gain = 75 set p_pitch = 51 set i_pitch = 90 set d_pitch = 45 set f_pitch = 114 set p_roll = 46 set i_roll = 85 set d_roll = 45 set f_roll = 108 set p_yaw = 50 set i_yaw = 90 set d_yaw = 0 set f_yaw = 108 set angle_level_strength = 50 set horizon_level_strength = 50 set horizon_transition = 75 set level_limit = 55 set horizon_tilt_effect = 75 set horizon_tilt_expert_mode = OFF set abs_control_gain = 0 set abs_control_limit = 90 set abs_control_error_limit = 20 set abs_control_cutoff = 11 set use_integrated_yaw = OFF set integrated_yaw_relax = 200 set d_min_roll = 23 set d_min_pitch = 25 set d_min_yaw = 0 set d_min_boost_gain = 30 set d_min_advance = 20 set motor_output_limit = 100 set auto_profile_cell_count = 0 set launch_control_mode = NORMAL set launch_trigger_allow_reset = ON set launch_trigger_throttle_percent = 20 set launch_angle_limit = 0 set launch_control_gain = 40 set ff_interpolate_sp = AVERAGED_2 set ff_spike_limit = 60 set ff_max_rate_limit = 100 set ff_smooth_factor = 37 set ff_boost = 15 set idle_min_rpm = 0 set idle_adjustment_speed = 50 set idle_p = 50 set idle_pid_limit = 200 set idle_max_increase = 150 set level_race_mode = OFF
rateprofile 0
# rateprofile 0 set rateprofile_name = - set thr_mid = 50 set thr_expo = 50 set rates_type = BETAFLIGHT set roll_rc_rate = 75 set pitch_rc_rate = 75 set yaw_rc_rate = 75 set roll_expo = 50 set pitch_expo = 50 set yaw_expo = 20 set roll_srate = 70 set pitch_srate = 70 set yaw_srate = 70 set tpa_rate = 56 set tpa_breakpoint = 1650 set tpa_mode = D set throttle_limit_type = OFF set throttle_limit_percent = 100 set roll_rate_limit = 1998 set pitch_rate_limit = 1998 set yaw_rate_limit = 1998
# end the command batch batch end
#
3. Pictures of the FC board and the schematic that came with it. a. stock image
b. schematic
c. Photos of my actual board (before adding GPS/magnetometer and after) - pardon my soldering skills :-)
Thank you, so that's what I had already done. I soldered SCL to Tx3, and SDA to Rx3. I think if you look at my dump, it should show serialTX/serialRX are both none, and ic2_scl 2 is B10 and ic2_sda 2 is B11... I also had run the other commands but it didn't work.
I just re-checked settings too and changed hardware to auto, etc to be in line with your code.
I'm getting I2C error 6 in betaflight, not sure if that helps diagnose?
Is there a chance it's a mechanical error or solder / wires are touching? Again the GPS unit works perfectly, it's just the magnetometer that doesn't.
10-Nov-2020, 09:28 PM (This post was last modified: 10-Nov-2020, 09:28 PM by clone2002.)
Ok, FIXED!! And i got the answer to my question above. :-) My soldering must have been off, I desoldered the SCL and SDA, cleaned up the board a bit to make sure all the margins were clear, then desoldered them to same pads as before, but must have been more accurate. Magnetometer fired right up when I turned it on.
Thank you for the help SnowLeopard, you reinforced that I must have some other problem, because I'd done exactly what you said.
No problem I'm glad you got it sorted. While we can check configuration and wiring remotely via files and photos, any quality issues with the soldering is one thing that we can't really verify or do much about, so we have to rely and trust the OP to check that side of things.
Operator error indeed I'm new(er) to drones (have flown RC helicopters, bashed with cars, etc.) but am loving this hobby and trying to get better at the electronic parts that are required, good learning and thankfully didn't (yet) fry the FC!
Will make sure my calibrations are correct and take it out when the snow melts (in Denver, luckily the next few days are 50s, and 60s Fahrenheit and sunny). Thank you again!
Another question on this, trying to set the alignment of the magnetometer.
I have it tilted back about 30 degrees, hanging off the back of the drone. And it is with the antenna patch up and connector pointing forward. I read elsewhere that 0 setting would be connectors pointing left, so connectors forward would be 90 degrees. And that i have to set it to flip when the patch points up (since the magnetometer is mounted on back of the GPS unit). So currently I have it at CW 90FLIP. HOWEVER, I'm wondering if it's also slightly tilted back 30 degrees, do i need to adjust mag_align_roll or mag_align_pitch to account for that? and at that point, is that relative to the new setting or technically relative to the initial setting? (which I think would be ROLL)?
Last question, I read somewhere else that the settings are relative to the FC. In my settings on BF, I see that gyro_1_sensor_align = 0 gyro_2_sensor_align = CW90. So what do I set it relative to?
I assume you have the I2C pad version (5 rows of pads above the usb port) of this FC as the previous version which I had did not support I2C.
Your dump looks ok to me.
Is your GPS working? Did you try the firmware on the HGLRC website (in the product listing) or perhaps you can flash the inav firmware to test if that works.
I hope you connected the SDA—>SDA and SCL—>SCL for the magnetometer as we don’t invert these like RX—>TX or TX—>RX for the GPS.
Did you test with a lipo plugged in? Apart from the radio rx (crossfire/sbus/etc) power up with usb power. The other 5v pads do not power up without external/lipo power.
(21-Feb-2021, 10:10 AM)kafie1980 Wrote: I assume you have the I2C pad version (5 rows of pads above the usb port) of this FC as the previous version which I had did not support I2C.
Your dump looks ok to me.
Is your GPS working? Did you try the firmware on the HGLRC website (in the product listing) or perhaps you can flash the inav firmware to test if that works.
I hope you connected the SDA—>SDA and SCL—>SCL for the magnetometer as we don’t invert these like RX—>TX or TX—>RX for the GPS.
Did you test with a lipo plugged in? Apart from the radio rx (crossfire/sbus/etc) power up with usb power. The other 5v pads do not power up without external/lipo power.
Hello,
No, my stack don't have the I2C pad version (I have the 4 rows of pads) and I'm trying to redirect the I2C to UART3 TX(as SCL) \ RX (as SDA). My GPS is working well and the lipo is plugged as the GPS is not powerup.
21-Feb-2021, 02:53 PM (This post was last modified: 21-Feb-2021, 02:55 PM by kafie1980.)
(21-Feb-2021, 01:47 PM)Rotems Wrote: Hello,
No, my stack don't have the I2C pad version (I have the 4 rows of pads) and I'm trying to redirect the I2C to UART3 TX(as SCL) \ RX (as SDA). My GPS is working well and the lipo is plugged as the GPS is not powerup.
Thank you for your help. Rotem
UART 3 on this board is only exposed as a T3 (TX pad and the RX pad is not exposed). I am not sure you are referring to the correct UART.
Further more we cannot resource map any UART TX/RX pins of our choice as SDA/SCL pins. This depends on the FC design and the Betaflight/INAV target compiled for the specific board.
This is the reason HGLRC released a newer version of the FC with SDA/SCL pads as INAV depends on a Compass/Magnetometer.
Your dump shows I2C SCL/SDA mapped onto pins B08/B09 but they are probably being used by the onboard barometer.
21-Feb-2021, 03:02 PM (This post was last modified: 21-Feb-2021, 03:02 PM by SnowLeopardFPV.)
(21-Feb-2021, 01:47 PM)Rotems Wrote: No, my stack don't have the I2C pad version (I have the 4 rows of pads) and I'm trying to redirect the I2C to UART3 TX(as SCL) \ RX (as SDA).
The dump file you posted shows the default mapped I2C1 resources for the HGLRC Zeus AIO FC to the non-existant SCL and SDA pads on your version of that FC.
If you run the CLI commands in post #4 at the link below, that will remap the UART3 pads to the I2C2 resource and reconfigure the magnetometer to is the I2C2 resource for the compass.
(21-Feb-2021, 03:02 PM)SnowLeopardFPV Wrote: The dump file you posted shows the default mapped I2C1 resources for the HGLRC Zeus AIO FC to the non-existant SCL and SDA pads on your version of that FC.
If you run the CLI commands in post #4 at the link below, that will remap the UART3 pads to the I2C2 resource and reconfigure the magnetometer to is the I2C2 resource for the compass.