You are here

Brakes completely repeatedly failing at high temperature

11 posts / 0 new
Last post
Paul15578
Offline
Last seen: 4 years 2 weeks ago
VESC Original
Joined: 2017-09-15 15:36
Posts: 26
Brakes completely repeatedly failing at high temperature

Hi Guys, 

I am having issues with the brakes failing while the motors are really hot (deliberately hot to test functionality) around 90 degrees (thermistors in coils) 
And usually only if I have the motor amps set high. Eg above 50A or above.
That flat zone is where the brakes stop working, (-0.1A working). Brakes will fail repeatedly at around 90 degrees but not before.

I can still accelerate normally during the high temperature brake failure, but as soon as I go into any brake, even full brake, I just free roll.
After maybe 15 seconds in this instance,(first image - showing two vesc6 readouts) sometimes longer, they brakes kick in, the whole flat spot was full braking with no effect.
You can see when the brakes finally decided to kick in at the end.

I have tried various temperature settings, tried modifying saturation compensation, tried changing observer gain, not sure what else to do. 
It seems it is applying "minium current" of 0.1A from the Motor general advanced tab, but I dont understand why it would not be braking when it can still accelerate (as in second image), you can see accelerating, and brake failing (flat) 5 times in that image.

Thanks in advance for any help and insight

Paul

2018-03-26 13.34.29.jpg

2018-03-26 14.01.11.png

Paul15578
Offline
Last seen: 4 years 2 weeks ago
VESC Original
Joined: 2017-09-15 15:36
Posts: 26

I changed to and configured different brand motors and reduced the Motor settings - temperature - motor temp cutoff start - limit down to 70 degrees. 
The brakes are now failing at the set 70 degrees. So its not the motors and its not the high temp.

 

benjamin
Offline
Last seen: 12 hours 2 min ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 487

I will have a look. It should actually be the other way when the motor gets warm - braking possible, but no acceleration.

Paul15578
Offline
Last seen: 4 years 2 weeks ago
VESC Original
Joined: 2017-09-15 15:36
Posts: 26

Hi Benjamin, thanks alot for having a look.
It seems it is mostly/only when motor amps are high. At 40A per motor the brakes dont seem to fail even if the temps are reaching the "motor temp cutoff start"
I don't believe it is to do with the "acceleration temperature decrease" or the "Motor temp cutoff end" as I pushed them out so they would only kick in after the "motor temp cutoff start"
Seems to happen right near the "motor temp cutoff start" setting.

 

Roger Wolff
Offline
Last seen: 5 months 3 weeks ago
VESC FreeVESC Original
Joined: 2017-05-24 12:27
Posts: 202

Could it be that this is related to inverting the motor direction? I have the impression that the "invert motor direction" tickmark has a few bugs. Like in this case, braking would be a positive current and acellerating a negative one. If those are not properly handled compared to the invert motor direction then that would lead to this effect. 

Paul15578
Offline
Last seen: 4 years 2 weeks ago
VESC Original
Joined: 2017-09-15 15:36
Posts: 26

Thanks Roger

Any updates Benjamin please?

benjamin
Offline
Last seen: 12 hours 2 min ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 487

Not yet, but I will have a look this weekend. If you have invert motor direction activated, can you try deactivating it, switching two phases and see if it makes any difference?

Ackmaniac
Offline
Last seen: 4 years 7 months ago
Joined: 2017-09-04 23:17
Posts: 10

Paul15578 is right. Problem is that when you come into the range where the amps should be reduced by the temperature (not cut off) then only the higher motor max or min will be reduced. The other value will be 0. So when your motor max is higher then motor min the brakes will be shut off.

// Temperature MOSFET
	float lo_max_mos = 0.0;
	float lo_min_mos = 0.0;
	if (m_temp_fet < conf->l_temp_fet_start) {
		lo_min_mos = conf->l_current_min;
		lo_max_mos = conf->l_current_max;
	} else if (m_temp_fet > conf->l_temp_fet_end) {
		lo_min_mos = 0.0;
		lo_max_mos = 0.0;
		mc_interface_fault_stop(FAULT_CODE_OVER_TEMP_FET);
	} else {
		float maxc = fabsf(conf->l_current_max);
		if (fabsf(conf->l_current_min) > maxc) {
			maxc = fabsf(conf->l_current_min);
		}

		maxc = utils_map(m_temp_fet, conf->l_temp_fet_start, conf->l_temp_fet_end, maxc, 0.0);

		if (fabsf(conf->l_current_max) > maxc) {
			lo_max_mos = SIGN(conf->l_current_max) * maxc;
		}

		if (fabsf(conf->l_current_min) > maxc) {
			lo_min_mos = SIGN(conf->l_current_min) * maxc;
		}
	}

 

