Skip to main content
GSeme.1
Associate II
December 28, 2021
Solved

How can I use the internal temperature sensor instead of an external one?

  • December 28, 2021
  • 3 replies
  • 1561 views

I have a board that does not have an external temperature sensor. I'm using the motor control toolbox and it doesn't have an option for selecting the internal temperature sensor. I know that the internal one is not very accurate (calibration points at +/- 5C temps) and I know that it will be the die temp and not the air or motor temperature, but I have to work with what is on the board so would like to know how to use that sensor within the motor control framework. I need to use it for over temp shutdown and general remote temperature reporting.

This topic has been closed for replies.
Best answer by GSeme.1

I was able to change to the internal sensor by altering the config data structure in main() so that the internal sensor ADC was used and the value was converted properly based on the eFuse calibration values stored in the device.

3 replies

Laurent Ca...
Senior III
December 31, 2021

Dear @GSeme.1​ 

Welcome to the STM32 Community

Could you give more details to the STM32 Community about your setup -the material you use- ?

(HW and also SW: CPU(s), tools and versions, board(s), motor(s) and so on)

And more especially did you use STM32 MC tools (such as MC_suite, STM32 MC Motor Profile, STM32 MC SDK, STM32 MC Workbench, the used example, the origin of the base of your application source code, and so on)?

Best regards

GSeme.1
GSeme.1Author
Associate II
December 31, 2021

I am using:

MCSDK_v5.Y.3

WB_to_Mx version "1.5.0"

WB_to_Mx.template version "21-06-29"

[Device]

[Modules]

MMICalc DLL - Version 1.0.4.0

and

STM32CubeIDE

Version: 1.8.0

Build: 11526_20211125_0815 (UTC)

OS: Windows 10, v.10.0, x86_64 / win32

Java version: 11.0.11

The hardware is a custom board based on B-G431B-ESC1 (STM32G431CB) with a custom motor. I'm not basing the code on any example; I'm using the code generated by the workbench.

GSeme.1
GSeme.1AuthorBest answer
Associate II
January 4, 2022

I was able to change to the internal sensor by altering the config data structure in main() so that the internal sensor ADC was used and the value was converted properly based on the eFuse calibration values stored in the device.