This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Does the temp sensor ADC input eliminate that pin from its other functions?

To anyone who may know,

I would like to invoke the on board temperature sensor, but have no more pins available for use. Since the ADC channel for the sensor is internally multiplexed, does the external pin associated with that channel then become used?

For instance, if I tie the sensor to ADC0, does pin PE3 lose its alternate functions? Or can I still use PE3 for its alternate functions since the sensor is multiplexed internally?

-jamie

  • jamie ruddick said:
    Since the ADC channel for the sensor is internally multiplexed, does the external pin associated with that channel then become used?

    Your selection of the MCU's internal temperature sensor - to my mind - does not impact any of the MCU's external pins.  You note an "association" between the MCU's temperature sensor and an external pin - I do not believe that to be the case.   (My sense - instead - is that the external pin is "divorced" from the temperature sense circuit - via the election of the temperature sense parameter.)

    In support of my position I present the following code extract - this from vendor's code example, "temperature_sense.c":   You'll note that NO ADC channel "association" appears.

    ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_TS | ADC_CTL_IE | ADC_CTL_END);

    You may fairly test either theory (yours or mine) by applying a known/stable voltage to one of the MCU's ADC pins - and then ordering several ADC operations - first w/out ordering temp. sense - and later while ordering it.   Deviation in reading indicates your understanding was correct - but I don't believe such will occur...

    Note that the temperature being measured is that of one of the MCU's PN junctions - and bears little relationship to the MCU's surrounding ambient.   (thus proves not of much (real) value.)

  • Thanks for the reply, my intent was to get the internal temperature so that I can select a maximum operating temp that will be linked to the master interrupt so a shutdown procedure can be executed to save the robot from overheating. It's a safety precaution for operations in excessive heat.
  • That makes sense - yet an external temperature sensor - placed at/around your "most likely" heated components (i.e. the power stage) usually will prove more suitable. Please re-read my earlier post - net is in/out @ my location - I've added to its content.
  • Let me agree with cb1 on the usefulness of the internal temperature sensor. Also keep in mind the errata on it which further compromises it.

    As far as using it as a thermal safety consider these points.

    The internal sensor will maintain a lower temperature than its environment due to thermal resistance to the ambient. There will be a resistance between the ambient and the critical components in the system. The temperature difference between those critical components and what the internal temperature sensor sees will depend on these thermal resistances and the thermal power dropped across each interface.

    I would not be surprised to see 50C difference at high powers, 100C or more wouldn't be shocking. At at zero power the difference will approach a few C. This is likely to complicate any thermal threshold algorithm.

    Robert
  • Indeed Robert - well explained.  

    As I wrote - the "Power Stage" of the robot is most likely to require temperature monitoring to meet poster's goal of, "Save the robot from overheating!"  

    The "indirectness" of the MCU's internal temp. sense renders it (effectively) useless - in that critical role!   (i.e. "alarms" (maybe) long after the building (or robot) has, "Burned to the ground!")