iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.19k stars 1.49k forks source link

Omnibus clone no servo output #2822

Closed xswein closed 6 years ago

xswein commented 6 years ago

Hi, I have problem with servo outputs for flying wing.

I have orderedd F3 Omnibus clone with current sensing: https://www.banggood.com/30-5-30-5mm-Betaflight-Omnibus-STM32F3-F3-Pro-Flight-Controller-Built-in-OSD-BEC-Current-sensor-for-RC-Drone-p-1156615.html

I can't figure out how to enable servo output, I succesfully configured 2 other flying wings (with F1 Naze32 and SPRacing F3 clone) both worked out of the box just selecting preset 600mm flying wing.

But this one is not working, i have done:

  1. Flashed latest inav (target omnibus)
  2. Selected 600mm flying wing preset
  3. calibrated accelerometer
  4. configured serial on rx3, ibus (flysky)
  5. enabled servo output
  6. set 50hz refresh rate on motor pwm and servos

In motor tab servos are moving, I can even arm (motor spins and behaves as expected) but servos just don't recieve any signal. Not even a servo glitch on bootup (servos are definitely okay, centered by servo tester).

Hint might be in resources, it seems 4 motor outputs and no servos are expected.

MOTOR 1 B08 MOTOR 2 B09 MOTOR 3 A02 MOTOR 4 A03

I guess it should be something like:

MOTOR 1 B08 MOTOR 2 B09 SERVO 1 A02 SERVO 2 A03

In Cleanflight/Betaflight i would try resource remapping, in iNav - no idea. Any tip what could be wrong?

Thanks Martin

wookie666 commented 6 years ago

Resource remapping is not available yet in inav

digitalentity commented 6 years ago

@xswein please provide a dump output

xswein commented 6 years ago

@digitalentity i will on monday, I'm unable to get it now

asturchoper commented 6 years ago

Same problem. Only channel 1 (motor) work. I have discovered that the signals of the ailerons (channel 3 and 4) come from two auxiliary channels of my tx. Channels 7 and 8. The first time I did flash everything worked fine, but I had to flash more times and now I have no sign of the ailerons on the sticks. Any ideas?

xswein commented 6 years ago

@digitalentity dump result

version

INAV/OMNIBUS 1.8.0 Nov 1 2017 / 06:14:28 (912d1315)

resources

mixer

mixer FLYING_WING

mmix reset

servo

servo 0 1000 2000 1500 100 -1 servo 1 1000 2000 1500 100 -1 servo 2 1000 2000 1500 100 -1 servo 3 1000 2000 1500 100 -1 servo 4 1000 2000 1500 100 -1 servo 5 1000 2000 1500 100 -1 servo 6 1000 2000 1500 100 -1 servo 7 1000 2000 1500 100 -1

servo mix

smix reset

feature

feature -RX_PPM feature -VBAT feature -RX_UIB feature -RX_SERIAL feature -MOTOR_STOP feature -SERVO_TILT feature -SOFTSERIAL feature -GPS feature -TELEMETRY feature -CURRENT_METER feature -3D feature -RX_PARALLEL_PWM feature -RX_MSP feature -RSSI_ADC feature -LED_STRIP feature -DASHBOARD feature -BLACKBOX feature -CHANNEL_FORWARDING feature -TRANSPONDER feature -AIRMODE feature -SUPEREXPO feature -VTX feature -RX_SPI feature -SOFTSPI feature -PWM_SERVO_DRIVER feature -PWM_OUTPUT_ENABLE feature -OSD feature VBAT feature MOTOR_STOP feature GPS feature CURRENT_METER feature BLACKBOX feature AIRMODE feature PWM_OUTPUT_ENABLE feature OSD

beeper

