Basic Voltmeter Test
INTRO
Finally! After a safe Initial Bring-Up,
it's time to test drive our complete Digital Voltmeter. Two key test
categories are:
- FULL FUNCTIONAL TEST
- ACCURACY TEST
The Full Functional Test adds code to toggle between the
4V and 20V Ranges using a Pushbutton. (For the Initial Bring-up, the voltage
range was selected manually by setting a variable in the code.)
The Accuracy Test answers this critical question - does
our instrument meet our Accuracy Spec as chosen in our Requirements?
Back to Design Series
ANALOG + ARDUINO SCHEMATIC
Here's the schematic of the Solderless
Breadboard and connections to the Arduino UNO Board.
PROTOBOARD + ARDUINO LAYOUT
Check out a suggested physical layout of the voltmeter.
FULL FUNCTIONAL TEST
The Basic Voltmeter code verifies that many hardware and software
functions operate correctly.
- Switches SW1,2 and R-Divider R1,2 operate as expected
- 4V Range (Vrange=0): SW1 passes signal directly
(Kdiv=1.0).
- 20V Range (Vrange=1): SW2 passes signal from divider tap
(Kdiv=0.2)
- The ADC outputs the correct value with Vin=3.3V
- Expected Value: ADCword = Vin*Kdiv*1/Vref*1024
- 4V Range: ADCword = 3.3V*1.0*1/5V*1024 = 676
- 20V Range: ADCword = 3.3V*0.2*1/5V*1024 = 135
- The Code computes the correct Vin given ADCword
- Expected Value: Vin = ADCword/1024*Vref*1/Kdiv
- 4V Range: Vin = 676/1024*5V*1/1 = 3.3V
- 20V Range: Vin = 135/1024*5V*1/0.2 = 3.3V
- The code correctly detects a pushbuttonstate change from 1 to 0
and toggles the Vrange.
How can we verify all of the above functions? By applying an
input signal Vin=3.3V and displaying key variables in the Serial Monitor,
you get an excellent view into the voltmeter's inner workings.
- Add wire jumper from the 3.3V pin (Arduino UNO) to the Vin signal (Solderless Breadboard).
- Open the sketch: DVM1_Basic_Voltmeter.ino
- Add code to print the variables Vinput, ADCword,
buttonState, Vrange
to the Serial Monitor
- Run the sketch: Click Upload and Serial Monitor.
- Press the Pushbutton and verify a 1 to 0 transition on the
buttonState variable.
- Verify that the Vrange toggles from between 0 and 1 at each button
press.
- Verify the ADCword toggles between 676 (Vrange=0) and 135
(Vrange=1).
- Verify the code calcution for Vin remains at 3.3V for either range.
TEST TRACKER
- Record your test results and comments.
- Excel File:
DVM1_Prototype_Test_Tracker.xlsx
Right Click on the filename, select "Save link as...".
- Use as template for your own tests.
- Note any unexpected behavior, issues or lessons learned.
ACCURACY TEST
How can you verify the accuracy of the voltmeter? We'll apply the
Comparison Test which compares the
voltmeter's reading to
another instrument that serves as a Reference Standard.
COMPARISON TEST
Just a few steps accomplish the test:
- Choose a stable voltage source to measure.
- Measure the voltage with the voltmeter
under test (Vm).
- Measure the voltage with the reference voltmeter (Vm_ref).
- Calculate the Accuracy.
- Apply the Decision Rule.
ACCURACY CALCULATION
The measured Accuracy must include the uncertainty of the reference
voltmeter.
Accuracy = |Error Measured| + |Uncertainty of Reference
Standard|
= |Vm - Vm_ref| + |Offset_err +
Gain_err*Reading|
REFERENCE STANDARD
- We'll use a medium-cost ( <$170 ) Multimeter as our
Reference Standard.
- FLUKE 17B+ Multimeter Specifications.
- 0 to 3999 Digits Display
- DC Volts Accuracy:
- Offset_err + Gain_err * Reading = 3 digits + 0.5%*Reading
- 4V Range (0.001 resolution): 3 digits = 3mV
- 40V Range (00.01 resolution): 3 digits = 30mV
DECISION RULE
The instrument will PASS or FAIL based on a simple decision.
If Accuracy < Accuracy_Spec_Limit, then PASS,
else FAIL
The Accuracy_Spec_Limit was previously determined in the Requirements Phase
of the project.
- 4V Range: 15mV + 1.5%*Reading
- 20V Range: 75mV + 1.5%*Reading
NUMERICAL EXAMPLE (4V Range)
- Choose a stable voltage source: 3.3V Supply on the Arduino
- Measure Voltage using voltmeter under test: Vm = 3.286V
- Measure Voltage using reference voltmeter (Fluke 17B+): Vm_ref =
3.309V
- Calculate Accuracy
- Accuracy = |3.286V - 3.309| + |3mV + 3.309V*0.5%|
= |-23mV| + |20mV|
= |43mV|
- Apply Decision Rule
- Calculate Limit
Accuracy_Spec_Limit = 15mV +
3.286*1.5% = 64mV
- Decide P/F using limit
If Accuracy = 43mV <
Accuracy_Spec_Limit = 64mV
then PASS!
TEST TRACKER / CALCULATOR
- Check out this handy Accuracy / Spec calculator.
- Excel File:
DVM1_Prototype_Test_Tracker.xlsx
Right Click on the filename, select "Save link as...".
- Use as template for your own test.
- Record your results and comments.
- Note any unexpected behavior, issues or lessons learned.
NEXT UP
Congratulations on completing a journey down the long and winding road of
a project design! The last step brings us full-circle back to our original
driving mission - measure the health of common household batteries.
Back to Design Series