They say “knowledge is power”. Well if you give a RobotC program a little extra knowledge about the state of the currents in the motors and the constants that convert currents into PTC temperatures you can make a very smart monitor. Smart meaning, PTC’s are prevented from ever tripping while maintaining near optimal current capability.
Keeping PTC’s from tripping by limiting current is not a new concept and both teams that I have worked with have used a simple version of a monitor that usually operates during Autonomous phase of a match where the robot might accidentally run into trouble and stall motors. If the stall tripped a PTC, the robot would remain idle for much if not all of the driver segment of the match. We have used a simple compare on the drive train encoder speed to shut off the move functions when the measured speed did not match a expected speed for some predetermined time. This works pretty good for that short controlled scenario. This type of simple monitor doesn’t work too well during driver mode since the speeds vs command don’t reflect the actual temperature state of the PTC which is the only parameter that determines whether or not it trips. If the PTC has heated up partially an is near tripping, speed cannot be used to effectively sense this so my teams usually inhibit the simple monitors during the driver phase.
With the “noble goal” of making monitor that “knows the state of the PTC” , I and others have been developing better models of the Vex current (given command and speed) and then using this current in a differential equation that models the thermodynamic response of a PTC to a current input. These models have been discussed in the Vex forums and are at the point that they can be used to improve existing PTC trip protection software. I have incorporated these models into a Smart PTC current limiter which controls a current limiting function that is inserted between the user command and the standard motor[port] function.
The smart monitor performs the following functions:
1) reads the RobotC configuration matrix and allocates the proper current models based upon the motors being used to feed the 1o motor and 3 CORTEX/POWER EXPANDER PTC models.
2) initializes the safe currents for each of the motors and for each of the higher level CORTEX/PE PTC’s based upon #defines constants.
3)PTC temperatures are computed and compared against a monitor threshold temperature T_m
4) PTC Temperature Limiting: The monitor acts as a PTC thermostat which has a reference setting called T_m. Under normal operating conditions, the PTC monitor logic is false and the current is limited to the maximum possible. If the PTC models sense that the temperature T has exceeded the set point T_m, (which is slightly below the critical temperature of the hardware PTC) ,then the monitor logic trips and the current is limited to a “safe_current” . The safe_current is just below the PTC hold current where a PTC will never trip. The PTC temperature stabilizes and the motor runs with limited current until the estimated PTC temperature drops to about 80% of the critical temperature. At this level, the PTC monitor trip logic is reset and full current capability is restored.
Models used in the monitor are described a some of my recent posts.
I will eventually post details of the RobotC model.