How to setup failsafe on Naze32?

Post Reply
muumi
Posts: 3
Joined: Fri Dec 06, 2013 11:27 am

How to setup failsafe on Naze32?

Post by muumi »

Hi,

I just built my first quadcopter using the Acro Naze32 board. It flies, but I'm having trouble setting up a failsafe. I'm using the Orange R615 receiver and 9XR TX. I don't think the receiver has any hardware failsafe so I try to set one up using the Naze32.

Using the CLI on Baseflight Configurator I've setup the "feature failsafe" on. However, when I power up my quad, arm it (my props always start spinning without any throttle, although slowly), and then turn off the TX nothing happens. The props keep spinning.

Here's a dump of my config:

Code: Select all

        
Entering CLI Mode, type 'exit' to return, or 'help'

# dump
Current Config: Copy everything below here...
aux 0 32
aux 1 1
aux 2 0
aux 3 0
aux 4 0
aux 5 0
aux 6 0
aux 7 0
aux 8 0
aux 9 0
aux 10 0
aux 11 0
aux 12 0
aux 13 0
aux 14 0
aux 15 0
aux 16 0
aux 17 0
aux 18 0
aux 19 0
mixer QUADX
feature -PPM
feature -VBAT
feature -INFLIGHT_ACC_CAL
feature -SERIALRX
feature -MOTOR_STOP
feature -SERVO_TILT
feature -GYRO_SMOOTHING
feature -LED_RING
feature -GPS
feature -FAILSAFE
feature -SONAR
feature -TELEMETRY
feature -POWERMETER
feature -VARIO
feature -3D
feature -SOFTSERIAL
feature VBAT
feature FAILSAFE
map AETR1234
set looptime = 3500
set midrc = 1500
set minthrottle = 1050
set maxthrottle = 1850
set mincommand = 1000
set mincheck = 1100
set maxcheck = 1900
set deadband3d_low = 1406
set deadband3d_high = 1514
set neutral3d = 1460
set deadband3d_throttle = 50
set motor_pwm_rate = 400
set servo_pwm_rate = 50
set retarded_arm = 0
set flaps_speed = 0
set serial_baudrate = 115200
set softserial_baudrate = 19200
set softserial_inverted = 0
set gps_type = 0
set gps_baudrate = 0
set serialrx_type = 0
set telemetry_softserial = 0
set vbatscale = 110
set vbatmaxcellvoltage = 43
set vbatmincellvoltage = 33
set power_adc_channel = 0
set align_gyro = 0
set align_acc = 0
set align_mag = 0
set align_board_roll = 0
set align_board_pitch = 0
set align_board_yaw = 0
set yaw_control_direction = 1
set acc_hardware = 0
set moron_threshold = 32
set gyro_lpf = 42
set gyro_cmpf_factor = 600
set gyro_cmpfm_factor = 250
set pid_controller = 0
set deadband = 0
set yawdeadband = 0
set alt_hold_throttle_neutral = 40
set alt_hold_fast_change = 1
set throttle_angle_correction = 0
set rc_rate = 90
set rc_expo = 65
set thr_mid = 50
set thr_expo = 0
set roll_pitch_rate = 0
set yawrate = 0
set failsafe_delay = 10
set failsafe_off_delay = 0
set failsafe_throttle = 1200
set failsafe_detect_threshold = 985
set rssi_aux_channel = 0
set yaw_direction = 1
set tri_unarmed_servo = 1
set gimbal_flags = 1
set acc_lpf_factor = 4
set accxy_deadband = 40
set accz_deadband = 40
set acc_unarmedcal = 1
set acc_trim_pitch = 0
set acc_trim_roll = 0
set baro_tab_size = 21
set baro_noise_lpf =  0.600
set baro_cf_vel =  0.995
set baro_cf_alt =  0.950
set mag_declination = 0
set gps_pos_p = 11
set gps_pos_i = 0
set gps_pos_d = 0
set gps_posr_p = 20
set gps_posr_i = 8
set gps_posr_d = 45
set gps_nav_p = 14
set gps_nav_i = 20
set gps_nav_d = 80
set gps_wp_radius = 200
set nav_controls_heading = 1
set nav_speed_min = 100
set nav_speed_max = 300
set nav_slew_rate = 30
set p_pitch = 40
set i_pitch = 30
set d_pitch = 23
set p_roll = 40
set i_roll = 30
set d_roll = 23
set p_yaw = 85
set i_yaw = 45
set d_yaw = 0
set p_alt = 40
set i_alt = 25
set d_alt = 60
set p_level = 90
set i_level = 10
set d_level = 100
#