Problem can be solved by reducing both values in mosfet and motor temperature

	// Temperature MOSFET
	float lo_max_mos = 0.0;
	float lo_min_mos = 0.0;
	if (m_temp_fet < conf->l_temp_fet_start) {
		lo_min_mos = conf->l_current_min;
		lo_max_mos = conf->l_current_max;
	} else if (m_temp_fet > conf->l_temp_fet_end) {
		lo_min_mos = 0.0;
		lo_max_mos = 0.0;
		mc_interface_fault_stop(FAULT_CODE_OVER_TEMP_FET);
	} else {
		lo_min_mos = SIGN(conf->l_current_min) * utils_map(m_temp_fet, conf->l_temp_fet_start, conf->l_temp_fet_end, fabsf(conf->l_current_min), 0.0);
		lo_max_mos = SIGN(conf->l_current_max) * utils_map(m_temp_fet, conf->l_temp_fet_start, conf->l_temp_fet_end, fabsf(conf->l_current_max), 0.0);
            
		/*float maxc = fabsf(conf->l_current_max);
		if (fabsf(conf->l_current_min) > maxc) {
			maxc = fabsf(conf->l_current_min);
		}

		maxc = utils_map(m_temp_fet, conf->l_temp_fet_start, conf->l_temp_fet_end, maxc, 0.0);

		if (fabsf(conf->l_current_max) > maxc) {
			lo_max_mos = SIGN(conf->l_current_max) * maxc;
		}

		if (fabsf(conf->l_current_min) > maxc) {
			lo_min_mos = SIGN(conf->l_current_min) * maxc;
		}*/
	}

	// Temperature MOTOR
	float lo_max_mot = 0.0;
	float lo_min_mot = 0.0;
	if (m_temp_motor < conf->l_temp_motor_start) {
		lo_min_mot = conf->l_current_min;
		lo_max_mot = conf->l_current_max;
	} else if (m_temp_motor > conf->l_temp_motor_end) {
		lo_min_mot = 0.0;
		lo_max_mot = 0.0;
		mc_interface_fault_stop(FAULT_CODE_OVER_TEMP_MOTOR);
	} else {
		lo_min_mot = SIGN(conf->l_current_min) * utils_map(m_temp_motor, conf->l_temp_motor_start, conf->l_temp_motor_end, fabsf(conf->l_current_min), 0.0);
		lo_max_mot = SIGN(conf->l_current_max) * utils_map(m_temp_motor, conf->l_temp_motor_start, conf->l_temp_motor_end, fabsf(conf->l_current_max), 0.0);
		/*    
		float maxc = fabsf(conf->l_current_max);
		if (fabsf(conf->l_current_min) > maxc) {
			maxc = fabsf(conf->l_current_min);
		}

		maxc = utils_map(m_temp_motor, conf->l_temp_motor_start, conf->l_temp_motor_end, maxc, 0.0);

		if (fabsf(conf->l_current_max) > maxc) {
			lo_max_mot = SIGN(conf->l_current_max) * maxc;
		}

		if (fabsf(conf->l_current_min) > maxc) {
			lo_min_mot = SIGN(conf->l_current_min) * maxc;
		}*/
	}

 

 

benjamin
Offline
Last seen: 12 hours 2 min ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 487

Well spotted @Ackmaniac, thanks! Such an obvious mistake. The reason I never noticed it is that I have always used the same acceleration and braking current, which would not trigger the bug. The more difference there is between the acceleration and braking currents, the wider the temperature region where the lower of the two would be set to 0. If this is the only problem, the bug is independent of whether the motor direction is inverted or not.

I went with the following solution:

// Temperature MOSFET
	float lo_min_mos = conf->l_current_min;
	float lo_max_mos = conf->l_current_max;
	if (m_temp_fet < conf->l_temp_fet_start) {
		// Keep values
	} else if (m_temp_fet > conf->l_temp_fet_end) {
		lo_min_mos = 0.0;
		lo_max_mos = 0.0;
		mc_interface_fault_stop(FAULT_CODE_OVER_TEMP_FET);
	} else {
		float maxc = fabsf(conf->l_current_max);
		if (fabsf(conf->l_current_min) > maxc) {
			maxc = fabsf(conf->l_current_min);
		}

		maxc = utils_map(m_temp_fet, conf->l_temp_fet_start, conf->l_temp_fet_end, maxc, 0.0);

		if (fabsf(conf->l_current_min) > maxc) {
			lo_min_mos = SIGN(conf->l_current_min) * maxc;
		}

		if (fabsf(conf->l_current_max) > maxc) {
			lo_max_mos = SIGN(conf->l_current_max) * maxc;
		}
	}

	// Temperature MOTOR
	float lo_min_mot = conf->l_current_min;
	float lo_max_mot = conf->l_current_max;
	if (m_temp_motor < conf->l_temp_motor_start) {
		// Keep values
	} else if (m_temp_motor > conf->l_temp_motor_end) {
		lo_min_mot = 0.0;
		lo_max_mot = 0.0;
		mc_interface_fault_stop(FAULT_CODE_OVER_TEMP_MOTOR);
	} else {
		float maxc = fabsf(conf->l_current_max);
		if (fabsf(conf->l_current_min) > maxc) {
			maxc = fabsf(conf->l_current_min);
		}

		maxc = utils_map(m_temp_motor, conf->l_temp_motor_start, conf->l_temp_motor_end, maxc, 0.0);

		if (fabsf(conf->l_current_min) > maxc) {
			lo_min_mot = SIGN(conf->l_current_min) * maxc;
		}

		if (fabsf(conf->l_current_max) > maxc) {
			lo_max_mot = SIGN(conf->l_current_max) * maxc;
		}
	}

The reason it is implemented in this was and not how Ackmaniac suggested is that only the highest current magnitude should be decreased, as the amount of heating is not direction dependent. Arguments can be made for the other way as well, but I lean a bit more towards only decreasing the highest magnitude.

I will test this a bit as well as the impact of the direction inversion, and update the firmware and vesc tool.

benjamin
Offline
Last seen: 12 hours 2 min ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 487

It seems to be working now. You can update to the latest firmware and vesc tool, where it should be fixed. The build script is running now, the downloads should be updated any minute.

Paul15578
Offline
Last seen: 4 years 2 weeks ago
VESC Original
Joined: 2017-09-15 15:36
Posts: 26

Thanks very much to Benjamin and all here on the forum who helped.

Cheers