GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - GUELORD-MWENDERWA/arduino-component-tester: Arduino component tester: auto-ranging resistance, capacitance from RC charge time, and diode identification.

BranchesTags
Open more actions menu

Latest commit

 

History

3 Commits
3 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
lib/Measure
lib/Measure
 
 
src
src
 
 
test/test_measure
test/test_measure
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
platformio.ini
platformio.ini
 
 

Repository files navigation

Arduino Component Tester

build platform license

A bench instrument built from an Arduino Uno, four resistors and a 16x2 LCD. It measures resistors with automatic range selection, capacitors from their RC charge time, and identifies diodes and LEDs from their forward voltage.

It is designed as a practical project for a general electronics course: each measurement is a direct application of a circuit law (voltage divider, RC charging curve, diode forward characteristic), and the maths lives in a small library that is unit-tested on a computer.

Measurements

Mode Principle Range
Resistance Voltage divider with one of three reference resistors (680 ohm, 10 k, 470 k). The range whose reading is closest to mid-scale is used, where the divider is most sensitive About 10 ohm to 5 Mohm
Capacitance Discharge, then charge through a known resistor and time how long the node takes to reach 63.2 % of Vcc (one time constant): C = t / R About 100 nF to several thousand uF
Diode Forward voltage at about 4 mA through the 680 ohm reference; classified as Schottky, silicon, LED, short or open 0 to 5 V

Resolution

Resistance resolution

Quantisation error of the resistance measurement computed with the firmware's own functions (lib/Measure). Each reference resistor is accurate around its own value; bestRange() switches to the one whose reading is nearest mid-scale, which keeps the error around 0.2 to 1 % across five decades. Regenerate with python docs/make_figures.py (needs g++).

Circuit

            D2 ──[ 680R ]──┐
            D3 ──[ 10k  ]──┼──── A0 (TEST) ────┐
            D4 ──[ 470k ]──┤                   │
            D5 ──[ 220R ]──┘   (discharge)   [ DUT ]
                                               │
                                              GND

            D6 ── push button ── GND     (mode select)
            A4 / A5 ── LCD 16x2 I2C (SDA / SCL), address 0x27

Only one reference pin is driven HIGH at a time; the others are switched to high-impedance inputs so they do not load the node. Use 1 % resistors: the reference values set the accuracy of every measurement.

Always discharge capacitors before connecting them, and never test components that are still in a powered circuit.

Getting started

git clone https://github.com/GUELORD-MWENDERWA/arduino-component-tester.git
cd arduino-component-tester
pio test -e native        # measurement library unit tests, on your computer
pio run -e uno -t upload
pio device monitor

Press the button to cycle through resistor, capacitor and diode modes. Results appear on the LCD and on the serial port at 115200 baud.

Prebuilt firmware

Each release contains arduino-component-tester-uno.hex for the Arduino Uno (ATmega328P). Flash it without installing PlatformIO:

avrdude -p m328p -c arduino -P /dev/ttyUSB0 -b 115200 -U flash:w:arduino-component-tester-uno.hex:i

On Windows the port is COM3 or similar; avrdude ships with the Arduino IDE.

Calibration

  • Measure the 5 V rail with a multimeter and set VCC in src/main.cpp (used for diode voltages).
  • Measure the actual value of each reference resistor and update RANGE_OHMS in lib/Measure/Measure.h.

Unit tests

test/test_measure checks the measurement maths without hardware:

  • resistance round trip from simulated ADC readings stays within 3 % from 47 ohm to 1 Mohm thanks to auto-ranging
  • range selection picks the reference that keeps the ADC near mid-scale
  • open and short circuits are detected
  • capacitance from charge time matches C = t / (R ln(1 / (1 - k))) at 50 % and 63.2 % thresholds
  • diode classification thresholds
  • engineering-notation formatting without printf float support (not available by default on AVR)

Project layout

lib/Measure/        Measurement maths and formatting (no Arduino dependency)
src/main.cpp        Pin control, range switching, timing, LCD and button handling
test/test_measure/  Host-side Unity tests

Limitations

  • The ATmega328P ADC is 10-bit; accuracy depends mostly on the reference resistors and on the stability of the 5 V rail.
  • Capacitors under about 100 nF charge faster than the ADC can sample reliably on the 10 k range.
  • Electrolytic capacitor leakage slightly inflates the measured capacitance.

Status

The firmware compiles for the Arduino Uno and the measurement library passes its unit tests on the host. It has not yet been validated against reference components on hardware.

License

MIT. See LICENSE.

About

Arduino component tester: auto-ranging resistance, capacitance from RC charge time, and diode identification.

Topics

arduinocomponent-testerelectronicsembeddedmeasurementplatformio

Resources

Readme
MIT license

Security policy

Security policy
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.