Anyone have any ideas why it does not work? Did I forget to setup something? What I want it to do is if it goes out of range, it will shutdown and drop (failsafe_off_delay 0).

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: How to setup failsafe on Naze32?

Post by timecop »

If it has no hardware failsafe, and if rx keeps sending last received stuff, I don't think you're going to be able to have a failsafe in this sitaution... Have you checked if RX stops sending PWM pulses with TX off?

muumi
Posts: 3
Joined: Fri Dec 06, 2013 11:27 am

Re: How to setup failsafe on Naze32?

Post by muumi »

How can I test if the RX keeps sending pulses?

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: How to setup failsafe on Naze32?

Post by timecop »

Well, easiest would be looking at a scope, but maybe you can use a multimeter too, if it completely stops sending, you should get 0V from the receive pins, where is if its sending some PWM, you should get something above zeroV

User avatar
treym
Posts: 258
Joined: Sat Jul 21, 2012 12:28 am

Re: How to setup failsafe on Naze32?

Post by treym »

muumi wrote:Using the CLI on Baseflight Configurator I've setup the "feature failsafe" on. However, when I power up my quad, arm it (my props always start spinning without any throttle, although slowly), and then turn off the TX nothing happens. The props keep spinning.


plugs one of you esc directly into your rx .. then by turning off you transmitter you will cleary see if motor keep spinning .

if so, you have to turn off or change the builtin failsafe of you rx/tx combo

timecop
Posts: 1880
Joined: Fri Sep 02, 2011 4:48 pm

Re: How to setup failsafe on Naze32?

Post by timecop »

To add to above suggestion, better wait a few seconds+ for motor to respond, as most esc will have some failsafe timeout, after which they will slow down or stop. It won't happen immediately

scrat
Posts: 925
Joined: Mon Oct 15, 2012 9:47 am
Location: Slovenia

Re: How to setup failsafe on Naze32?

Post by scrat »

muumi wrote:Hi,

I just built my first quadcopter using the Acro Naze32 board. It flies, but I'm having trouble setting up a failsafe. I'm using the Orange R615 receiver and 9XR TX. I don't think the receiver has any hardware failsafe so I try to set one up using the Naze32.

Using the CLI on Baseflight Configurator I've setup the "feature failsafe" on. However, when I power up my quad, arm it (my props always start spinning without any throttle, although slowly), and then turn off the TX nothing happens. The props keep spinning.

Here's a dump of my config:

Code: Select all

        
Entering CLI Mode, type 'exit' to return, or 'help'