beeper RUNTIME_CALIBRATION beeper HW_FAILURE beeper RX_LOST beeper RX_LOST_LANDING beeper DISARMING beeper ARMING beeper ARMING_GPS_FIX beeper BAT_CRIT_LOW beeper BAT_LOW beeper GPS_STATUS beeper RX_SET beeper ACTION_SUCCESS beeper ACTION_FAIL beeper READY_BEEP beeper MULTI_BEEPS beeper DISARM_REPEAT beeper ARMED beeper SYSTEM_INIT beeper ON_USB beeper LAUNCH_MODE beeper CAM_CONNECTION_OPEN beeper CAM_CONNECTION_CLOSED

map

map AETR5678

name

name -

serial

serial 20 1 115200 38400 0 115200 serial 0 0 115200 38400 0 115200 serial 1 2 115200 9600 0 115200 serial 2 64 115200 38400 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

mode_color

mode_color 0 0 1 mode_color 0 1 11 mode_color 0 2 2 mode_color 0 3 13 mode_color 0 4 10 mode_color 0 5 3 mode_color 1 0 5 mode_color 1 1 11 mode_color 1 2 3 mode_color 1 3 13 mode_color 1 4 10 mode_color 1 5 3 mode_color 2 0 10 mode_color 2 1 11 mode_color 2 2 4 mode_color 2 3 13 mode_color 2 4 10 mode_color 2 5 3 mode_color 3 0 8 mode_color 3 1 11 mode_color 3 2 4 mode_color 3 3 13 mode_color 3 4 10 mode_color 3 5 3 mode_color 4 0 7 mode_color 4 1 11 mode_color 4 2 3 mode_color 4 3 13 mode_color 4 4 10 mode_color 4 5 3 mode_color 5 0 9 mode_color 5 1 11 mode_color 5 2 2 mode_color 5 3 13 mode_color 5 4 10 mode_color 5 5 3 mode_color 6 0 6 mode_color 6 1 10 mode_color 6 2 1 mode_color 6 3 0 mode_color 6 4 0 mode_color 6 5 2 mode_color 6 6 3 mode_color 6 7 6 mode_color 6 8 0 mode_color 6 9 0 mode_color 6 10 0

aux

aux 0 0 0 900 900 aux 1 0 0 900 900 aux 2 0 0 900 900 aux 3 0 0 900 900 aux 4 0 0 900 900 aux 5 0 0 900 900 aux 6 0 0 900 900 aux 7 0 0 900 900 aux 8 0 0 900 900 aux 9 0 0 900 900 aux 10 0 0 900 900 aux 11 0 0 900 900 aux 12 0 0 900 900 aux 13 0 0 900 900 aux 14 0 0 900 900 aux 15 0 0 900 900 aux 16 0 0 900 900 aux 17 0 0 900 900 aux 18 0 0 900 900 aux 19 0 0 900 900

adjrange

adjrange 0 0 0 900 900 0 0 adjrange 1 0 0 900 900 0 0 adjrange 2 0 0 900 900 0 0 adjrange 3 0 0 900 900 0 0 adjrange 4 0 0 900 900 0 0 adjrange 5 0 0 900 900 0 0 adjrange 6 0 0 900 900 0 0 adjrange 7 0 0 900 900 0 0 adjrange 8 0 0 900 900 0 0 adjrange 9 0 0 900 900 0 0 adjrange 10 0 0 900 900 0 0 adjrange 11 0 0 900 900 0 0

rxrange

rxrange 0 1000 2000 rxrange 1 1000 2000 rxrange 2 1000 2000 rxrange 3 1000 2000

master

