Thermistors on the ODrive

No thermal camera, unfortunately. Would I have to put 3 thermistors on the MOSFETs (one for each phase) to get a safe temperature reading?

We have thermistors on the ODrive. I haven’t yet done the validation to check how close the thermistor gets to the FET temperature, but you can still use that temperature to keep track of the heat in general. If you are up for, you can add the function to read the temperature from them.

The circuit looks like this:
and the thermistor is a THERMISTOR NTC 10KOHM 3380K.

You can get the voltage for the M0 thermistor in odrivetool by odrv0.get_adc_voltage(15). The mapping for the thermistors are:

  • M0 FETs: channel 15
  • M1 FETs: channel 4
  • Brake resistor FETs: channel 5
1 Like

The thermistors are placed pretty close to the FETs:

I did the required voltage-to-temperature equations in python and then computed a 3rd order polynomial fit. As input is the normalized voltage, which in the ODrive’s case is out of 4096 if using raw ADC values, or out of 3.3V if using voltage.

The coefficients from this 3rd order polynomial fit, from high to low order, are:
[ 363.0172658 -459.19773008 308.29273921 -28.12731452]

The script is here.

1 Like

I’d like to implement a current limiting PID loop in the firmware. It would read the temperatures of the FETs (and motors, if they have thermistors), and adjust the current limit of each axis to keep the motors/FETs within their respective temperature limits. Do you have any recommendations on how to do this?

Sure, just make a PI loop from the temperature to the current_lim. You can run it on the Controller::update code path.

Now on devel, I made the polynomial evaluation in firmware.

Connected to ODrive 366A33683037 as odrv0
In [1]: odrv0.axis0.get_temp()
Out[1]: 29.090396881103516

In [2]: odrv0.axis1.get_temp()
Out[2]: 27.75192642211914

In [3]: start_liveplotter(lambda:[odrv0.axis0.get_temp(), odrv0.axis1.get_temp()])

Here I’m touching the thermistor with my finger causing the deflection:


this gives me an error:

In [1]: odrv0.axis0.get_temp()

AttributeError Traceback (most recent call last)
C:\Anaconda3\lib\site-packages\fibre\ in
----> 1 odrv0.axis0.get_temp()

C:\Anaconda3\lib\site-packages\fibre\ in getattribute(self, name)
243 return attr
244 else:
–> 245 return object.getattribute(self, name)
246 #raise AttributeError(“Attribute {} not found”.format(name))

AttributeError: ‘RemoteObject’ object has no attribute ‘get_temp’

whats the new name called?

trying to test the same function.

Solved by just reading and normalizing the thermistor voltage, then calculate temp by the fitting curve derived by madcowswe

new name is : motor_thermistor.temperature