## Introduction

If you’ve ever encountered a linear regulator that gets excessively hot, this blog post will guide you through the steps to troubleshoot and determine if the temperature is within the normal range. We’ll specifically focus on the AMS117-3.3V linear regulator commonly used in ESP microcontrollers.

## Theory

To calculate the theoretical operating temperature of a linear regulator, we need to consider the thermal resistance and power dissipation.

For the surface mount package SOT-223 additional heat sources mounted near the device must be considered. The heat dissipation capability of the PC board and its copper traces is used as a heat sink for the device. The thermal resistance from the junction to the tab for the AMS1117 is 15°C/W. Thermal resistance from tab to ambient can be as low as 30°C/W.

For the AMS117-3.3V linear regulator, the datasheet specifies the Thermal Resistance Junction-to-Case for all packages as $15 °C/W$.

### What is Thermal Resistance Junction-to-Case?

Thermal Resistance Junction-to-Case is a measure of how well heat can move away from the inside of a device to the outside.

Imagine you have a piece of candy (the device) that you’re holding in your hand. Your hand is like the inside of the device, and the air around your hand is like the outside. When you hold the candy for a long time, it starts to feel warm because your hand transfers its heat to the candy. The candy is the regulator, and your hand is the inside of the device.

The Thermal Resistance Junction-to-Case tells you how quickly the heat from the inside of the regulator can escape to the outside. If the Thermal Resistance is low, it means that the regulator can get rid of its heat easily, like when you’re holding the candy near a fan or in a cool room. But if the Thermal Resistance is high, it means that the heat is trapped inside the regulator and it can’t cool down easily, like when you’re holding the candy in your closed hand.

Knowing the Thermal Resistance Junction-to-Case is important because if the regulator gets too hot, it might not work properly or it could even get damaged. So, by looking at this number in the datasheet, you can understand how well the regulator can handle heat and whether it needs additional cooling, like a heat sink or a fan, to keep it from getting too hot.

### Formula

The formula for determining the temperature rise above ambient is as follows:

$$

P_{\text{Dissipated}} = (V_{\text{in}} - V_{\text{out}}) \times I

$$

The Thermal Resistance Junction-to-Case for all packages is $15 °C/W$.

$$

T_{\text{AboveAmbient}} = P_{\text{Dissipated}} \times 15

$$

$$

T_{\text{Final}} = T_{\text{Dissipated}} + T_{\text{Ambient}}

$$

## Calculation

Let’s apply the formula using sample values. Please note that you should measure the actual values in your specific scenario, as they may vary.

### 5V to 3.3V (Sample 1)

Assuming we have an input voltage ($V_{\text{in}}$) of 5V, an output voltage ($V_{\text{out}}$) of 3.3V, and a current ($I$) of 100mA (0.1A), we can calculate the power dissipated ($P_{\text{Dissipated}}$):

$$

P_{\text{Dissipated}} = (V_{\text{in}} - V_{\text{out}}) \times I = (5 - 3.3) \times 0.1 = 0.17 \text{ Watts}

$$

Next, we can determine the temperature rise due to dissipation ($T_{\text{Dissipated}}$) by multiplying $P_{\text{Dissipated}}$ by the thermal resistance:

$$

T_{\text{Dissipated}} = P_{\text{Dissipated}} \times 15 = 0.17 \times 15 = 2.55 \text{ °C}

$$

Finally, adding the temperature rise to the ambient temperature ($T_{\text{Ambient}}$) will give us the theoretical final temperature of the linear regulator. Let’s assume an ambient temperature of 25°C:

$$

T_{\text{Final}} = T_{\text{Dissipated}} + T_{\text{Ambient}} = 2.55 + 25 = 27.55 \text{ °C}

$$

In this example, the calculated theoretical final temperature of the linear regulator is 27.55°C.

### 12V to 3.3V (Sample 2)

Now, let’s consider another scenario where the input voltage ($V_{\text{in}}$) is 12V and the output voltage ($V_{\text{out}}$) is 3.3V. We’ll calculate the theoretical operating temperature of the linear regulator using these values.

Given:

- $V_{\text{in}}$ = 12V
- $V_{\text{out}}$ = 3.3V
- $I$ = 100mA (0.1A)

Using the formula, we can calculate the power dissipated ($P_{\text{Dissipated}}$):

$$

P_{\text{Dissipated}} = (V_{\text{in}} - V_{\text{out}}) \times I = (12 - 3.3) \times 0.1 = 0.87 \text{ Watts}

$$

Next, we determine the temperature rise due to dissipation ($T_{\text{Dissipated}}$) by multiplying $P_{\text{Dissipated}}$ by the thermal resistance:

$$

T_{\text{Dissipated}} = P_{\text{Dissipated}} \times 15 = 0.87 \times 15 = 13.05 °C

$$

Assuming an ambient temperature ($T_{\text{Ambient}}$) of 25°C, we can calculate the theoretical final temperature of the linear regulator:

$$

T_{\text{Final}} = T_{\text{Dissipated}} + T_{\text{Ambient}} = 13.05 + 25 = 38.05 °C

$$

In this example, with an input voltage of 12V and an output voltage of 3.3V, the calculated theoretical final temperature of the linear regulator is 38.05°C.