set looptime = 2000 set gyro_sync = ON set gyro_sync_denom = 2 set align_gyro = DEFAULT set gyro_hardware_lpf = 188HZ set gyro_lpf_hz = 60 set moron_threshold = 32 set gyro_notch1_hz = 0 set gyro_notch1_cutoff = 1 set gyro_notch2_hz = 0 set gyro_notch2_cutoff = 1 set vbat_adc_channel = 1 set rssi_adc_channel = 3 set current_adc_channel = 2 set airspeed_adc_channel = 0 set acc_notch_hz = 0 set acc_notch_cutoff = 1 set align_acc = DEFAULT set acc_hardware = MPU6000 set acc_lpf_hz = 15 set acczero_x = 85 set acczero_y = -61 set acczero_z = 193 set accgain_x = 4093 set accgain_y = 4105 set accgain_z = 4047 set rangefinder_hardware = NONE set align_mag = DEFAULT set mag_hardware = NONE set mag_declination = 0 set magzero_x = 0 set magzero_y = 0 set magzero_z = 0 set mag_calibration_time = 30 set baro_hardware = BMP280 set baro_use_median_filter = ON set pitot_hardware = NONE set pitot_use_median_filter = ON set pitot_noise_lpf = 0.600 set pitot_scale = 1.000 set receiver_type = SERIAL set mid_rc = 1500 set min_check = 1100 set max_check = 1900 set rssi_channel = 0 set rssi_scale = 100 set rssi_invert = OFF set rc_smoothing = ON set serialrx_provider = IBUS set sbus_inversion = ON set rx_spi_rf_channel_count = 0 set spektrum_sat_bind = 0 set rx_min_usec = 885 set rx_max_usec = 2115 set blackbox_rate_num = 1 set blackbox_rate_denom = 1 set blackbox_device = SERIAL set sdcard_detect_inverted = ON set min_throttle = 1150 set max_throttle = 1850 set min_command = 1000 set motor_pwm_rate = 50 set motor_pwm_protocol = STANDARD set failsafe_delay = 5 set failsafe_recovery_delay = 5 set failsafe_off_delay = 200 set failsafe_throttle = 1000 set failsafe_throttle_low_delay = 100 set failsafe_procedure = SET-THR set failsafe_stick_threshold = 50 set failsafe_fw_roll_angle = -200 set failsafe_fw_pitch_angle = 100 set failsafe_fw_yaw_rate = -45 set failsafe_min_distance = 0 set failsafe_min_distance_procedure = DROP set align_board_roll = 0 set align_board_pitch = 0 set align_board_yaw = 0 set gimbal_mode = NORMAL set battery_capacity = 0 set vbat_scale = 110 set vbat_max_cell_voltage = 43 set vbat_min_cell_voltage = 33 set vbat_warning_cell_voltage = 35 set current_meter_scale = 400 set current_meter_offset = 0 set multiwii_current_meter_output = OFF set current_meter_type = ADC set yaw_motor_direction = 1 set yaw_jump_prevention_limit = 200 set 3d_deadband_low = 1406 set 3d_deadband_high = 1514 set 3d_neutral = 1460 set servo_center_pulse = 1500 set servo_pwm_rate = 50 set servo_lpf_hz = 20 set flaperon_throw_offset = 200 set tri_unarmed_servo = ON set reboot_character = 82 set imu_dcm_kp = 2500 set imu_dcm_ki = 50 set imu_dcm_kp_mag = 10000 set imu_dcm_ki_mag = 0 set small_angle = 180 set fixed_wing_auto_arm = OFF set disarm_kill_switch = ON set auto_disarm_delay = 5 set gps_provider = UBLOX set gps_sbas_mode = NONE set gps_dyn_model = AIR_1G set gps_auto_config = ON set gps_auto_baud = ON set gps_min_sats = 6 set deadband = 5 set yaw_deadband = 5 set pos_hold_deadband = 20 set alt_hold_deadband = 50 set 3d_deadband_throttle = 50 set fw_autotune_overshoot_time = 100 set fw_autotune_undershoot_time = 200 set fw_autotune_threshold = 50 set fw_autotune_ff_to_p_gain = 10 set fw_autotune_ff_to_i_tc = 600 set inav_auto_mag_decl = ON set inav_gravity_cal_tolerance = 5 set inav_use_gps_velned = ON set inav_gps_delay = 200 set inav_reset_altitude = FIRST_ARM set inav_max_surface_altitude = 200 set inav_w_z_surface_p = 3.500 set inav_w_z_surface_v = 6.100 set inav_w_z_baro_p = 0.350 set inav_w_z_gps_p = 0.200 set inav_w_z_gps_v = 0.500 set inav_w_xy_gps_p = 1.000 set inav_w_xy_gps_v = 2.000 set inav_w_z_res_v = 0.500 set inav_w_xy_res_v = 0.500 set inav_w_acc_bias = 0.010 set inav_max_eph_epv = 1000.000 set inav_baro_epv = 100.000 set nav_disarm_on_landing = OFF set nav_use_midthr_for_althold = OFF set nav_extra_arming_safety = ON set nav_user_control_mode = ATTI set nav_position_timeout = 5 set nav_wp_radius = 100 set nav_wp_safe_distance = 10000 set nav_auto_speed = 300 set nav_auto_climb_rate = 500 set nav_manual_speed = 500 set nav_manual_climb_rate = 200 set nav_landing_speed = 200 set nav_land_slowdown_minalt = 500 set nav_land_slowdown_maxalt = 2000 set nav_emerg_landing_speed = 500 set nav_min_rth_distance = 500 set nav_rth_climb_first = ON set nav_rth_climb_ignore_emerg = OFF set nav_rth_tail_first = OFF set nav_rth_allow_landing = ALWAYS set nav_rth_alt_mode = AT_LEAST set nav_rth_abort_threshold = 50000 set nav_rth_altitude = 1000 set nav_mc_bank_angle = 30 set nav_mc_hover_thr = 1500 set nav_mc_auto_disarm_delay = 2000 set nav_fw_cruise_thr = 1400 set nav_fw_min_thr = 1200 set nav_fw_max_thr = 1700 set nav_fw_bank_angle = 20 set nav_fw_climb_angle = 20 set nav_fw_dive_angle = 15 set nav_fw_pitch2thr = 10 set nav_fw_loiter_radius = 5000 set nav_fw_land_dive_angle = 2 set nav_fw_launch_velocity = 300 set nav_fw_launch_accel = 1863 set nav_fw_launch_max_angle = 45 set nav_fw_launch_detect_time = 40 set nav_fw_launch_thr = 1700 set nav_fw_launch_idle_thr = 1000 set nav_fw_launch_motor_delay = 500 set nav_fw_launch_spinup_time = 100 set nav_fw_launch_timeout = 5000 set nav_fw_launch_climb_angle = 18 set telemetry_switch = OFF set telemetry_inversion = ON set frsky_default_latitude = 0.000 set frsky_default_longitude = 0.000 set frsky_coordinates_format = 0 set frsky_unit = METRIC set frsky_vfas_precision = 0 set frsky_vfas_cell_voltage = OFF set hott_alarm_sound_interval = 5 set smartport_uart_unidir = OFF set smartport_fuel_percent = OFF set ibus_telemetry_type = 0 set ltm_update_rate = NORMAL set ledstrip_visual_beeper = OFF set osd_video_system = 0 set osd_row_shiftdown = 0 set osd_units = METRIC set osd_rssi_alarm = 20 set osd_cap_alarm = 0 set osd_time_alarm = 10 set osd_alt_alarm = 100 set osd_artificial_horizon_reverse_roll = OFF set osd_crosshairs_style = DEFAULT set osd_left_sidebar_scroll = NONE set osd_right_sidebar_scroll = NONE set osd_sidebar_scroll_arrows = OFF set osd_main_voltage_pos = 2060 set osd_rssi_pos = 2071 set osd_flytimer_pos = 311 set osd_ontime_pos = 279 set osd_flymode_pos = 2444 set osd_throttle_pos = 2113 set osd_vtx_channel_pos = 200 set osd_crosshairs_pos = 0 set osd_artificial_horizon_pos = 2248 set osd_current_draw_pos = 2145 set osd_mah_drawn_pos = 2177 set osd_craft_name_pos = 84 set osd_gps_speed_pos = 55 set osd_gps_sats_pos = 2400 set osd_gps_lon_pos = 402 set osd_gps_lat_pos = 384 set osd_home_dir_pos = 366 set osd_home_dist_pos = 33 set osd_altitude_pos = 2049 set osd_vario_pos = 183 set osd_vario_num_pos = 248 set osd_pid_roll_pos = 322 set osd_pid_pitch_pos = 354 set osd_pid_yaw_pos = 386 set osd_power_pos = 47 set osd_air_speed_pos = 163 set osd_ontime_flytime_pos = 2423 set osd_rtc_time_pos = 407 set osd_messages_pos = 2465 set osd_gps_hdop_pos = 320 set osd_main_cell_voltage_pos = 44 set osd_throttle_auto_thr_pos = 70 set osd_heading_graph_pos = 82 set osd_efficiency_pos = 161 set i2c_speed = 400KHZ set cpu_underclock = OFF set debug_mode = NONE set acc_task_frequency = 500 set attitude_task_frequency = 250 set async_mode = NONE set throttle_tilt_comp_str = 0 set input_filtering_mode = OFF set mode_range_logic_operator = OR set stats = OFF set stats_total_time = 0 set stats_total_dist = 0 set tz_offset = 0

