## Sunday, January 24, 2010

### Finding the resistor values in a voltage divider

Am currently designing an instrumentation amplifier circuit that requires two different voltages for level shifting (Vcc/2 and Vcc/10). To obtain these voltages I'm using a simple voltage divider using three resistors. I tried finding the values by via trial and error--plugging the voltage divider equation into a spreadsheet and manually trying different values to get the correct voltages as well as values available for 5% resistors. Well, after some half dozen tries, I threw my hands up in the air. It's just too clumsy to do it that way. So I took pen and paper and started deriving the necessary equations. Here are the results.

Given the above circuit and the value of either A, B, or C, and given f and g, we want to find the values of the other two resistors. f and g are defined as follows:

$\frac{B+C}{A+B+C}=\frac{1}{f} \textup{ \text{\ \ \ \ Eq.1}}$

$\frac{C}{A+B+C}=\frac{1}{g} \textup{ \text{\ \ \ \ Eq.2}}$

You will notice that if we multiply Eq.1 and Eq.2 by source voltage VS on either side of the equation we get the voltage divider equations. But we don't need VS to find the resistor values.

We first solve for A in both equations.

For Eq.1

$f(B+C)=A+B+C$

$A= (f-1)(B+C)\textup{\ \ \ \ Eq.3}$

For Eq.2

$gC=A+B+C$

$A=(g-1)C-B \textup{\ \ \ \ Eq.4}$

Equating Eq.3 and Eq.4 we have

$(f-1)(B+C)=(g-1)C-B)$

We then solve for either B or C. Let's do B first.

$(f-1)B+B=(g-1)C-(f-1)C$

$fB=(g-f)C$

$B=\frac{(g-f)C}{f}\textup{\ \ \ \ Eq.5}$

Thus,

$C=\frac{fB}{(g-f)}\textup{\ \ \ \ Eq.6}$

Using Eq.3 and substituting Eq.6 for C we have

$A=(f-1)(B+\frac{fB}{g-f})$

$A=(f-1)[\frac{(g-f)B+fB}{g-f}]$

$A=\frac{g(f-1)B}{g-f}\textup{\ \ \ \ Eq.7}$

Thus,

$B=\frac{(g-f)A}{g(f-1)}\textup{\ \ \ \ Eq.8}$

Using Eq.3 and substituting Eq.5 for B we have

$A=(f-1)[\frac{(g-f)C}{f}+C]$

$A=(f-1)[\frac{(g-f)C+fC}{f}]$

$A=\frac{g(f-1)C}{f}\textup{\ \ \ \ Eq.9}$

Thus,

$C=\frac{fA}{g(f-1)}\textup{\ \ \ \ Eq.10}$

Eq.3 and Eq.4 gave us A in terms of B and C. Using these sames equations we can also find B in terms of A and C, and C in terms of A and B. The derivation is trivial so only the results are provided below.

$B=\frac{A}{f-1}-C \textup{\ \ \ \ Eq.11}$

$C=\frac{A}{f-1}-B \textup{\ \ \ \ Eq.12}$

$B= (g-1)C-A\textup{\ \ \ \ Eq.13}$

$C= \frac{A+B}{g-1} \textup{\ \ \ \ Eq.14}$

So there you have it--all the equations necessary to find the resistor values given any of them. In my case I still needed the spreadsheet to help me find values that are commercially available. I plugged in a couple of the equations in the spreadsheet, and then by choosing different values for B given f = 2 and g = 10, I eventually got A = 15K, C = 3K, given B = 12K. Those are values readily available for 5% resistors.

---

Note: I used Codecogs' LaTeX Equation Editor to produce the images for the equations above. Am a newbie to Latex and have no idea how to pad spaces to move "Eq." towards the right. With a bit of trial and error I found that placing x number of "\ ", that's forward slash and then a blank space, will force x number of blank spaces.