Motor Temperature?

Trying to read motor temperatures without success. Tried both processors although Python indicates it should be on the Nordic (2).

8D 1A 2 18 42 83 1 5 D8

The responses I get are bad CID. The return packets, without SOP/EOP:

29 2 18 42 83 2 F5

Also in the API documentation the meaning of Thermal Protection Status . There is nothing at the link.

Rud

1 Like

Yes, I tried the python code when I got this and it returns the same answer.

Mike

1 Like

Hey Rud!

Get Temperature (CID 0x4A) takes an input of the array of sensor IDs (as uint8_t) and returns an array of array of {ID (uint8_t), temperature (float)}. You can get the estimated motor temperature by using the left and right motor default sensor IDs, 0x04 and 0x05. Additionally, the command can be called on TID 2 for ST.

Another command I thought might be of interest is “Get Motor Thermal Protection Status”, which has a CID of 0x4B. It should return an array of { temperature (float), status (uint8_t) } and the temperatures are in degrees Celsius. Additionally, the options for Thermal Protection Status are:
0x00 = OK
0x01 = WARN
0x02 = CRITICAL_FORCED_COOL_DOWN

Hope this helps!

Kelsey

1 Like

Kelsey,

A. The Python code has the wrong CID.

sphero_sdk/common/enums/sensor_enums.py:    get_motor_temperature = 0x42

B. Now getting results for Get Temperature using the correct CID. I actually tried that last night because the 0x42 was out of sequence with the other thermal CIDs but the results didn’t look right. Now sending and getting

1A 2 18 4A 83 4 5
4 41 C7 B1 DD 5 41 C7 B1 DD 

There are 2 floating points with the motor indexes. The web page says there should be 2 floating point values for each motor. Or are there other indexes for those?

C. The motor indexes of 4 and 5 are not documented nor are they in the Python as best I can tell. I experimented using indexes from 0x00- 0x10 and there are other values reported. Any idea what they are? Indexes 0x02-0x05 and 0x09-0x0C look like actual readings although others look like they are floating point values. (Say Hi to the firmware folks for me!)

D. Thermal Protection Status has a link that goes nowhere. Suspect the enum definition is missing at the bottom of the Sensors page.

That’s enough for now.

Thanks, Rud

2 Likes

Hi Rud,

Not quite, it’s actually completely the wrong command. get_motor_temperature slipped through the cracks and made it into our Python SDK and our docs. It is a deprecated command, replaced by the more generic get_temperature that takes an array of uint8_t indices, and returns an array of {uint8_t index, float celsiusTemperature}.

C. The motor indexes of 4 and 5 are not documented nor are they in the Python as best I can tell. I experimented using indexes from 0x00- 0x10 and there are other values reported. Any idea what they are? Indexes 0x02-0x05 and 0x09-0x0C look like actual readings although others look like they are floating point values. (Say Hi to the firmware folks for me!)

Hi! get_temperature can be added to our documentation in the future. Incidentally, the similar naming is probably how I managed to accidentally approve get_motor_temperature for the public SDK in the first place. However, I don’t think we’ll ever publicly document all the valid indices. Much like all those pesky register definitions in datasheets that say bits are “reserved”, sometimes we have to keep some things to ourselves. I can tell you that 0x08 is the Nordic die temperature sensor.

Indeed it is, though you can reference this list for now:

There’s more to the motor thermal protection feature, but we’ll want to wait and get the real documentation done for that, rather than detailing it here in the forum. Thanks for spotting the errors!

Sorry I can’t be more enlightening this time…

Jim

2 Likes

Jim,

Thanks for the info. More information will be nice but I’ve got plenty to work with right now.

Rethinking the organization of my code and handling of notifications. streaming, and responses.

Rud

2 Likes