# dump
Current Config: Copy everything below here...
aux 0 32
aux 1 1
aux 2 0
aux 3 0
aux 4 0
aux 5 0
aux 6 0
aux 7 0
aux 8 0
aux 9 0
aux 10 0
aux 11 0
aux 12 0
aux 13 0
aux 14 0
aux 15 0
aux 16 0
aux 17 0
aux 18 0
aux 19 0
mixer QUADX
feature -PPM
feature -VBAT
feature -INFLIGHT_ACC_CAL
feature -SERIALRX
feature -MOTOR_STOP
feature -SERVO_TILT
feature -GYRO_SMOOTHING
feature -LED_RING
feature -GPS
feature -FAILSAFE
feature -SONAR
feature -TELEMETRY
feature -POWERMETER
feature -VARIO
feature -3D
feature -SOFTSERIAL
feature VBAT
feature FAILSAFE
map AETR1234
set looptime = 3500
set midrc = 1500
set minthrottle = 1050
set maxthrottle = 1850
set mincommand = 1000
set mincheck = 1100
set maxcheck = 1900
set deadband3d_low = 1406
set deadband3d_high = 1514
set neutral3d = 1460
set deadband3d_throttle = 50
set motor_pwm_rate = 400
set servo_pwm_rate = 50
set retarded_arm = 0
set flaps_speed = 0
set serial_baudrate = 115200
set softserial_baudrate = 19200
set softserial_inverted = 0
set gps_type = 0
set gps_baudrate = 0
set serialrx_type = 0
set telemetry_softserial = 0
set vbatscale = 110
set vbatmaxcellvoltage = 43
set vbatmincellvoltage = 33
set power_adc_channel = 0
set align_gyro = 0
set align_acc = 0
set align_mag = 0
set align_board_roll = 0
set align_board_pitch = 0
set align_board_yaw = 0
set yaw_control_direction = 1
set acc_hardware = 0
set moron_threshold = 32
set gyro_lpf = 42
set gyro_cmpf_factor = 600
set gyro_cmpfm_factor = 250
set pid_controller = 0
set deadband = 0
set yawdeadband = 0
set alt_hold_throttle_neutral = 40
set alt_hold_fast_change = 1
set throttle_angle_correction = 0
set rc_rate = 90
set rc_expo = 65
set thr_mid = 50
set thr_expo = 0
set roll_pitch_rate = 0
set yawrate = 0
set failsafe_delay = 10
set failsafe_off_delay = 0
set failsafe_throttle = 1200
set failsafe_detect_threshold = 985
set rssi_aux_channel = 0
set yaw_direction = 1
set tri_unarmed_servo = 1
set gimbal_flags = 1
set acc_lpf_factor = 4
set accxy_deadband = 40
set accz_deadband = 40
set acc_unarmedcal = 1
set acc_trim_pitch = 0
set acc_trim_roll = 0
set baro_tab_size = 21
set baro_noise_lpf =  0.600
set baro_cf_vel =  0.995
set baro_cf_alt =  0.950
set mag_declination = 0
set gps_pos_p = 11
set gps_pos_i = 0
set gps_pos_d = 0
set gps_posr_p = 20
set gps_posr_i = 8
set gps_posr_d = 45
set gps_nav_p = 14
set gps_nav_i = 20
set gps_nav_d = 80
set gps_wp_radius = 200
set nav_controls_heading = 1
set nav_speed_min = 100
set nav_speed_max = 300
set nav_slew_rate = 30
set p_pitch = 40
set i_pitch = 30
set d_pitch = 23
set p_roll = 40
set i_roll = 30
set d_roll = 23
set p_yaw = 85
set i_yaw = 45
set d_yaw = 0
set p_alt = 40
set i_alt = 25
set d_alt = 60
set p_level = 90
set i_level = 10
set d_level = 100
#


Anyone have any ideas why it does not work? Did I forget to setup something? What I want it to do is if it goes out of range, it will shutdown and drop (failsafe_off_delay 0).


If you don't want motor to start spinning when you arm copter. Then you must do: feature MOTOR_STOP

teslahed
Posts: 84
Joined: Wed Jun 27, 2012 2:51 pm

Re: How to setup failsafe on Naze32?

Post by teslahed »

Some people prefer motors to always spin on arm and some people prefer them to be stopped when armed but fully throttled down.

I prefer mine to always spin when armed. I've left a quadcopter armed but throttled down before, forgotten, then walked away. This could be dangerous. You wont do this if your motors always spin on arm.

muumi
Posts: 3
Joined: Fri Dec 06, 2013 11:27 am

Re: How to setup failsafe on Naze32?

Post by muumi »

scrat wrote:If you don't want motor to start spinning when you arm copter. Then you must do: feature MOTOR_STOP


Ok, thanks. I think I will keep them spinning for now so I don't forget its armed.

A motor will keep spinning even if an ESC is connected directly to the RX when I power of the TX. I will try to measure the voltage from the throttle pin next, but it looks like the RX just keeps repeating the last values it had when it loses connection.

Here's a link to the RX:

http://orangerx.com/2013/01/18/r615-spe ... -receiver/

it only came with a bind plug and there is just a bind button on it. The only online manual I've found just tells how to bind it.

Anyway, I've ordered a new RX which explicitly states it has a failsafe.

User avatar
treym
Posts: 258
Joined: Sat Jul 21, 2012 12:28 am

Re: How to setup failsafe on Naze32?

Post by treym »

Preset failsafe = if signal is lost , all channels are driven to their failsafe position set during binging

Hold last commande = it will hold last commande exept the throttle channel

have a look a you tx manual , the failsafe is set while you are in bind mode ;)

flye
Posts: 19
Joined: Tue Apr 12, 2011 4:56 pm

Re: How to setup failsafe on Naze32?

Post by flye »

Hi,I have enabled failsafe and all I get is anything to off like set on my frsky rx
How can I set it to failsafe delay to let the quad descend slowly like in the MW code:
#define FAILSAFE_DELAY 10
#define FAILSAFE_OFF_DELAY 200
#define FAILSAFE_THROTTLE (MINTHROTTLE + 200

Post Reply