This is a mod for a $2 USB meter to to improve on the resolution and accuracy closer to my digital multimeter with the added bonus of much lower voltage drops. My modifications and calibration (part 2) makes up for the loose tolerance parts.
Modded meter reads 13mA (3mA for the LCD meter + 10mA for serial dongle) The LCD meter cannot see the dongle even though the current is within range. |
It uses a SO18 wide package, so a replacement microcontroller can be fitted within the footprint. It is simple enough that the I/O mappings can be traced.
PCB with microcontroller removed. |
The amount of voltage drops is lower than the average multimeter.
The voltage measurement is done with a voltage divider of 15K in series and 2K to ground. There is a ceramic capacitor in parallel to provide the low impedance for the ADC.
There is a group of 5 resistor footprints behind the "Charger" USB connector. They are to provide the "Charger" voltage divider for Android/iOS charger.
There are foot prints for a couple of SOT23 sized trimpots for both measurement, but they are bypassed with a couple of 0 ohms resistors jumpers instead.
There is a MD78U30 3V LDO to provide a 3V rail for the microcontroller as the meter is supposed to be able to handle 3.2V - 10V. There is a small 10uF tantalum bulk decoupling cap on the output rail. There are no additional decoupling caps provided.
Cheat sheet I used for wiring up the microcontroller |
There are a few gotchas:
- PB4, PB5 are "True" Open drain pins, so they can only be used for the common cathode and not the segments. PA1, PA2 are standard GPIO vs the rest of the HS (High Sink), so those segments might be slightly dimmer.
- There are no series resistors, so the LED is current limited by the GPIO driver resistance. The power rail is set at 3V which helps a bit. The LED switching can affect the ADC reading as the ADC has no internal reference and use the power rail as reference.
- There are 3 ceramic caps for this part. VCAP is the 1.8V decoupling cap for the internal regulator, and one for the 3V rail. The NRST can probably be ignored, but I connected it per datasheet recommendation.
- There are no spare I/O. The SWIM pin is also used in driving the first digit and its GPIO function is disabled when the debugger is connected.
- The 7 segment display only have decimal point at the first digit.
- The grounding isn't good and 4-wire connection isn't used at the sampling resistor which can affect the linearity at higher currents.
Replacement microcontroller soldered |
Test display |
So far the I/O seems to be going to the right places and the hardware debugger works. The current drawn is about 10.5mA.
Project file: https://github.com/FPGA-Computer/USB-Voltage-Current-Meter
- I found a KW203 reverse engineering article here after my mod.
- There are also panel meter with a STM8.
- I have seen one of the more LCD fancy one last week and it seems to be using a 20-pin TSSOP microcontroller.