主权项 |
1. An electronic device, comprising:
a metal bar, configured to carry a current to be measured; a temperature sensor, configured to measure a temperature between a first sampling point and a second sampling point located on the metal structure, and output a first signal according to the measured temperature; a temperature sampling detector, configured to receive the first signal output by the temperature sensor, and output a second signal after sampling and filtering the first signal; a voltage sampling detector, configured to detect a first voltage signal at the first sampling point located on the metal structure and a second voltage signal at the second sampling point located on the metal structure, sample and filter a signal difference between the first voltage signal and the second voltage signal, and output a third voltage signal; an analog-digital converter, configured to: receive the second signal output by the temperature sampling detector, convert the second signal into a first digital signal, and output the first digital signal; and receive the third voltage signal output by the voltage sampling detector, convert the third voltage signal into a second digital signal, and output the second digital signal; a controller, configured to: receive the first digital signal and the second digital signal output by the analog-digital converter, restore, according to the first digital signal, the second signal to a temperature value representing the temperature between the first sampling point and the second sampling point, and calculate a resistance value between the first sampling point and the second sampling point according to the temperature value; and restore the third voltage signal to a voltage value representing a voltage between the first sampling point and the second sampling point according to the second digital signal, and calculate, according to the voltage value and the resistance value, a value of a current between the first sampling point and the second sampling point; and wherein the temperature sensor is placed on a midpoint between the two sampling points, and the two sampling points and the temperature sensor are surrounded by multiple holes defined in the metal bar and multiple notches depressed from lateral sides of the metal bar. |