Logo
Logo

Measuring Resistances using the Micro:bit

A standard approach for finding quantities that are difficult to measure directly is to determine them indirectly using other, observable variables. In this task, we will measure unknown resistances using the Micro:bit's built-in ADC (Analogue-to-Digital Converter) to read voltage, even though its precision is somewhat limited. Rather than use high-performance external hardware, we will overcome the device's systematic biases through strategic experimental design. To mitigate variations between different ADCs and ensure grading fairness, three separate Micro:bit units are provided.

Note: Significant figures are not reflected in the grading criteria for this problem.

Apparatus and Guidelines

1. Breadboard: A board used to build and connect your experimental circuits. The middle component area features internal connections in horizontal rows of exactly five holes each (A–E and F–J). These left and right five-hole groups are completely isolated from each other by the central divider running down the middle. On the outer edges, holes in each of the two vertical columns (+ and -) are connected.

2. Precision Resistor Sets (A, B, C, and D): High-precision components with a 0.1% tolerance. The known resistors serve as reference "true values" to verify system accuracy. The unknown resistors are shielded with coloured tubing for experimental determination. Any attempt to remove or damage these covers to uncover the hidden values will be strictly penalised as exam misconduct.

  • Resistor Set A: ten $3.3 \text{ k} \Omega$ resistors
  • Resistor Set B: a $6.8 \text{ k} \Omega$ resistor, a $560 \ \Omega$ resistor, and a resistor of unknown value (covered by a green tube). Not used in this experiment.
  • Resistor Set C: a $12 \text{ k} \Omega$ resistor and two resistors of unknown value (one covered by a blue tube and the other by a red tube).
  • Resistor Set D: a $510 \text{ k} \Omega$ resistor and a resistor of unknown value (covered by a black tube).

3. Micro:bit Kit: A complete microcontroller setup consisting of a Micro:bit, an expansion board (3a), three pre-connected jumper wires (3b, 3c, 3d), and a battery holder (3e) equipped with AAA alkaline batteries.

Measuring Electric Potential and Instrumentation with provided Micro:bit kit

None

1. Wiring Guide (Refer to Fig. 1)

Connect the three jumper wires from the expansion board according to their vertical positions:

  • 3b: Top Jumper Wire (yellow wire / top pin in Fig.1). Touch this to the specific node where you want to measure the voltage.
  • 3c: Middle Jumper Wire (red wire / middle pin in Fig. 1). Connect to the circuit's power input ($V_c$,+) node.
  • 3d: Bottom Jumper Wire (black wire / bottom pin in Fig.1). Connect to the circuit's ground (GND, -) reference node.

Fig.1

2. Measurement Procedure

  1. Power Setup: Connect the Bottom (GND) and Middle ($V_c$) wires to your circuit first, then switch the battery pack ON.
  2. Pin Contact: While the power is on, touch the Top jumper wire to the target node.
  3. Data Entry: Press Button A or B on the front of the Micro:bit and record the scrolling digital value ($N$).

3. Important Notices

  • Switch off the battery pack when not in use to conserve power.
  • System Check: Connect the circuit as in Fig.1. When you touch the Top wire to a point near the GND node, the reading should be near 0. When you touch the Top wire to the Middle wire’s connection point ($V_c$), the reading should be near 1023. Verifying both points ensures that the measurement system's zero reference and full scale are correctly calibrated. If the measured values differ significantly from theoretical predictions, it is likely a wiring error or poor contact rather than a hardware limitation.
  • Prevent Shorts: Ensure the Middle ($V_c$) and Bottom (GND) wires do not touch each other directly without a load, as this can cause equipment failure. If a failure occurs, measurements will become unavailable and an error will be indicated on the display; a replacement device will be provided only once per participant.
  • No Simultaneous Use: Connecting more than one Micro:bit to a single circuit may cause system failure and is strictly prohibited.
  • Linear Mapping: In an ideal ADC model, there is a proportional relationship between the node voltage and the integer measurement outcome $N$ (ignoring the discrete step effects arising from the quantisation process). That is, potentials ranging from 0 V to $V_c$ are linearly mapped to digital values between 0 and 1023.

Part A. Exploring the Meaning of ADC Measurement Values

The objective is to investigate the correlation between the Micro:bit's digital output ($N$) and the node potential ($V$). By constructing a circuit using eight identical resistors from 'Resistor Set A', you will examine whether the built-in ADC truly conforms to an ideal linear model. For this measurement, the Micro:bit's pin is assumed to be an ideal probe that does not disturb the circuit's potential distribution.

A1  0.60 Experimental Design and Circuit Schematics

Design a resistor network to verify whether the proportional relationship between voltage and ADC readings holds, and provide a corresponding circuit diagram. When drawing the diagram, adhere to the following guidelines:

Mark all nodes where potential measurements will be taken and assign a unique identifier to each (e.g. $a, b, \dots$).

Clearly label the connection points between the Micro:bit expansion board's power jumpers ($V_c, $ GND) and the resistor network as $V_c$ and GND, respectively.

A2  0.60 Data Collection and Analysis

Conduct this experiment with your circuit using just one Micro:bit to obtain measurements for all nodes. Calculate the differences in ADC measurements between adjacent nodes to determine if it is linear based on a maximum deviation of 2% (single largest difference between any individual data point and the average value of the dataset).

[Instructions for Subsequent Experiments]

Upon completion of Part A, retain only two of the resistors used in the experiment and return all others to their original container (Resistor Set A). This is to ensure they are not mixed with other components.

Part B. Simple Estimation and Error Analysis of Unknown Resistance Using a Known Reference

