You are here

Configurable Beta factor for motor NTC.

12 posts / 0 new
Last post
Danny Bokma
Offline
Last seen: 2 months 2 weeks ago
VESC Original
Joined: 2017-05-24 12:11
Posts: 53
Configurable Beta factor for motor NTC.

Dear all, 

Not sure if this is the right place to post a feature request like this but here we go;

I plan to use the VESC6 in an industrial automation application (fancy name for a servo motor) and utilize its safety motor temperature protection feature, however during the build of a couple of prototypes I ran into the following problem:
We source motors with embedded NTC sensors placed(glued) right onto the winding end (we can't chose a different one). The Beta factor of the NTC in the motor is significantly different to the one that is hard coded in the firmware:

#define NTC_RES_MOTOR(adc_val)    (10000.0 / ((4095.0 / (float)adc_val) - 1.0)) // Motor temp sensor on low side
#define NTC_TEMP_MOTOR()        (1.0 / ((logf(NTC_RES_MOTOR(ADC_Value[ADC_IND_TEMP_MOTOR]) / 10000.0) / 3434.0) + (1.0 / 298.15)) - 273.15)

In some situations the motor becomes quite hot (whilst still in the specified operating region being max 100 degree C), when for example the real motor temp in a situation is 80 degrees C the VESC will read > 120C. Because of the difference in the real Beta factor with respect to the hard coded beta factor the temperature of the motor read by the VESC is different to the real temperature. The wrongly measured temperature in combination with the build in limit of the VESC-Tool is 120C (motor_start and motor_end temperature) makes it hard for me to utilize this awesome safety feature. We would like to use the motor to the max of 100C but we are currently limited to 80C.

I post this as a feature request because having the Beta factor of the external NTC configurable would benefit many other users with NTC with different Beta factors as well.

Possible simple workaround:
Change the VESC-tool configurable temperature range to an extreme like 200C. Whilst the temperature read by the VESC is still wrong, we are now able to implement the safety current throttling feature.

Make a new HW version define:
Changing the beta factor in the HW define solves the issue for individuals. The drawback is of course that a different HW release will have to be build for every different NTC Beta factor.

Ideal solution:
Having the NTC beta factor of the motor NTC configurable in the VESC-tool. This would be an ideal solution but does require some work on both the firmware and pc side software. 

 

Thanks in advance for your time and consideration! 

benjamin
Offline
Last seen: 1 week 2 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

It should not be that difficult to add a configuration option for the beta factor the firmware and VESC Tool. The best place is probably under the Motor > Advanced page. Added to the todo list:

http://vesc-project.com/node/110

Danny Bokma
Offline
Last seen: 2 months 2 weeks ago
VESC Original
Joined: 2017-05-24 12:11
Posts: 53

Thanks Benjamin!

This would really help us evaluating the prototypes and directly put sensible temperature data in our logs.

benjamin
Offline
Last seen: 1 week 2 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

This is now done in FW 3.28.

Danny Bokma
Offline
Last seen: 2 months 2 weeks ago
VESC Original
Joined: 2017-05-24 12:11
Posts: 53

Thanks again!

Impressive fast implementation and release :). My setup measures temperature like a charm now!

Boesila
Offline
Last seen: 2 years 12 months ago
VESC Original
Joined: 2017-05-24 12:24
Posts: 18

Hi,

I have this motor: http://diyelectricskateboard.com/diy-electric-skateboard-kits-parts/elec...

I guess it has an 10k NTC... I measured a resistance of 12k @ ~21 °C

In the realtime tab of the VESC tool it shows T motor =  -273.1 °C when I connect the cable (I know that the beta VESC6 has wrong lables at this port, so it should be right connected, hall sensoers are working fine) 

Which beat factor should I use to get the right temperature? Or should I do something else to get the right temperature?

THX for any help in advance. 

Danny Bokma
Offline
Last seen: 2 months 2 weeks ago
VESC Original
Joined: 2017-05-24 12:11
Posts: 53

If you have no NTC connected and have the default beta factor of 3380,0 you should read a temperature value of about -56 degree (this is my case). When you connect a NTC at room temperature between TEMP and GND you will read about 20 degree (depending on your room temperature). The beta factor can be found in the datasheet of the NTC. If you have no datasheet or the NTC Beta factor is not stated then most likely the default value of  3380 should be fine. If you read -273.1 ( or 0 kelvin ) your beta value might bet very much off from the real value.

Boesila
Offline
Last seen: 2 years 12 months ago
VESC Original
Joined: 2017-05-24 12:24
Posts: 18

Thanks for your reply Danny. I measured the 12k Ohm between the red and the white cable... as described this is between 5V an Temp-sensor (see below). When I connect the white cable to GND (as you described), than ist works and shows ~ 20°C. For this test I disconnected the hall sensor cables.  Now I'm not sure whether I really should change the GND and 5V cables (white and black), could the changed polarity damaged my hall senores? 

 

Description from http://diyelectricskateboard.com/diy-electric-skateboard-kits-parts/elec...

Wire configuration:

  • Red = 5v
  • White = Temp
  • Blue = A
  • Yellow = C
  • Green = B
  • Black = GND
ThierryGTLTS
Offline
Last seen: 5 years 6 months ago
Joined: 2017-09-06 14:18
Posts: 116

Hi ,

The NTC must be connected between Temp In and GND.

+Vcc of the Hall sensors can be connected to +5V or +3.3V, see the datasheet of the sensors.

Have a Nice Day.

Thierry

Boesila
Offline
Last seen: 2 years 12 months ago
VESC Original
Joined: 2017-05-24 12:24
Posts: 18

Hi Thierry, 

 

thanks for your help. 

Unfortunately I can not use the temp sensor, because the temp sensor and the hall sensors a soldered on a pcb in the motor. I guess they (DIY electricskateboard) make a mistake and soldered the the wires of temp sensor in the wrong way :-(

Thanks again for all your help :-)

 

RSR
Offline
Last seen: 4 months 4 weeks ago
VESC Original
Joined: 2017-05-24 12:46
Posts: 38

In order to enable temp sensor reading: Maybe you can add a 1k resistor between white and black wires (or between sensor and GND on the sensor-PCB).  I guess this should give approx. 0.9V at 25C and 2.5V at 85C.

slapshot136
Offline
Last seen: 2 years 9 months ago
Joined: 2017-11-12 18:17
Posts: 3

Just to clarify, is the normal beta value 3434k and a 10k nominal resistance value, connected between the gnd & the temp pin on the hall effect connector? I see it as between the VCC & temp pin in this schematic, or is that one for the mosfet temperature?