TExcelTAD
Home › EE Foundations: Units, Measurement, Safety & the Lab Notebook › Mini Project: Measure, Simulate and Report a Voltage Divider

Mini Project: Measure, Simulate and Report a Voltage Divider

A sensor board needs a 3.4 V3.4\ \text{V} reference taken from a 5 V5\ \text{V} rail, and the design says "use a divider of 4.7 kΩ4.7\ \text{k}\Omega and 10 kΩ10\ \text{k}\Omega, 1 %". Your task is to give the team evidence: predict the output with its spread over production, measure one built divider with its uncertainty, decide whether the two agree, and write it up as a short lab report. Nothing here is new; every step uses one or two lessons of the course, linked as you go. It is the Stage 0 milestone of the roadmap: a report with objectives, circuit diagram, equipment list, measurements, uncertainty, results and conclusions.

The circuit and the plan

+- Vs = 5.00 Vlimit 20 mA R14.7k 1% R210k 1% V+COM Vout I 0 V
Step What you do Lesson
1 predict the output, its worst case and its production spread resistors and E-series, uncertainty
2 plan a safe build and the measurements bench supply, breadboard, safe bench practice
3 measure, with the meter's accuracy and repeat readings multimeter
4 compare prediction and measurement uncertainty
5 sweep the input and fit the ratio Python toolkit
6 write the report lab notebook and report

Step 1: predict

The divider equation follows from one current through both resistors, I=Vs/(R1+R2)I = V_s/(R_1 + R_2), and Vout=IR2V_\text{out} = IR_2:

Vout=Vs R2R1+R2=5.00 V×10 kΩ14.7 kΩ=3.40 VV_\text{out} = V_s\,\frac{R_2}{R_1 + R_2} = 5.00\ \text{V} \times \frac{10\ \text{k}\Omega}{14.7\ \text{k}\Omega} = 3.40\ \text{V}

Check by units and size: kΩ/kΩ\text{k}\Omega/\text{k}\Omega cancels, and the output is between 0 and VsV_s, closer to VsV_s because R2>R1R_2 > R_1. The worst case puts both resistors at the edges of their tolerance in the direction that moves the output most (high R2R_2 with low R1R_1, and the reverse). A Monte Carlo run draws thousands of boards with resistors spread evenly across their tolerance band, which is closer to what production sees.

python · try it yourself
import numpy as np

Vs, R1, R2, tol = 5.00, 4.7e3, 10e3, 0.01        # V, ohm, ohm, 1 % resistors
ratio = R2 / (R1 + R2)
I = Vs / (R1 + R2)
print(f"nominal: Vout = {Vs * ratio:.4f} V, ratio = {ratio:.4f}, I = {I * 1e3:.3f} mA")
print(f"power: R1 {I**2 * R1 * 1e3:.3f} mW, R2 {I**2 * R2 * 1e3:.3f} mW")

hi = Vs * R2 * (1 + tol) / (R2 * (1 + tol) + R1 * (1 - tol))
lo = Vs * R2 * (1 - tol) / (R2 * (1 - tol) + R1 * (1 + tol))
print(f"worst case: {lo:.4f} V to {hi:.4f} V")

rng = np.random.default_rng(1)
n = 100_000
r1 = R1 * (1 + rng.uniform(-tol, tol, n))
r2 = R2 * (1 + rng.uniform(-tol, tol, n))
v = Vs * r2 / (r1 + r2)
print(f"Monte Carlo: mean {v.mean():.4f} V, std {v.std():.4f} V")
print(f"95 % of boards between {np.percentile(v, 2.5):.4f} and {np.percentile(v, 97.5):.4f} V")

Rm = 10e6                                        # the voltmeter's input resistance
R2m = R2 * Rm / (R2 + Rm)
loaded = Vs * R2m / (R1 + R2m)
print(f"with the meter connected: {loaded:.4f} V ({(loaded - Vs * ratio) * 1e3:+.2f} mV)")
nominal: Vout = 3.4014 V, ratio = 0.6803, I = 0.340 mA
power: R1 0.544 mW, R2 1.157 mW
worst case: 3.3795 V to 3.4230 V
Monte Carlo: mean 3.4013 V, std 0.0089 V
95 % of boards between 3.3844 and 3.4182 V
with the meter connected: 3.4003 V (-1.09 mV)

Three things to note in the notebook. The dissipation is about a milliwatt, so ordinary 0.25 W0.25\ \text{W} resistors are far inside their rating. The worst case (±22 mV\pm 22\ \text{mV}) is wider than where 95 % of boards land (±17 mV\pm 17\ \text{mV}), because both resistors rarely sit at their extremes together. And the meter's 10 MΩ10\ \text{M}\Omega input lowers the reading by about 1 mV1\ \text{mV}: small here, but several percent with megohm resistors (multimeter). If you want a third opinion, run the same values through the SPICE deck of the toolchain lesson.

Step 2: build safely

