Background
Multimeters are nice but can be expensive. Additionally, you may only want to measure voltage.
By using an MCU and 3 resistors you can build your very own super low-cost voltmeter.
In this project, we’ll build a voltmeter that can measure 0-15V with a resolution of 10mV by exploiting advanced AVR tricks.
The Theory
To measure higher voltages (15V) without frying our Atmega328 we simply use a voltage divider to … divide down the voltage. Simple university stuff.
Whilst the ADC performs a measurement, the CPU will be put to sleep to ensure accurate measurements. Once the ADC conversion is complete, the CPU wakes up. The ADC noise reduction sleep mode is used.
Hardware Connections
Schematic is available in the GitHub repository.
The Software
The main.c reads the ADC, converts it into a voltage and transmits it via UART.