Trampa VESC6 MK6 ABS_OVERCURRENT error

Hello everyone, first time poster here,
I have an electric scooter build that had a 12s 3p battery, Turnigy SK8 6374 192kv, and a Trampa VESC 6 MK5. It was working well, until I drove it through the rain where the MK5 did not survive. I ordered a MK6 to replace it.

After running the FOC wizard and setting up current/apps, the motor would click and the VESC would throw an overcurrent error. This seems to happen in current control (no reverse brake center) and when I maintain a throttle position, eg not just instantly releasing it. Interestingly enough, the only way that I got this problem to go away was to control the motor in duty cycle mode. This problem happens on the bench and while I am riding.

I have tried the following: (in rough order)

Rerunning the FOC wizard and also manually running the detection tests
Checking all of the connections (this solution was closest to other people’s problems with overcurrent)
Checking the Hall Sensors
Checking the VESC capacitors
adjusting all of the FOC, current options

  • what seemed to help slightly was doubling the observer gain
    Checking the throttle connections
  • the problem persisted when I used an adjustable power supply to replicate the throttle
    Replacing the motor with a new identical one
    testing a different battery without a bms
    updating the VESC firmware to 6.2
    testing a new VESC MK6 HP from Trampa (I was sent one after talking through email - they thought it might be the VESC)
    Testing a completely different motor without a sensor (Turnigy SK3 6364 245 kv)

This setup worked perfectly before with the MK5, and I don’t remember having to do anything specific or encountering this problem. If a video would help I would gladly make one.

Anything will help, as I have exhausted most of my options. Thank you!

Here is the motor configuration: (if this is not the correct way for a lot of text, I apologize)

<?xml version="1.0" encoding="UTF-8"?> 2 1 0 2 0 76.5397 -76.5397 40 -15 150 -60000 60000 0.8 300 1500 8 57 40.8 36 1 85 100 85 100 0.15 0.005 0.95 1.5e+06 -1.5e+06 1 1 1 150 1100 10 62 0.8 80000 600 -1 1 3 2 5 6 4 -1 2000 0.0213482 13.6558 30000 0.12 0 180 7 2 2000 30000 2.13482e-05 9.86677e-06 0.0136558 0.00392909 6.47763e+07 0.3 -1 50 1000 1 2500 350 0.1 0.9 0.2 0.1 0.5 0.5 0.2 0 -1 255 194 128 162 62 28 94 255 500 4000 0 0 2 0.15 1 23.7 0.1 0 3 20 4 6 0.3 0 3000 5 0.001 1 1 2049.41 2049.07 2047.52 -0.0037 0.0077 -0.004 0 0 0 1 1 4000 0 0 0.9 0.02 0.2 1 200 0 0.1 0.03 50 5 0.004 0.004 0.0001 0.2 900 1 25000 0.025 0 0 0 0.00035 0.2 1 0 0.01 0.05 0.0046 0.04 500 0.02 0.5 8192 1 1 1.65 1.65 0.5 0 0 1 0 16 3000 35000 25000 3380 0 0 0.61 10000 25 2 45 14 5 0.2 0 12 12.6 1 Unnamed Not Specified 0 0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Roboto'; font-size:12pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A motor description can be edited here.</p></body></html> 0 0 0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Roboto'; font-size:12pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Some comments about the motor quality. Images can be added as well.</p></body></html> 0 3 45 65 0.05 0 0

Sorry, the xml tags screwed things up, this should be readable:

