Pros:
- Dual-speed measurement
- Auto-ranging
- 1pF to 9999.99uF
- Reasonable precision after stray capacitance subtracted
- Calibration-free for C > 1nF if precision resistors used
- UART output (115200 8N1)
- Compact
- Affordable
- Single-chip, low component count
- SMD-free, prototype-board-friendly layout
- Only uses common components
- Microcontroller can be flashed via UART
Cons:
- May get affected by ESR and leakage
- Measuring frequency not controllable
- 1% error in clock introduced by the microcontroller
- Require relatively new arm-none-eabi toolchain for reasonable binary size
- Time-constant-based approach is not as precise as LCR bridge
- Requires 3.3V power supply
Refs:
- Capacitance Meter and RC Time Constants
- Getting Started with the LPC810
- LPC810 CodeBase
- lpc21isp
- GNU Tools for ARM Embedded Processors (If code size is too big, try this toolchain)
- LPCXpresso Sample Code Bundle for the LPC8xx
- NXP Switch Matrix Tool for LPC81x
- A smarter way to write micros()
Compiling:
cd src && make && make flash
Use CROSS=/path/to/toolchain-
and COMPORT=/dev/ttyACM0
to change toolchain / serial used for flashing.
Pin Assignment:
+---v---+
TXD -|1 8|- VREF
RXD -|2 7|- GND
IO3 -|3 6|- 3V3
IO2 -|4 5|- VCAP
+-------+