Lesson 8 of 15

Wheatstone Bridge

The Wheatstone Bridge

A Wheatstone bridge is a classic circuit for measuring unknown resistances with high precision. It consists of four resistors arranged in a diamond:

        +Vs
       /    \
     [R1]  [R2]
      |      |
     (A)    (B)   ← Vout = VA - VB
      |      |
     [R3]  [R4]
       \    /
        GND

The output voltage:

Vout = Vs · [R3/(R1+R3) − R4/(R2+R4)]

Balanced vs. Unbalanced

The bridge is balanced (Vout = 0) when:

R1/R3 = R2/R4    (or equivalently: R1·R4 = R2·R3)

In practice: fix R1, R2, R3 to known values, then adjust R4 until Vout = 0. At balance, R4 = R3·R2/R1.

Why It's Powerful

At balance, the measurement is independent of Vs — supply fluctuations don't affect the result. This makes it far more accurate than a simple voltage divider measurement.

Applications

  • Strain gauges (measuring force/deformation)
  • Precision thermometers (RTDs)
  • Pressure sensors
  • Any resistive sensor needing high precision

Examples

VsR1R2R3R4Vout
10V10Ω10Ω10Ω10Ω0V (balanced)
12V6V
12V-2V

Your Task

Implement double wheatstone_bridge(double vs, double r1, double r2, double r3, double r4) that returns Vout = VA − VB.

TCC compiler loading...
Loading...
Click "Run" to execute your code.