profile

profile 1

set mc_p_pitch = 40 set mc_i_pitch = 30 set mc_d_pitch = 23 set mc_p_roll = 40 set mc_i_roll = 30 set mc_d_roll = 23 set mc_p_yaw = 85 set mc_i_yaw = 45 set mc_d_yaw = 0 set mc_p_level = 20 set mc_i_level = 15 set mc_d_level = 75 set fw_p_pitch = 15 set fw_i_pitch = 40 set fw_ff_pitch = 15 set fw_p_roll = 15 set fw_i_roll = 30 set fw_ff_roll = 15 set fw_p_yaw = 50 set fw_i_yaw = 45 set fw_ff_yaw = 0 set fw_p_level = 20 set fw_i_level = 15 set fw_d_level = 75 set max_angle_inclination_rll = 300 set max_angle_inclination_pit = 300 set dterm_lpf_hz = 40 set yaw_lpf_hz = 30 set dterm_setpoint_weight = 0.000 set fw_iterm_throw_limit = 165 set fw_reference_airspeed = 1000.000 set fw_turn_assist_yaw_gain = 1.000 set dterm_notch_hz = 0 set dterm_notch_cutoff = 1 set pidsum_limit = 500 set yaw_p_limit = 300 set iterm_ignore_threshold = 200 set yaw_iterm_ignore_threshold = 50 set rate_accel_limit_roll_pitch = 0 set rate_accel_limit_yaw = 10000 set heading_hold_rate_limit = 90 set nav_mc_pos_z_p = 50 set nav_mc_pos_z_i = 0 set nav_mc_pos_z_d = 0 set nav_mc_vel_z_p = 100 set nav_mc_vel_z_i = 50 set nav_mc_vel_z_d = 10 set nav_mc_pos_xy_p = 65 set nav_mc_pos_xy_i = 120 set nav_mc_pos_xy_d = 10 set nav_mc_vel_xy_p = 180 set nav_mc_vel_xy_i = 15 set nav_mc_vel_xy_d = 100 set nav_fw_pos_z_p = 50 set nav_fw_pos_z_i = 0 set nav_fw_pos_z_d = 0 set nav_fw_pos_xy_p = 75 set nav_fw_pos_xy_i = 5 set nav_fw_pos_xy_d = 8 set rc_expo = 70 set rc_yaw_expo = 20 set thr_mid = 50 set thr_expo = 0 set roll_rate = 40 set pitch_rate = 15 set yaw_rate = 20 set tpa_rate = 0 set tpa_breakpoint = 1500