MCConfiguration
ConfigVersion 2
pwm_mode 1
comm_mode 0
motor_type 2
sensor_mode 0
l_current_max 76.5397
l_current_min -76.5397
l_in_current_max 40
l_in_current_min -15
l_abs_current_max 150
l_min_erpm -60000
l_max_erpm 60000
l_erpm_start 0.8
l_max_erpm_fbrake 300
l_max_erpm_fbrake_cc 1500
l_min_vin 8
l_max_vin 57
l_battery_cut_start 40.8
l_battery_cut_end 36
l_slow_abs_current 1
l_temp_fet_start 85
l_temp_fet_end 100
l_temp_motor_start 85
l_temp_motor_end 100
l_temp_accel_dec 0.15
l_min_duty 0.005
l_max_duty 0.95
l_watt_max 1.5e+06
l_watt_min -1.5e+06
l_current_max_scale 1
l_current_min_scale 1
l_duty_start 1
sl_min_erpm 150
sl_min_erpm_cycle_int_limit 1100
sl_max_fullbreak_current_dir_change 10
sl_cycle_int_limit 62
sl_phase_advance_at_br 0.8
sl_cycle_int_rpm_br 80000
sl_bemf_coupling_k 600
hall_table__0 -1
hall_table__1 1
hall_table__2 3
hall_table__3 2
hall_table__4 5
hall_table__5 6
hall_table__6 4
hall_table__7 -1
hall_sl_erpm 2000
foc_current_kp 0.0213482
foc_current_ki 13.6558
foc_f_zv 30000
foc_dt_us 0.12
foc_encoder_inverted 0
foc_encoder_offset 180
foc_encoder_ratio 7
foc_sensor_mode 2
foc_pll_kp 2000
foc_pll_ki 30000
foc_motor_l 2.13482e-05
foc_motor_ld_lq_diff 9.86677e-06
foc_motor_r 0.0136558
foc_motor_flux_linkage 0.00392909
foc_observer_gain 6.47763e+07
foc_observer_gain_slow 0.3
foc_observer_offset -1
foc_duty_dowmramp_kp 50
foc_duty_dowmramp_ki 1000
foc_start_curr_dec 1
foc_start_curr_dec_rpm 2500
foc_openloop_rpm 350
foc_openloop_rpm_low 0.1
foc_d_gain_scale_start 0.9
foc_d_gain_scale_max_mod 0.2
foc_sl_openloop_hyst 0.1
foc_sl_openloop_time_lock 0.5
foc_sl_openloop_time_ramp 0.5
foc_sl_openloop_time 0.2
foc_sl_openloop_boost_q 0
foc_sl_openloop_max_q -1
foc_hall_table__0 255
foc_hall_table__1 194
foc_hall_table__2 128
foc_hall_table__3 162
foc_hall_table__4 62
foc_hall_table__5 28
foc_hall_table__6 94
foc_hall_table__7 255
foc_hall_interp_erpm 500
foc_sl_erpm 4000
foc_sample_v0_v7 0
foc_sample_high_current 0
foc_sat_comp_mode 2
foc_sat_comp 0.15
foc_temp_comp 1
foc_temp_comp_base_temp 23.7
foc_current_filter_const 0.1
foc_cc_decoupling 0
foc_observer_type 3
foc_hfi_voltage_start 20
foc_hfi_voltage_run 4
foc_hfi_voltage_max 6
foc_hfi_gain 0.3
foc_hfi_hyst 0
foc_sl_erpm_hfi 3000
foc_hfi_start_samples 5
foc_hfi_obs_ovr_sec 0.001
foc_hfi_samples 1
foc_offsets_cal_on_boot 1
foc_offsets_current__0 2049.41
foc_offsets_current__1 2049.07
foc_offsets_current__2 2047.52
foc_offsets_voltage__0 -0.0037
foc_offsets_voltage__1 0.0077
foc_offsets_voltage__2 -0.004
foc_offsets_voltage_undriven__0 0
foc_offsets_voltage_undriven__1 0
foc_offsets_voltage_undriven__2 0
foc_phase_filter_enable 1
foc_phase_filter_disable_fault 1
foc_phase_filter_max_erpm 4000
foc_mtpa_mode 0
foc_fw_current_max 0
foc_fw_duty_start 0.9
foc_fw_q_current_factor 0.02
foc_fw_ramp_time 0.2
foc_speed_soure 1
gpd_buffer_notify_left 200
gpd_buffer_interpol 0
gpd_current_filter_const 0.1
gpd_current_kp 0.03
gpd_current_ki 50
sp_pid_loop_rate 5
s_pid_kp 0.004
s_pid_ki 0.004
s_pid_kd 0.0001
s_pid_kd_filter 0.2
s_pid_min_erpm 900
s_pid_allow_braking 1
s_pid_ramp_erpms_s 25000
p_pid_kp 0.025
p_pid_ki 0
p_pid_kd 0
p_pid_offset 0
p_pid_kd_proc 0.00035
p_pid_kd_filter 0.2
p_pid_ang_div 1
p_pid_gain_dec_angle 0
cc_startup_boost_duty 0.01
cc_min_current 0.05
cc_gain 0.0046
cc_ramp_step_max 0.04
m_fault_stop_time_ms 500
m_duty_ramp_step 0.02
m_current_backoff_gain 0.5
m_encoder_counts 8192
m_encoder_sin_amp 1
m_encoder_cos_amp 1
m_encoder_sin_offset 1.65
m_encoder_cos_offset 1.65
m_encoder_sincos_filter_constant 0.5
m_encoder_sincos_phase_correction 0
m_sensor_port_mode 0
m_invert_direction 1
m_drv8301_oc_mode 0
m_drv8301_oc_adj 16
m_bldc_f_sw_min 3000
m_bldc_f_sw_max 35000
m_dc_f_sw 25000
m_ntc_motor_beta 3380
m_out_aux_mode 0
m_motor_temp_sens_type 0
m_ptc_motor_coeff 0.61
m_ntcx_ptcx_res 10000
m_ntcx_ptcx_temp_base 25
m_hall_extra_samples 2
m_batt_filter_const 45
si_motor_poles 14
si_gear_ratio 5
si_wheel_diameter 0.2
si_battery_type 0
si_battery_cells 12
si_battery_ah 12.6
si_motor_nl_current 1
motor_brand Unnamed
motor_model Not Specified
motor_weight 0
motor_sensor_type 0
bms.type 0
bms.limit_mode 3
bms.t_limit_start 45
bms.t_limit_end 65
bms.soc_limit_start 0.05
bms.soc_limit_end 0
bms.fwd_can_mode 0