The objective of this part is to estimate the value of an unknown resistance $r$ using a known reference resistor $R$ and the Micro:bit's ADC output. The following assumptions are made for the analysis:

  • ADC Linearity: The internal ADC is assumed to maintain a linear relationship between potential and the digital output $N$.
  • Notation for Calibration Constants: $N_{L}$ and $ N_{H}$ represent the readings at the GND and $V_c$ nodes, respectively. (Ideally, $N_{L} = 0$ and $N_{H} = 1023$).
  • Setup: Select any two of the identical resistors from Part A to serve as the reference ($R$) and the unknown ($r$).

B1  0.50 Circuit Design and Schematics

Design a measurement circuit to measure an unknown resistor ($r$), using a reference resistor ($R$). Provide a corresponding circuit diagram.

Note: The reference resistor $R$ must be directly connected to the GND node. Label all measurement nodes with letters and specify all related variables in the circuit diagram. Clearly label the connection points between the Micro:bit expansion board's power jumpers ($V_c, $ GND) and the resistor network as $V_c$ and GND, respectively.

B2  0.50 Derivation of Estimation Formulas

Using the voltage divider rule, derive an expression for the unknown resistance $r$. Start by establishing the relationship between node potentials, and then derive the final formula in terms of ADC output values $N_L,N_H$. Then rewrite the formula, substituting the ideal values $N_{L} = 0$ and $N_{H} = 1023$.

B3  1.00 Experiment and Data Analysis

Perform measurements using three Micro:bits, taking one reading per node for each device. Assuming the true values of both the known and unknown resistances are $3.3\text{ k}\Omega$, calculate the mean relative error ($\bar{\epsilon}$) averaged over the three ADCs, and the relative standard deviation (RSD) of the estimated resistance values.

(Mean relative error is the average magnitude of the deviation between measured and true values, divided by the true value. RSD is the ratio of the standard deviation to the mean.)

B4  0.60 Analyse how the ADC measurement error ($e$) affects the accuracy of the estimated resistance. For simplicity, assume $N_{L}=0$ and $N_{H}=1023$. Derive a relationship for the resulting resistance error $\Delta r$ in terms of $N,e$ and $R$. Assume that $e$ is sufficiently small compared to $N$.

B5  0.90 Resistance Range for a Given Error Tolerance

Assuming an ADC error of $e=1$, calculate the range of $r/R$ for which the relative error of the resistance ($\frac{\Delta r}{r}$) remains below 1%.

[Instructions for Subsequent Experiments]

Upon completion of Part B, return all resistors to their original container (Resistor Set A). This is to ensure they are not mixed with other components.

Part C. Improving Resistance Estimation (1) : Overcoming The Problem of Quantization Error

This experiment aims to achieve more accurate resistance estimation under conditions where the basic method from Part B is insufficient due to quantisation error. Quantisation error is the difference between the continuous analogue input signal and its discrete, digitised representation resulting from the finite resolution of an Analogue-to-Digital Converter (ADC). When the resistance ratio ($r/R$) deviates significantly from 1, the quantisation error (a single-step difference in ADC reading) is disproportionately amplified, leading to substantial errors in the estimated resistance.

For this part, use Resistor Set C.

C1  0.60 Initial Resistance Estimation and Statistical Analysis

Using the reference resistor ($12\text{ k}\Omega$) from Resistor Set C, estimate the values of unknown resistors $r_1$ (blue tube) and $r_2$ (red tube) respectively, based on your Part B method. Calculate the estimated resistance using just one of the three Micro:bits.

C2  0.60 Experimental Design for Precision Enhancement

The precision or reliability of the estimated values obtained in C.1 for the unknown resistor $r_2$ (red tube) may not be entirely satisfactory. This is because the estimation error depends on the resistance ratio ($r/R$), following a U-shaped curve.

Design an experiment to achieve a more accurate estimation of $r_2$, and provide the necessary circuit diagrams using resistors $R, r_1, r_2$.

Note: Clearly label the measurement nodes and associated variables. Clearly label the connection points between the Micro:bit expansion board's power jumpers ($V_c, $ GND) and the resistor network as $V_c$ and GND, respectively.

C3  0.70 Experiment and Data Analysis


Re-estimate the value of $r_2$ based on the new experimental design proposed in C.2. Calculate the resistance using each of the three Micro:bits, and calculate the difference between the maximum and minimum values of the estimated resistance.

[Instructions for Subsequent Experiments]

Upon completion of Part C, return all resistors to their original container (Resistor Set C). This is to ensure they are not mixed with other components.

Part D. Improving Resistance Estimation (2)

Resistor Set D contains a known resistor $R_1(=510 \text{ k} \Omega)$ and an unknown resistor $r$. For this resistor, applying the simple estimation method from Part B may lead to significant measurement errors. The discrepancies observed in this task arise from a distinct physical factor—one that is fundamentally different from ADC non-linearity and the amplification of quantisation errors (Part C). Your challenge is to identify this underlying factor and develop a measurement strategy to achieve an accurate estimation of $r$.

D1  0.80 Circuit Design and Schematics


Devise a method to improve the accuracy of estimating the unknown resistance $r$, and provide a corresponding circuit diagram.


Note: Label all measurement nodes and associated variables. Clearly label the connection points between the Micro:bit expansion board's power jumpers ($V_c, $ GND) and the resistor network as $V_c$ and GND, respectively.

D2  1.80 Derivation of Estimation Formulas

Based on your circuit design, derive the mathematical expressions required to calculate the unknown resistance $r$. Start by establishing the relationship between node potentials and $r$, then derive the final formula using ADC output values ($N_H , N_L$).

D3  0.80 Experiment and Data Analysis

Implement your design and estimate the value of $r$. Calculate the estimated resistance using each of the three Micro:bits. Calculate the mean ($\bar r$) and calculate the difference between the maximum and minimum values of the estimated resistances.