paulo-sousa commented 6 years ago

@xswein, are you powering the servo rail separately?

The board does not power the servos directly from the onboard voltage regulator, and you need to provide a separate 5V source to the servos.

xswein commented 6 years ago

@paulo-sousa Are you sure? Reciever on RX3, pin J8 is definitely powered - even from USB (it works correctly). And I'm pretty sure that i measured 5V on pins J17-J14 in between all center (5V) and right pins (GND). And BEC is rated to 3A, one 9g servo should not take more then 300mA, so i should be well below the limit. But it was late night, I'll measure it once again just to be sure. snimek obrazovky porizeny 2018-02-26 16-14-21

fiam commented 6 years ago

@xswein @asturchoper Take a look at the motors tab in the configurator. Do the servos (bars at the right) move when you move the sticks? Note that the numbers in the right represent servo channels, NOT PIN NUMBERS. For pin/servo assignments, look at the model displayed at the top left.

paulo-sousa commented 6 years ago

@xswein, J8 is not connected to the servo rail (J14 to J17). J8 gets its power from the board (usually to power the receiver), but the remaining outputs are not powered.

These boards have 3 zener diodes, which allow it to be powered by 3 sources, without feeding into each other:

Do you have the ESC delivering power to J17 (most common setup)? If not, then you can measure any of the PINs and you will see the voltage dropping when you apply any type of load (like a servo).