Do you remember what firmware you had on the mk5? Maybe downgrading the vesc firmware to 5.2 could help

1 Like

I don’t recall, but I can try that, thanks. I’m planning on testing the motor with an older 4.0 type VESC to maybe try to see whether I can target the problem to the software or the VESC MK6

Ok, so I managed to downgrade the firmware to HW5.2 (the same version that came with the MK5) and it works perfectly with no faults! I just ran the FOC wizard and it worked perfectly. I also used a previous version of the VESC tool that I used with the original, 3.00, vs the newer 6.00. So there’s definitely a bug or issue somewhere with either the firmware 6.00 or the VESC tool 6.00. I thought it would be the firmware, but I also thought by upgrading it to 6.02 beta would solve it. Apparently not.

Thanks rusins, sometimes it just takes another person to recommend something simple.

5 Likes

I mean, you head tried literally everything else already :smile: I’m glad it worked!

But darn, it’s a shame that FW6 still has motor detection / running bugs :frowning:

@Trampa maybe since you know more details about this case, maybe you could forward the relevant information to BV.

1 Like

The MK6 Version should be used with the MK6 FW only!

Issues like that can be related to many things. Could be a GND loop or bad soldering on one phase connection etc.

Hooking up a voltage supply to ADC is not a good idea BTW. It creates a ground loop in between the power supply and VESC 6. You want to hook up the throttle to 3.3V of the VESC 6. And place a 10k resistor in between GND and the ADC pin, close to the ESC. In case the wire snaps, the resistor will pull the pin low.

We currently run numerous VESC 6MKVI on ADC throttles in our drift trikes and karts. They are all on FW6 and similar motors and there’s no issue.

You could note down detection results or save the XMLs and see if things differ a lot in between the FW versions. Same goes for the App settings.

2 Likes

Hmm, thats interesting,

I’m currently using a thumb throttle I got off Amazon connected to ADC1, though I’ve plugged it in to 5V power because it said to, and I’m getting an ADC voltage from 0.8 to around 2. I won’t use a voltage supply anymore to test it though, thanks for the heads up!

I did check the VESC phase connections inside and out, and I tested it with 3 similar motors with the same result. It could be some that the new firmware is somehow not working with the throttle? My circuit does have a few things on it such as a screen and lights, but it worked with the old VESC and apparently with the old firmware

I’ll check the XMLs when I’m able to work on it this weekend, as this is an interesting conundrum

1 Like

DO NOT PLUG IT INTO 5V. 3.3V ONLY FOR VESC.

3 Likes

Got it, thanks! I’ll switch it out as soon as possible. Its a wonder that it worked before

It’s a wonder that you didn’t fry your MCU haha. The adc pins are not 5v tolerant.

2 Likes

Ok, so here is what I did/found out today:

I switched my throttle to use the 3.3v supply, and it works fine. No wonder I thought my throttle was a little touchy.

I also compared the values of the motors and app, and apparently the motor resistances and inductance are compared differently after FW5.02? (I got a popup). I still tested the values by putting the VESC back to FW6.00 and tried those valuse, and I still get the overcurrent faults issues. Again, all I’m doing is running the FOC wizard and then adjusting the apps just like how I do it with FW5.02. I still don’t quite know the issue.

I can attach files now, so Ill go ahead and link the xml files for FW5.02 and FW6.00. In the meantime I might just keep using FW 5.02

FOC motor 1_13.xml (10.4 KB)
FOC motor fixed FW5.2.xml (8.5 KB)

If you can log the fault, we can look into this. Did you try to lower the motor amps a bit? Did you try to lower the time constant from 1000uS to 500uS?
On a scooter you can create higher current spikes and possibly hit the 150A absolute max. These spikes happen when the stator saturates or when high load shifts occur. Lowering the motor amps a bit sometimes helps quite a lot. The new FW might detect higher possible motor amps. Also regen currents could be set a bit higher, even on 3P.

One thing I noticed is that since FW 5.3 Slow ABS current is set to false by default. I find that to be a pretty important thing to keep on to avoid getting faults.

1 Like

also unable to go above 150a absolute max current

1 Like

Each controller has it’s own ABS MAX set. That setting might get changed by the hardware designer between firmware releases, but that doesn’t mean all controllers will have a different ABS MAX

The Stormcore 100D series did get an update between 5.03 and 6.00 where the designer lowered the ABS MAX from 200 to 150.

3 Likes

Here are some faults I collected:
faults.txt (8.0 KB)
.
Also to note is that I got the overcurrent error with no load on the stand, attached to the powertrain and not. I tried lowering the motor current significantly, and I don’t know if I adjusted the time constant. The regen currents are set pretty low because I have a pretty high gear ratio on it so any higher and the back wheel will just lock up.

1 Like

Slow ABS will increases the chance to kill your controller. The faster you react, the higher the chance of survival.

1 Like

if i remember correctly overcurrent can happened due to high resistance on battery/phase wires. have you checked the solder joints on the vesc. while the chance may be low there could be a dry solder joint

2 Likes

Did you solve the problem, and how? I have very similar issue now with mk6+ vescs and new Trampa motors.