主权项 |
1. A system for monitoring current comprising:
an electrical load; a power MOSFET electrically coupled to the electrical load; a differential amplifier electrically coupled to the power MOSFET; a temperature sensor thermally coupled to the power MOSFET; a processor communicatively coupled to the differential amplifier and the temperature sensor; and a memory communicatively coupled to the processor, the memory storing instructions executable by the processor to perform a method comprising:
receiving a temperature of the power MOSFET, the temperature being sensed by the temperature sensor, the receiving the temperature of the power MOSFET including:
receiving an analog voltage from the temperature sensor, the analog voltage representing the temperature of the power MOSFET, andconverting the analog voltage to a digital number by an analog to digital converter, the digital number representing the temperature of the power MOSFET,determining a resistance of the power MOSFET using the digital number representing the temperature,receiving a voltage across the power MOSFET, the voltage being measured by the differential amplifier,calculating a current provided to the electrical load by the power MOSFET using the determined resistance of the power MOSFET and the received voltage,comparing the calculated current to a predetermined threshold, andswitching the power MOSFET to an off state in response to the calculated current exceeding the predetermined threshold. |