xswein commented 6 years ago

@fiam Yup, as mentioned in original post - servos move in motor tab, servos are connected to PWM 3 and 4 (J15 & J14) as shown on the model in mixer and should be correct. Exactly same pinout works flawlessly on Naze32 F1 and Spracing F3 on my other models.

xswein commented 6 years ago

@paulo-sousa Nope I have multicopter ESC without BEC. May It may be that internal resistance of my multimeter is so low that current from zener diode makes multimeter read steady 5V? I'll try with servos connected.

fiam commented 6 years ago

@xswein Just to be clear, both servos (bars at the right) and motors (bars at the left) are moving or just motors?

Regarding power, I can tell you for sure that the OMNIBUS F4 PRO does have the diodes mentioned by @paulo-sousa and the OMNIBUS F3 (non-PRO) doesn't have them. I don't have the exact board you linked, but from the pictures it looks like it has the diodes.

In that case, you need to provide servo power separately to any of the PWM outputs 5V pin. If your ESC doesn't have a BEC, you can use a separate one. Those 3A 5V BECs that you can find on BG or AliExpress are small and should work fine in most cases.

xswein commented 6 years ago

Solved, it was the diode, there was false 5V without load on all 5V pins (due to not that high resistance of diode in reverse state) and even continuity in one direction (diode in forward state which i accidently tested). So i just jumped 5V from J8 to the J17 and everything works as expected. Really silly mistake. Thanks for helping guys :)

benoit35690 commented 6 years ago

hello xswein, could you please give more information ? I am facing same issue. I am powering the servo with a separate power source, not from J17. In the ressources I see 4 motors and no servo. wookie666 said "Resource remapping is not available yet in inav" Did you make something on iNav configuration ? Thanks

xswein commented 6 years ago

Hi, in my case, to power servos i bridged J8 5V and J17 5V pins and that solved the problem. Some say its bit risky, single BEC is powering FC and servos, so servos overload may brownout flightcontroller mid flight. But it never happend to me - my RX sends telemetry back to TX and I have alarm set to 4.8V and voltage never dropped below - so I think I'm safe.

In my case resources mapping is not related to powering the servos, there was simply no power on the servo pins.

Resources (according to my limited experience) are mapped depending on mixer, motors first, then servos.

Preset mixers and their resources maps are here: https://github.com/iNavFlight/inav/blob/master/docs/Mixer.md

As a custom mix I experimented with VTOL flying wing (tailsitting orientation is level for easy hovering). These were my mixes:

mixer

mixer CUSTOMAIRPLANE mmix 0 1.000 1.000 0.000 0.000 mmix 1 1.000 -1.000 0.000 0.000

servo mix

smix 0 2 1 -100 0 smix 1 3 1 -100 0 smix 2 2 2 -100 0 smix 3 3 2 100 0

Resources were assigned: PWM1 -> M1 PWM2 -> M2 PWM3 -> SERVO1 PWM4 -> SERVO2

massigrohmann commented 2 years ago

i had the same problem and now i solved!!... thanks a lot to everyone!!! thanks!!