# Math Help - Solving for R2 (or X if that helps)

1. ## Solving for R2 (or X if that helps)

Hello everybody,

I'm working on a micro-controller to measure resistance with an equation that looks like this.

Ao = (R2/ R1+R2)*Vin

Now to make this work with my micro-controller I populate R1 to a known state of 10,000 and Vin to 3.3. What I measure with the micro-controller goes into Ao so I know everything except R2.

I first begin my simplification by dividing Ao by 3.3 leaving me with the following:

R2/10,000 + R2 = Ao /3.3

This is where my math breaks down. I'm not sure how to move R2 out (or move 10,000) out.

I tried populating R2 with a known value and then trying to work out how I could move the numbers to get R2 alone on one side but this didn't work. Closest I got was:

2/6+2 = 1/4 (assuming that 2 is my R2 value)

Any pointers as to how I go about moving R2 would be very helpful. Thanks.

2. $A_0=\left(\frac{R_2}{R_1+R_2}\right)\times V_{in}$

$A_0=\left(\frac{R_2}{R_1}+R_2\right)\times V_{in}$

3. ## Exact Equation

I got the equation from a wikipedia article:

Voltage divider - Wikipedia

The exact equation doesn't have parentheses but looks like the first one you put up. There is a picture of the equation under the "General Case" header, "Resistive Divider" section.

(I also changed Vout to be Ao because that is the pin I've attached it to. Please disregard that inconsistency)

4. If we want to solve to R_2,

Step 1: multiple both side by (R_1+R_2)

2: Subtract R_2 x V_in on both sides.

3: Subtract A_0 on both sides

4: Bring out R_2 on the left hand side

5: Divide out the non R_2 piece on the both sides.

6: Smile, you are done.