🔍 Overview
The Precision Auto‑Ranging LR Meter is a professional‑grade instrument designed by JEP‑Electronics to measure resistance (10 Ω – 2 MΩ) and inductance (80 µH – 30 mH) with outstanding accuracy. Built on the ubiquitous Arduino UNO platform, it combines a custom analog shield with sophisticated firmware to deliver results rivaling much costlier bench equipment.
Two fundamental measurement principles are employed:
- Resistance – auto‑ranging voltage divider using four precision 0.1% reference resistors (2k, 20k, 200k, 1M).
- Inductance – LC ring‑down method with a fixed 2.0 µF film capacitor and an LM393 comparator to convert the decaying sine wave into a square wave for pulse width measurement.
The device is controlled locally via two tactile buttons (Test / Mode) and a 16×2 I2C LCD, or remotely over USB using a full SCPI command set. Every design decision – from the 0.1% metal‑film resistors to the non‑blocking debounced button handling – is documented and traceable to the System Requirements Specification (SRS‑LRMETER‑002 v2.1).
📊 Specifications
Resistance range
Resistance accuracy
Inductance range
Inductance accuracy
📋 Detailed characteristics
| Parameter | Value |
|---|---|
| Microcontroller | Arduino UNO (ATmega328P, 5 V, 16 MHz) |
| Reference resistors (measured & calibrated) | 2005.0 Ω, 20030.0 Ω, 199870.0 Ω, 1001200.0 Ω (examples) |
| LC tank capacitance | 2.0 µF film (WIMA MKS2, ±5% , low ESR) |
| Display | 16×2 I2C LCD (PCF8574, address 0x27 or 0x3F) |
| Remote interface | SCPI over USB‑Serial (9600 baud) |
| Supply voltage | 5 V from USB or barrel jack (shield <150 mA) |
| Measurement time | resistance <200 ms, inductance <3 s |
⚠️ Error detection
| Condition | Display message |
|---|---|
| Open circuit / no DUT | OPEN / NO PART |
| Short circuit (<10 Ω) | SHORT CIRCUIT + buzzer |
| Out of range (>2 MΩ) | OUT OF RANGE |
| No LC oscillation | NO OSCILLATION |
📐 Schematic
Below is the complete circuit diagram of the LR Meter shield. All components are clearly marked and correspond to the hardware construction report (HCR‑LRMETER‑002).
⬆️ Preview — high‑resolution files available in Downloads.
Key functional blocks: auto‑ranging voltage divider (R2‑R5), LC tank (C2, J1), LM393 comparator with clamping diode, I2C LCD connector, and two push‑buttons with internal pull‑ups.
🛠️ Hardware construction
The LR Meter is built on a custom double‑sided Arduino shield. Every component is carefully selected to meet the stringent requirements of SRS‑LRMETER‑002. Below are highlights from the hardware construction report (HCR‑LRMETER‑002 v1.1).
🔧 Precision references
- R2 (2 kΩ), R3 (20 kΩ), R4 (200 kΩ), R5 (1 MΩ) – 0.1% metal‑film, 25 ppm/°C (Vishay RNMF series). Actual values measured during commissioning and stored in firmware.
- C2 (2.0 µF) – WIMA MKS2 film capacitor, low ESR, ±5% tolerance, excellent temperature stability.
🔀 Comparator interface
- IC1A (LM393) – converts decaying LC sine to square wave. Open‑collector output pulled up with 330 Ω (R7) for fast edges.
- D1 (1N4148) – clamps negative excursions, protecting LM393 input.
- R6 (150 Ω) – series current limit.
🔌 Pin assignment (shield to UNO)
| Arduino pin | Function |
|---|---|
| D4 | Test button (active LOW, internal pull‑up) |
| D5 | Mode button (active LOW, internal pull‑up) |
| D6 | Inductor charge output (OUT_L_TEST_PIN) |
| D7 | Divider supply enable (APPLY_VOLTAGE_PIN) |
| D8 | 2 kΩ range select (active LOW) |
| D9 | 20 kΩ range select (active LOW) |
| D10 | 200 kΩ range select (active LOW) |
| D11 | 1 MΩ range select (active LOW) |
| D12 | Pulse input from LM393 |
| A2 | Voltage sense (divider midpoint) |
| A4/A5 | I2C (SDA/SCL) to LCD |
| A3 | Buzzer (optional) |
📄 Full netlist, component justification and thermal calculations are available in the hardware report.
💻 Firmware & SCPI
The firmware (LR_meter_final_vol2b.ino) is a single‑file, purely procedural implementation compliant with SW‑REQ‑001 to SW‑REQ‑017. It features a cooperative state machine, non‑blocking debounce, and a fully featured SCPI parser.
⚙️ Core algorithms
- Auto‑ranging resistance: iterates over the four reference resistors, reads oversampled ADC (16×), selects range with ADC closest to 512 (within [80…944]), falls back to extreme if needed. Formula:
Rx = Rk * (5.0 / Vout - 1.0). - Inductance measurement: 8‑pulse averaging. Charge inductor 5 ms, wait 150 µs, measure half‑period with
pulseIn(). Frequencyf = 1e6/(2*T½), thenL = 1/(C·(2πf)²). - Display formatting: automatic unit scaling (Ω/kΩ/MΩ, µH/mH/H) using
dtostrf().
📡 SCPI command set (USB‑Serial, 9600 baud)
| Command | Response example |
|---|---|
*IDN? | Arduino UNO,LR_Meter,V2.1 |
MEAS:RES? | R : 1234.567890 Ohm |
MEAS:IND? | L: 0.001234 H |
*CLS | OK |
SYST:ERR? | No error |
📱 UI modes (cycled by MODE button)
- 0 – Ready (idle)
- 1 – Resistance Auto (press TEST to measure)
- 2 – Inductance (press TEST to measure)
- 3 – Help/Pinout
- 4 – ADC Test (continuous A0 monitor)
All time‑critical sections use millis() timers; no delay() longer than 10 ms in the main loop (SW‑REQ‑014).
📥 Downloads & documentation
All files are fully versioned and compliant with the project documentation requirements (DOC‑REQ‑003).
📋 Direct file references (from upload)
| File | Description |
|---|---|
LR_meter_final_vol2b.ino | Firmware source, fully commented (SW‑REQ‑005). |
Hardware Construction Report.txt | Detailed shield design, component selection, netlist. |
Software_Construction_Report.txt | Architecture, module tests, traceability matrix. |
System Requirements Specification.txt | Master SRS document, v2.1. |
LRMeterSchematics.png / .pdf | Complete circuit diagram. |
Github files. |