---
title: Binary alloys and solder
heading: Free energy of mixing, miscibility gaps, eutectics and the lever rule, from the solder on a circuit board
eyebrow: B11 · Lesson 35 · Alloys and solder
xp: 40
---

::: hook
Tin melts at 232 °C and lead at 327 °C, yet the classic 63/37 tin–lead solder melts at 183 °C, lower than either. Lead-free SAC305 melts near 217 °C for the same reason. Mixing two metals adds entropy, which lowers the free energy of the liquid, while the solids may refuse to mix at all. Lesson 33's phase transitions and lesson 32's lattice-gas free energy combine into phase diagrams, the maps that set reflow profiles and explain why some alloys separate as they cool.
:::

::: play
- The curve is the free energy of mixing per atom of a binary alloy, in the regular-solution model, against the fraction x of the second metal.
- W is the energy cost of unlike neighbors. At W = 0 the curve is pure entropy, always bowl-shaped: the metals mix in any proportion.
- Raise W or lower T. Once T drops below $W/2k$ the curve develops a hump in the middle, and a uniform mixture there is unstable: it separates into two phases. The readout gives that critical temperature.
:::

```sim plot
view: graph
x: x = 0.005..0.995
y: g = auto meV
slider: W = 0..200 step 5 = 100 meV
slider: T = 100..1000 step 10 = 400 K
plot: W*x*(1 - x) + 0.08617333*T*(x*ln(x) + (1 - x)*ln(1 - x)) | label: free energy of mixing, meV per atom | samples: 400
readout: critical temperature W/2k, K = W/(2*0.08617333) | digits: 4
```

::: predict
## Two metals' atoms dislike being neighbors (W > 0). At high enough temperature, do they still mix completely?

- [ ] No, never
- [x] Yes: above $T_c = W/2k$ the entropy of mixing wins at every composition
- [ ] Only at exactly 50%
- [ ] Only if they have the same crystal structure

::: reveal
Yes. The energy cost $Wx(1 - x)$ doesn't depend on temperature, but the entropy term $kT[x\ln x + (1 - x)\ln(1 - x)]$ grows with T. Above $T_c = W/2k$ the free energy curves upward everywhere and a uniform mixture is stable. Below it, a range of compositions separates into two phases, a **miscibility gap**.
:::
:::

::: nameit
## The free energy of mixing

