Standalone digital voltmeter uses a multichannel ADC
|Click here to download a PDF|
This Design Idea was realized for voltage/current measurement on a four-channel analog voltage source but has wide use in many other applications. The design is based on the Atmel ATmega8-16AC microcontroller and the Maxim MAX1230 12-bit ADC (references 1 and 2). Although the microcontroller has an internal 10-bit ADC, it’s more efficient to use an external multichannel ADC than to multiplex more analog channels to the ATmega8-16AC differential ADC inputs.
You accomplish the communication between IC1 and IC2 via the SPI according to the instructions in Reference 2. R17 and R18 are pull-ups for the end-of-conversion flag and chip-select modes. Signals for the SPI communication are tapped at header P4 for a programmer connection. Pushbutton S2 connects the IC2 reset pin to ground; R22 and C42 debounce IC2. Similarly, R19 and C39 debounce the auxiliary S1 button connected to the INT0 pin of IC2, which is used to switch between resolution patterns on the display.
IC2 pins 23 to 28 are used through P2 for communication with the 20×2-character BC2002CBNHEH$ LCD Bolymin display (Reference 3). Trimpot R21 sets the display contrast. You can use IC2 outputs RXD and TXD for USB communication via an optional USB-to-UART interface, such as the FTD232BM (not shown in Figure 1), for the purposes of data logging.
IC1 analog inputs AIN0 to AIN15 are connected to eight voltage dividers R1 to R16. The divide ratios depend on the maximum input voltage to be measured. Also, you should take into account the reference voltage on pin REF+ to use the full bit resolution of the ADC. The IC1 analog inputs work in track-and-hold mode, so input impedance can affect the conversion acquisition time. As a result, input capacitors C1, C2, and C3, with values according to Reference 2, are used for differential inputs AIN0 and AIN1 on IC1, and the same input capacitor arrangement is repeated for the other analog inputs. IC1 has a sampling rate up to 300k samples/sec, so you can digitize low-speed transient events and measure periodic signals with bandwidths exceeding the ADC’s sampling rate by using undersampling techniques. Also, antialias prefiltering of the input signals is necessary.
Shunt regulator IC5 generates the external 1.25V REF+ for IC1 using R24 and R23 to set the appropriate current consumption according to Reference 4. Select power transformer TR1 for your local ac voltage (the schematic shows 230V ac with a 0.25A fuse) and fuse appropriately; that is, 0.5A when used at 120 V ac. The transformed voltages are rectified with diode bridges D1 and D2 and stabilized with 7805 series regulators. One 5V branch is used directly to supply the multichannel voltmeter; the other is auxiliary for global use.
Code listings for IC2 are available here. This work was supported by the Slovak Research and Development Agency under contract No. APVV-0062-11.
- “ATmega8-16AC: 8-bit with 8K Bytes In-System Programmable Flash,” Atmel Corp.
- “MAX1226, MAX1228, MAX1230:12-Bit 300ksps ADCs with FIFO, Temp Sensor, Internal Reference,” Maxim Integrated Products Inc, December 2010.
- “LCD display, 2x20 characters, 5x7 dot matrix,” http://bit.ly/Sg8AHt and http://bit.ly/TQHO5A.
- “LM4041 precision micropower shunt voltage reference,” Texas Instruments, February 2006.