I updated my script to do a bulk read of temperatures:
IDs as follows:
XC330-T288 (11.1v): 100 - 103, 108 - 111
XL330-M288 (5.0v): 104 - 107, 112 - 115
I can’t upload a text file so here are the first and last temperatures
[22:33:34] : {100: 26, 101: 26, 102: 29, 103: 24, 104: 19, 105: 20, 106: 20, 107: 20, 108: 26, 109: 26, 110: 26, 111: 25, 112: 19, 113: 19, 114: 19, 115: 19}
[22:47:11] : {100: 52, 101: 59, 102: 70, 103: 51, 104: 22, 105: 22, 106: 23, 107: 24, 108: 54, 109: 60, 110: 59, 111: 52, 112: 22, 113: 22, 114: 22, 115: 22}
In only 14 minutes while idle, the worst of the XC330s goes from 29c to 70c, the others are already at the top end of the working temperatures too looking at it closer. I’ve removed the XL330-M288s that are all happily sitting at 22-24c and left only the XC330-T288s.
{100: 52, 101: 59, 102: 70, 103: 52, 108: 54, 109: 60, 110: 60, 111: 52 }
I just realised I left them powered on and had another look as I noticed the LED flashing on one of them:
[23:1:31] : {100: 54, 101: 62, 102: 73, 103: 53, 104: 23, 105: 22, 106: 23, 107: 24, 108: 55, 109: 63, 110: 61, 111: 53, 112: 22, 113: 22, 114: 22, 115: 22}
Four of the eight XC330s are above the recommended temperature range and the worst has raised to 73c! After being idle for 29 minutes this seems really excessive.
These temperatures seem awfully close to the upper limit for this model, remember these values are all at idle with torque disabled for all of them. They were literally just given power and asked to report their temperatures so performing no operations.
Is this expected behaviour or are they all showing signs of a fault? I’ve barely used these too, maybe 15 minutes of working life on them all, and that life was just “raise your arm”. With all the default current and temperature protections in place I don’t see how they could have damaged themselves either.
If anyone can shed light on this I’d appreciate it, I’ve several hundred pounds of servos that it seems I can’t use at the minute and if they are faulty, I’d love to get them replaced sooner than later.
===== Below the code that let me generate the temperature log in case it’s useful to others =====
Code snippets to do it follow, this isn’t a full script but should give you enough to add the same functionality to your own if needed.
Definitions for various addresses
# Control table address
ADDR_HOMING_OFFSET = 20
ADDR_TORQUE_ENABLE = 64
ADDR_LED_RED = 65
ADDR_GOAL_POSITION = 116
ADDR_PRESENT_POSITION = 132
ADDR_PRESENT_TEMPERATURE = 146
BAUDRATE = 1000000
Method that reads all the temperatures and returns them in a map:
def readAllTemperatures():
groupSyncRead = GroupSyncRead(portHandler, packetHandler, ADDR_PRESENT_TEMPERATURE, 1)
for servo_name, servo_id in servos.items():
dxl_addparam_result = groupSyncRead.addParam(servo_id)
dxl_comm_result = groupSyncRead.txRxPacket()
if dxl_comm_result != COMM_SUCCESS:
print("%s" % packetHandler.getTxRxResult(dxl_comm_result))
present_temperature = {}
for servo_name, servo_id in servos.items():
dxl_getdata_result = groupSyncRead.isAvailable(servo_id, ADDR_PRESENT_TEMPERATURE, 1)
if dxl_getdata_result != True:
print("[ID:%03d] groupSyncRead getdata failed" % servo_id)
present_temperature[servo_id] = None
else:
present_temperature[servo_id] = int(groupSyncRead.getData(servo_id, ADDR_PRESENT_TEMPERATURE, 1))
return present_temperature
For reference, all my servos are defined in a map. This makes them easy to iterate over but also means I can get the friendly name for the ID in case there’s an error. It makes troubleshooting a lot easier as I don’t have to remember them:
servos = {
"LEFT_SHOULDER_INOUT": 100,
"LEFT_SHOULDER_FOREAFT": 101,
"LEFT_UPPERARM_ROTATE": 102,
"LEFT_ELBOW": 103,
"LEFT_WRIST_ROTATE": 104,
"LEFT_WRIST_LEFTRIGHT": 105,
"LEFT_WRIST_UPDOWN": 106,
"LEFT_HAND": 107,
"RIGHT_SHOULDER_INOUT": 108,
"RIGHT_SHOULDER_FOREAFT": 109,
"RIGHT_UPPERARM_ROTATE": 110,
"RIGHT_ELBOW": 111,
"RIGHT_WRIST_ROTATE": 112,
"RIGHT_WRIST_LEFTRIGHT": 113,
"RIGHT_WRIST_UPDOWN": 114,
"RIGHT_HAND": 115
}
To create a log file and call the readAllTemperatures()
method:
log_file = open("temp_log.txt", "at")
# Just print all the positions/temperatures
while 1:
current_time = datetime.now()
line = "[{0}:{1}:{2}] : {3}\n".format( current_time.hour,
current_time.minute,
current_time.second,
readAllTemperatures())
print(line)
log_file.write(line)
time.sleep(4)
# print(readAllPositions())
log_file.close()