Equipment: a bench supply with an adjustable current limit, a 6000-count handheld multimeter, a solderless breadboard, two 1 % metal-film resistors (4.7 kΩ4.7\ \text{k}\Omega, 10 kΩ10\ \text{k}\Omega), jumper wires. Record each instrument's model, serial number and calibration date.

  1. With the supply's output off and nothing connected, set 5.00 V5.00\ \text{V} and a current limit of 20 mA20\ \text{mA} (the circuit needs 0.34 mA0.34\ \text{mA}, so the supply stays in constant-voltage mode; a wiring mistake that shorts the rail is limited to 20 mA20\ \text{mA} and 0.1 W0.1\ \text{W}).
  2. Measure each resistor out of circuit and note the readings.
  3. Build the divider, check the wiring against the schematic, then switch the output on.

Hazards and safe setup: 5 V5\ \text{V} DC from a current-limited, isolated bench supply: no shock hazard, and the limit keeps a short harmless. Keep drinks off the bench, switch the output off before rewiring, and don't use the meter's current jacks for voltage readings (a common way to blow the meter's fuse).

Step 3 and 4: measure and compare

The numbers below are an example data set, so you can run the analysis before you build; replace them with yours. The example meter's DC-volts accuracy on the 6 V range is taken as ±(0.5 %+3 counts)\pm(0.5\ \% + 3\ \text{counts}) with a 1 mV1\ \text{mV} count; read your own meter's specification sheet instead.

Quantity Example reading
VsV_s at the breadboard 5.003 V5.003\ \text{V}
VoutV_\text{out}, five readings a minute apart 3.3983.398, 3.3993.399, 3.3983.398, 3.3973.397, 3.398 V3.398\ \text{V}
temperature, time 23 ∘C23\,^\circ\text{C}, 10:40
python · try it yourself
import numpy as np

def meter_dcv(reading, pct=0.5, counts=3, resolution=0.001):
    """Half-width of the example meter's accuracy band on the 6 V range, in V."""
    return reading * pct / 100 + counts * resolution

vin, vout = 5.003, 3.398
repeats = np.array([3.398, 3.399, 3.398, 3.397, 3.398])
uA = repeats.std(ddof=1) / np.sqrt(len(repeats))           # Type A: scatter of the repeats
u_vout = np.hypot(meter_dcv(vout) / np.sqrt(3), uA)        # with Type B: rectangular accuracy band

R1, R2, tol = 4.7e3, 10e3, 0.01
rng = np.random.default_rng(1)
n = 100_000
r1 = R1 * (1 + rng.uniform(-tol, tol, n))
r2 = R2 * (1 + rng.uniform(-tol, tol, n))
vs = vin + rng.uniform(-1, 1, n) * meter_dcv(vin)          # the measured supply, with its uncertainty
pred = vs * r2 / (r1 + r2)

d = vout - pred.mean()
U = 2 * np.hypot(u_vout, pred.std())                        # expanded uncertainty, k = 2
print(f"Type A of 5 repeats: {uA * 1e3:.2f} mV")
print(f"measured  Vout = {vout:.3f} V, u = {u_vout * 1e3:.1f} mV")
print(f"predicted Vout = {pred.mean():.4f} V, u = {pred.std() * 1e3:.1f} mV")
print(f"difference {d * 1e3:+.1f} mV, expanded uncertainty of the difference {U * 1e3:.1f} mV")
print("consistent" if abs(d) <= U else "NOT consistent: look for a mistake")
Type A of 5 repeats: 0.32 mV
measured  Vout = 3.398 V, u = 11.5 mV
predicted Vout = 3.4033 V, u = 14.1 mV
difference -5.3 mV, expanded uncertainty of the difference 36.5 mV
consistent

The scatter of repeated readings (Type A, 0.3 mV0.3\ \text{mV}) is tiny next to the meter's accuracy band (Type B, 11.5 mV11.5\ \text{mV} as a standard uncertainty): reading the display five times does not make the meter more accurate. The analysis treats the two voltage readings as independent, which overstates the uncertainty a little: both come from the same meter on the same range, so a gain error would affect them alike and partly cancel in the ratio. Say so in the report.

Step 5: sweep the input and fit the ratio

Set the supply to 1, 2, 3, 4 and 5 V, read both voltages each time, and fit a straight line. Its slope is the divider ratio measured over the whole range, and a non-zero intercept would reveal an offset in the meter.

python · try it yourself
import numpy as np
import matplotlib.pyplot as plt

vin = np.array([1.001, 2.002, 3.000, 4.004, 5.003])        # example readings, V
vout = np.array([0.680, 1.360, 2.038, 2.720, 3.398])
(k, b), cov = np.polyfit(vin, vout, 1, cov=True)
uk, ub = np.sqrt(np.diag(cov))
nominal = 10 / 14.7
print(f"slope {k:.5f} +/- {uk:.5f} (fit scatter only), intercept {b * 1e3:.2f} +/- {ub * 1e3:.2f} mV")
print(f"nominal ratio {nominal:.5f}, measured is {(k / nominal - 1) * 100:+.2f} % off")

err = vout * 0.005 + 0.003                                  # meter accuracy band, V
plt.errorbar(vin, vout, yerr=err, fmt="o", capsize=3, label="measured (meter band)")
plt.plot([0, 5.2], [b, b + k * 5.2], label=f"fit: slope {k:.4f}")
plt.xlabel("input voltage Vs (V)")
plt.ylabel("output voltage Vout (V)")
plt.title("Divider 4.7k / 10k: output against input")
plt.legend()
plt.grid(True)
plt.show()
slope 0.67919 +/- 0.00008 (fit scatter only), intercept 0.26 +/- 0.25 mV
nominal ratio 0.68027, measured is -0.16 % off

The ratio is 0.16 %0.16\ \% below nominal, well inside what 1 % resistors allow, and the intercept is zero within its uncertainty. The fit's own uncertainty (0.000080.00008) only describes the scatter of the points; the meter's gain accuracy limits what you really know about the slope, to about 0.5 %0.5\ \% unless the gain errors cancel in the ratio.

Step 6: the report

Use this template; each heading is one or two short paragraphs or a table. The lab notebook lesson explains what belongs in each part.

text
Title:        Verification of the 3.4 V reference divider (R1 4.7k, R2 10k, 1 %)
Author, date: ...
1 Objective   Show that Vout = 3.40 V within the production spread at Vs = 5.00 V.
2 Circuit     Schematic with values, tolerances, test points and meter connection.
3 Equipment   Supply, meter (model, serial, calibration date), breadboard, resistors.
4 Method      Setup, safety settings (5.00 V, 20 mA limit), order of readings, conditions.
5 Prediction  Nominal, worst case, Monte Carlo 95 % range, meter loading.
6 Results     Raw readings table, repeat readings, sweep table and plot.
7 Uncertainty Budget: meter accuracy (Type B), repeats (Type A), supply, resistors.
8 Discussion  Agreement within k = 2? Correlations ignored? What would improve it?
9 Conclusion  One sentence answering the objective, with the number and its uncertainty.
Appendix      Python and SPICE files (Git commit hash), notebook page references.

For the example data the conclusion would read: "The measured output, (3.398±0.023) V(3.398 \pm 0.023)\ \text{V} (k=2k = 2), agrees with the prediction (3.403±0.028) V(3.403 \pm 0.028)\ \text{V} (k=2k = 2); the divider meets its 3.40 V3.40\ \text{V} target within the production spread." Each expanded uncertainty is twice the standard uncertainty printed in step 4.

Extensions

  • Replace the resistors with 470 kΩ470\ \text{k}\Omega and 1 MΩ1\ \text{M}\Omega and repeat: the meter's loading now shows (predict it first).
  • Warm R2R_2 gently with your hand and watch the last digit: resistor temperature coefficients (thermal lesson).
  • Put the analysis and the report in a Git repository, one commit per step.

Practice

  1. With 5 %5\ \% resistors instead of 1 %1\ \%, what is the worst-case output range?
  2. Why measure VsV_s at the breadboard instead of reading the supply's display?
Answer
  1. 5.00 V×10.5/(10.5+4.465)=3.508 V5.00\ \text{V} \times 10.5/(10.5 + 4.465) = 3.508\ \text{V} and 5.00 V×9.5/(9.5+4.935)=3.291 V5.00\ \text{V} \times 9.5/(9.5 + 4.935) = 3.291\ \text{V}: about ±0.11 V\pm 0.11\ \text{V}, five times wider.
  2. The display has its own accuracy (often coarser than a handheld meter), and the wiring drops a little voltage. Measuring both voltages with the same meter also lets some of its gain error cancel in the ratio.

Test yourself

What is the output of a divider with R1=4.7 kΩR_1 = 4.7\ \text{k}\Omega (top) and R2=10 kΩR_2 = 10\ \text{k}\Omega (bottom) from 5.00 V5.00\ \text{V}?

  1. 1.60 V1.60\ \text{V}
  2. 2.35 V2.35\ \text{V}
  3. 3.40 V3.40\ \text{V}
  4. 10.6 V10.6\ \text{V}

Why is the Monte Carlo range narrower than the worst case?

  1. Monte Carlo has a bug
  2. Both resistors rarely sit at the extreme of their tolerance in the worst direction at the same time
  3. The worst case ignores tolerance
  4. Monte Carlo uses 5 % resistors

Five repeat readings scatter by 0.3 mV0.3\ \text{mV}, and the meter's accuracy band is ±20 mV\pm 20\ \text{mV}. What limits the uncertainty?

  1. The scatter of the repeats
  2. The meter's accuracy
  3. The number of repeats
  4. The display's resolution

Why is the bench supply's current limit set to 20 mA20\ \text{mA} for a circuit that needs 0.34 mA0.34\ \text{mA}?

  1. To make the circuit run faster
  2. So that a wiring short is limited to a harmless current while normal operation stays in constant-voltage mode
  3. Because the resistors need 20 mA
  4. The limit has no effect