Put N atoms on a lattice, a fraction x of type B. Random placement has the entropy of mixing, $-Nk[x\ln x + (1 - x)\ln(1 - x)]$ (lesson 19's mixing entropy). If unlike neighbors cost extra energy, on average the energy rises by $NWx(1 - x)$. So the free energy of mixing is

$$\frac{\Delta G_{mix}}{N} = Wx(1 - x) + kT[x\ln x + (1 - x)\ln(1 - x)].$$

This **regular solution** model is the same expression as lesson 32's interacting lattice gas.

## Miscibility gaps

Where $\Delta G_{mix}$ curves downward, a uniform alloy can lower its free energy by splitting. The curvature at x = ½ is $4kT - 2W$, so a gap opens below $T_c = \frac{W}{2k}$. Inside the **spinodal** (where the curvature is negative) the alloy separates spontaneously. The compositions that actually coexist, the **binodal**, are found by a common tangent to the curve; for the symmetric model they satisfy $\ln\frac{1 - x}{x} = \frac{W}{kT}(1 - 2x)$.

## Eutectics and the lever rule

When the solids barely dissolve in each other but the liquid mixes freely, each solid's melting point falls as the other metal is added (the freezing-point depression below), and the two liquidus curves meet at the **eutectic**: the lowest melting point, where liquid turns directly into a fine mixture of two solids. Tin–lead's eutectic is at 183 °C and 61.9 wt% tin, where solid α (18.3 wt% tin) and β (97.8 wt% tin) form together.

Inside a two-phase region, the phases' compositions are set by the diagram and their amounts by the **lever rule**: an alloy of overall composition $x_0$ between phases at $x_\alpha$ and $x_\beta$ is a fraction $\frac{x_\beta - x_0}{x_\beta - x_\alpha}$ of α.

## Freezing-point depression

If a little of B dissolves in liquid A but not in solid A, A's melting point drops by

$$\Delta T \approx \frac{RT_m^2}{L}x_B,$$

where L is A's molar heat of fusion. The entropy of mixing in the liquid makes the liquid stable to lower temperatures. The same law governs salt on roads and the extra few kelvin a solder gets from a fraction of a percent of copper.
:::

::: example
## A regular solution has W = 0.1 eV. What's its critical temperature? At 400 K, what compositions coexist, and where is the spinodal?

::: solution
1. **Critical temperature.**
   $$\begin{aligned} T_c &= \frac{W}{2k} \\ &= \frac{0.1}{2 \times 8.617 \times 10^{-5}} \\ &= 580\ \text{K} \end{aligned}$$
2. **Coexisting compositions at 400 K.** Here $\frac{W}{kT}$ = 2.90, and solving
   $$\ln\frac{1 - x}{x} = 2.90(1 - 2x)$$
   by bisection gives x = 0.081.
3. **What separates.** An alloy anywhere between 8.1% and 91.9% B separates into a B-poor phase at 8.1% and a B-rich one at 91.9%.
4. **The spinodal.** It lies where $kT = 2Wx(1 - x)$, at x = 0.221 and 0.779: alloys between these separate spontaneously, while those between the binodal and spinodal need nuclei to start.

**Answer:** $T_c$ = 580 K; at 400 K phases of 8.1% and 91.9% B coexist, and the spinodal is at x = 0.221 and 0.779.
:::
:::

::: example
## A 40 wt% tin solder (the rest lead) cools through the eutectic at 183 °C. Just above 183 °C, how much is still liquid? Just below, how much is α and how much β?

::: solution
1. **Just above 183 °C.** The alloy is solid α (18.3 wt% tin) plus liquid (61.9 wt% tin), so by the lever rule the liquid fraction is
   $$\begin{aligned} f_L &= \frac{40 - 18.3}{61.9 - 18.3} \\ &= \frac{21.7}{43.6} \\ &= 0.498 \end{aligned}$$
2. **Just below.** That liquid has frozen into the eutectic mix, and the whole alloy is α (18.3%) plus β (97.8%), with α fraction
   $$\begin{aligned} f_\alpha &= \frac{97.8 - 40}{97.8 - 18.3} \\ &= 0.727 \end{aligned}$$
   and β 0.273.
3. **Why eutectic solder sets cleanly.** Between the liquidus and 183 °C the joint is pasty, part solid and part liquid; a eutectic solder skips that range, which is why joints made with it set cleanly.

**Answer:** just above 183 °C, 0.498 of the alloy is liquid; just below, 0.727 is α and 0.273 is β.
:::
:::

::: example
## Tin melts at 505.1 K with L = 7.03 kJ/mol. How much should 1 at% of copper, insoluble in solid tin, lower its freezing point? The tin–copper eutectic is at 0.7 wt% copper and 227 °C. How does the estimate compare?

::: solution
1. **Ideal drop for 1 at%.**
   $$\begin{aligned} \Delta T &= \frac{RT_m^2}{L}x \\ &= \frac{8.314 \times 505.1^2}{7030} \times 0.01 \\ &= 3.0\ \text{K} \end{aligned}$$
2. **The eutectic in at%.** 0.7 wt% copper is 1.30 at% (copper's molar mass is 63.5, tin's 118.7), so the ideal estimate is 3.9 K.
3. **Compare.** The actual drop is 5 K, from 232 °C to 227 °C. The ideal dilute law gets the size right; the difference comes from the copper atoms' interactions in the liquid.

**Answer:** 1 at% copper should lower the freezing point by 3.0 K; at the eutectic's 1.30 at% the estimate is 3.9 K, against an actual 5 K.
:::
:::

::: check
kind: parts
given: W = 50 | 100 | 200; T = 300 | 600

## A regular solution has interaction W = {W} meV, at {T} K.

::: part
answer: W/(2*0.08617333)
unit: K
tolerance: 0.5%

### What's its critical temperature?

::: misses
- [W/0.08617333] The curvature at x = ½ is $4kT - 2W$, so $T_c = \frac{W}{2k}$.
- [any] $T_c = \frac{W}{2k}$.
:::
:::

::: part
answer: W/4 - 0.08617333*T*ln(2)
unit: meV
tolerance: 0.5%

### What's the free energy of mixing per atom at x = ½?

::: misses
- [any] $\frac W4 - kT\ln2$.
:::
:::
:::

::: check
given: x = 25 | 30 | 40 | 50
answer: (97.8 - x)/(97.8 - 18.3)
tolerance: 0.5%

## A tin–lead alloy with {x} wt% tin has just solidified below the 183 °C eutectic, into α (18.3 wt% tin) and β (97.8 wt% tin). What fraction is α?

::: right
Right. Lever rule: $\frac{x_\beta - x_0}{x_\beta - x_\alpha}$.
:::

::: misses
- [(x - 18.3)/(97.8 - 18.3)] That's the β fraction; α takes the opposite arm of the lever.
- [any] Lever rule.
:::
:::

::: check
given: x = 25 | 35 | 45
answer: (x - 18.3)/(61.9 - 18.3)
tolerance: 0.5%

## A tin–lead alloy with {x} wt% tin sits just above 183 °C, as solid α (18.3 wt% tin) and liquid (61.9 wt% tin). What fraction is liquid?

::: right
Right. $\frac{x_0 - x_\alpha}{x_L - x_\alpha}$.
:::

::: misses
- [(61.9 - x)/(61.9 - 18.3)] That's the solid fraction.
- [any] Lever rule between α and the liquid.
:::
:::

::: check
given: T = 505.1 | 1358; L = 7.03 | 13.05; x = 0.5 | 2
answer: 8.314462618*T^2/(L*1000)*x/100
unit: K
tolerance: 0.5%

## A metal melts at {T} K with latent heat {L} kJ/mol. How far does {x} at% of an insoluble solute lower its freezing point?

::: right
Right. $\Delta T = \frac{RT_m^2}{L}x_B$.
:::

::: misses
- [8.314462618*T/(L*1000)*x/100] The depression goes as $T_m^2$.
- [any] $\frac{RT_m^2}{L}x$.
:::
:::

::: check
given: w = 10 | 37 | 63
answer: (w/118.71)/(w/118.71 + (100 - w)/207.2)*100
unit: %
tolerance: 0.5%

## A tin–lead solder is {w} wt% tin. What atomic percentage is tin (molar masses 118.71 and 207.2)?

::: right
Right. Convert each mass to moles first.
:::

::: misses
- [w] Tin atoms are lighter, so their atomic share is larger than their weight share.
- [any] Moles of tin over total moles.
:::
:::

::: check
given: H = 0.3 | 0.6 | 1; T = 800 | 1200
answer: exp(-H/(0.00008617333*T))
tolerance: 1%

## Dissolving an atom of B in solid A costs {H} eV. Ignoring the entropy of vibrations, what mole fraction of B can A hold at {T} K?

::: right
Right. The solubility limit goes as $e^{-\Delta H/kT}$, like a vacancy concentration.
:::

::: misses
- [exp(H/(0.00008617333*T))] A positive solution energy makes solubility small.
- [any] $x_s = e^{-\Delta H/kT}$.
:::
:::

::: check
kind: choice

## Why is eutectic solder (63/37 tin–lead, or near-eutectic SAC305) preferred for circuit boards?

- [ ] It's the strongest composition
- [x] It melts and freezes at one temperature, the lowest of any mix, with no pasty range
- [ ] It has the highest electrical conductivity
- [ ] It doesn't need flux

::: right
Right. A joint that freezes at once can't be disturbed while half solid, and the low melting point spares the parts.
:::

::: misses
- [1] Strength isn't what sets the choice; other compositions are as strong.
- [3] Conductivity barely changes across these alloys.
- [4] Every solder needs flux to clean the surfaces.
:::
:::

::: check
kind: derivation
vars: W = 0.05..0.5, t = 0.1..0.99

## A regular solution with interaction W (eV), at a fraction t of its critical temperature.

::: step
answer: W/(2*0.00008617333)

### What's its critical temperature $T_c$?
:::

::: step
answer: (1 - sqrt(1 - t))/2

### The spinodal is where $kT = 2Wx(1 - x)$. Where is it, on the low-x side?
:::

::: step
answer: 2*W*(t - 1)

### What's the curvature $4kT - 2W$ of the free energy at x = ½, in eV?
:::

::: right
Right. The spinodal opens from x = ½ at $T_c$ and widens toward the edges as the alloy cools.
:::
:::

::: check
kind: python

## Write `binodal(W, T)` returning the low-x composition that coexists in a symmetric regular solution with interaction `W` (eV) at temperature `T` (K): the root of $\ln\frac{1 - x}{x} = \frac{W}{kT}(1 - 2x)$ between 0 and ½, found by bisection. Return 0.5 if $T \ge T_c$.

```python starter
import math

def binodal(W, T):
    return 0.25

print(binodal(0.1, 400))
```

```python solution
import math

def binodal(W, T):
    k = 8.617333e-5
    if T >= W / (2 * k):
        return 0.5
    a = W / (k * T)
    f = lambda x: math.log((1 - x) / x) - a * (1 - 2 * x)
    lo, hi = 1e-12, 0.5 - 1e-12
    for _ in range(200):
        mid = 0.5 * (lo + hi)
        if f(mid) > 0:
            lo = mid
        else:
            hi = mid
    return lo

print(binodal(0.1, 400))
```

```python tests
assert abs(binodal(0.1, 400) - 0.0807) < 2e-4, f"At W = 0.1 eV and 400 K the gap edge is near x = 0.081; got {binodal(0.1, 400)}"
assert abs(binodal(0.1, 300) - 0.0247) < 2e-4, "At 300 K it's near x = 0.025."
assert binodal(0.1, 600) == 0.5, "Above Tc = 580 K there's no gap."
assert abs(binodal(0.1, 550) - 0.3065) < 5e-4, "Just below Tc the gap is narrow: x = 0.307."
```

::: right
Right. The gap closes as $T \to T_c$, where both edges meet at x = ½.
:::
:::

::: explain
## Why does a mixture of two metals often melt at a lower temperature than either pure metal?

::: model
Melting happens where the liquid's free energy drops below the solid's. Mixing two metals in the liquid adds entropy of mixing, $-R[x\ln x + (1 - x)\ln(1 - x)]$ per mole, which lowers the liquid's free energy by $T$ times that amount. If the solids can't dissolve much of each other, they get little of this benefit. So adding the second metal favors the liquid, and the melting point falls on both sides of the diagram until the two falling curves meet at the eutectic. The eutectic liquid is stable down to a temperature below either metal's melting point.
:::
:::

::: practice

::: check
given: W = 20 | 30 | 50 | 100 | 150 | 200
answer: W/(2*0.08617333)
unit: K
tolerance: 0.5%

## Critical temperature for W = {W} meV?

::: misses
- [any] $\frac{W}{2k}$.
:::
:::

::: check
given: x = 25 | 30 | 40 | 45 | 50 | 61.9; a = 18.3; b = 97.8
answer: (b - x)/(b - a)
tolerance: 0.5%

## Lever rule: alloy at {x}, phases at {a} and {b}. Fraction of the first phase?

::: misses
- [any] $\frac{x_\beta - x_0}{x_\beta - x_\alpha}$.
:::
:::
:::
