Panel Meter Project, Arduino(TM) Compatible

Design of a flexible Digital Panel Meter based on Arduino processor and a Microchip ADC

The Blog for this project


Project Rationale
A digital panel meter is a simple analog-input, digital display device. There are many available on the market, and in fact Asian suppliers are flooding the market. Search "Panel Meter" on Ebay to see.  There are several common variants. Many are 3 LED digits and designed for either AC or DC current or voltage monitoring.  Many are common versions are based on the ICL7106 and it's derivatives. This popular chip digitizes 200mV to 2V and displays 3.5 digits. In its simplest and lowest cost design, it requires a floating 9V power supply, typically a battery.  It requires extra circuitry to power it from a non-isolated 5V or other supply.  Some are self powered, meaning they are intended to measure their own power supply as in a portable or automotive battery monitoring application.

I typically want a display for my power supply or load projects to monitor voltages and currents, and the off-the-shelf solutions are to use multiple low cost DPMs or to use a single panel meter with external switching. These solutions provide limited display formatting, like a switch to change the decimal point, they use exactly +/- 200 counts and if your measured value doesn't fit nicely in the range of 0 to 999 or 1999, you  are out of luck. Here is what I want:
What can this be used for?   

With a small amount of external circuitry it can also control external devices

The top view. The area to the right is for optional controls

Arduino Panel Meter Front

The rear view. The components are the Arduino Nano, the Microchip ADC on an SMT adapter, the input resistors, and the I2C to parallel chip.

Arduino Panel Meter Rear

Here is the schematic of the prototype. Couldn't be much simpler.

Arduino Panel Meter Prototype Schematic

I chose to use an Arduino compatible processor. This made the development and tools free and simple. The basic libraries for controlling an LCD, ADC, I2C and other peripherals are there and easy to use. The bare ATMEGA328 processor is about $1.50 in 100's and can directly do 10 bit conversion, suitable for some applications.  I usually include provisions for a precision voltage reference connected to the processor reference pins. This allows any reference voltage up to about 4.5V to be used. Common reference values are 2.00, 2.048. 2.5, and 4.096V.

But many of my application need more than 1024 counts of ADC. After investigating low cost ADCs I found a very nice one: the Microchip MCP34xx series of Delta-Sigma ADCs. These are available in either 16 or 18 bits, have flexible differential inputs, I2C interface, and an internal reference.  They come in 1 to 4 input versions. They are relatively slow, but plenty fast for a panel meter read by a human. And they can trade-off resolution vs. conversion time. The 2 channel, 8 pin, MCP3426 is $2 qty 100.

I tested the 4 channel 16 bit part, the MCP3428 and was very pleased with the linearity, noise level, input ranges, and easy to use I2C interface. RMS noise was well under one count. But what got me excited was the 8x range. This range measures +/- 256mV full scale. Since the input voltage can be negative and as low as -.3V, the part can measure negative voltages up to full scale, with only a positive power supply. This is ideal for a Digital panel meter!

The input impedance for the 8x range is 2Meg / 8 = 250K ohms, so it will cause a slight load on a 1-5K source impedance, But this can be calibrated out. In a digital panel meter, resistor dividers are often used to convert a higher input voltage to the ADC input voltage. This approach allows the full resolution of the ADC to be used to measure any input voltage range. So for example if you want to measure 40V,  the divider is 40V / 256V = 156.25 : 1. Assuming a 5K resistor to ground, the top resistor is (156.25 -1) * 5K = 776K. The total input impedance is 777K + 5K = 781K. It is good to leave some extra input range to account for component errors and for calibration if you want, so let's use standard values of 4.99K and 806K for our 40V application. At 40V this draws only 50uA from the load, suitable for higher power battery applications.

Calibration and Accuracy
The MCP34xx parts have a good internal reference: .1% and 15ppm/ºC gain error including the PGA and the reference.  Their offset performance is excellent: 30uV typ. and 50nV/ºC, This is due to their auto-zero architecture. This means that for many applications, no offset calibration will be needed. To get better than .1% gain accuracy or to compensate for the input divider resistor errors, you will want to do a simple gain correction.

One nice thing about Arduinos is that it is easy to make unique code changes for a single unit. All you need is to change a FLOAT constant,  recompile, and download. This is a bit of a hack since you are modifying the source code for each unit, but it eliminates the need to write calibration code and manage EEPROM values. You can do it with the built-in EEPROM, particularly if you want to calibrate the system after installation.

Can it measure thermocouples??
Yes it can. A K-type  thermocouple is about 40uV / ºC. One count of the 16 bit ADC at the 8x range is 0.256v / 32768 = 7.8uV, so about 0.2ºC resolution. Cool! A thermocouple needs cold-junction compensation, but a solid-state temp sensor connected to a spare 10 bit ADC channel on the processor can do the job nicely.  I used an MCP7900. For the thermocouple, if you want more temperature resolution, the 18 bit MCP34xx parts can be used.

This means that the panel meter can be the basis for a reasonable temperature controller for an environmental chamber or IR reflow (toaster) oven. Or any other application requiring temperatures over 100ºC.

Display
My first prototype used a 16x2 row LCD. I found it was a bit large for my projects. And 16 characters can be too many for just displaying 4.5 digits of voltages or currents.  A standard 16x2 LCD is 3.15" long. There are 8x2 LCDs that are either 1.58" (40mm) or 2.3" (58mm) wide. 8 characters is enough to display 5 digits, sign, decimal point and units, ie. -2.3456V I chose the 56mm versions.

A downside of using alphanumeric displays is that the digit size can be small. You can read it from a viewing distance of a few feet, but probably not from across the room.

Another downside is that for a compact design, the PC board typically driven by the display size. This isn't much of a problem if you can find a 'standard' size LCD. Be careful here since there can be small manufacturer-to-manufacturer variations. 

LCD Connector
Alphanumeric LCDs come without connectors. Soldering one to a PC board is pretty simple: use a 2 row 14 pin header and solder it to both the display and the PCB. But this means that you can never have access to the PC board rear side behind the LCD. Since I want a flexible platform, this would limit expansion. I looked at various 2 row .1" thru-hole header, and most are pretty tall. My solution s to use low-profile female pins that allow the male pins to protrude below the surface of a board, such as Harwin H3153 (Mouser) and MillMax 0552 (Digikey). These accept 0.018" or 0.020" diameter pins, also made by Harwin and MilMax. These allow about .15" board-to-board spacing for about $0.18 a pin pair. If you decide you no longer need the ability to remove the LCD, simply use a low cost 2 pin header. If height is no object, use any .1" pins socket combination.

The 58mm LCDs are typically 14 pins, with 2 pins at the opposite end for the LED back-light. My idea here is to install a 16 pin header in the 14 pin location, but cut the 2 extra pins off where they plug into the LCD. Then run 2 wires along the back of the LCD to  pins 15 and 16 of the header to the back-light pins. The board will therefore support both 14 and modified 16 pin LCDs.

You could of course add a second connector between the LCD back-light pins and the board, but this seems cumbersome.

Arduino Programming and Power
The prototype Panel Meter uses an Arduino Nano DIP module. The Nano allows either USB 5V power or an external power supply. For the PC board, I don't include the USB circuitry, and instead have provision for an external "FTDI Basic" module to be plugged in via a 6 pin single-row header.  The panel meter can get its power from USB on the serial module, so for convenience, programming doesn't require an external power source.

For normal operation, a +5V,  linear regulator can operate from +7V to about +24V. Or the regulator can be bypassed so that +5V can be supplied.

Other Features

There are four push buttons located below the display. These can be used for menus, selection, etc. If you don't need all 4, just install the ones that you do need. To save pins, the keys feel ADC6 via a resistor ladder consisting of 1K resistors. Hit a key, and a voltage unique to that key appears at the ADC input. Some debounce is needed, just repeat the measurement a few times to make sre it is stable. I''ll go into details later.

PC Board
I need a couple of these panel meters and decided to lay out an ExpressPCB board for the 8x2 led version. Here is the schematic for the board. The keypad uses a resistor ladder to sense the 4 switches. U4 is a temperature sensor that can be used to detect local temperature or as a cold-junction sensor fro thermocouple inputs.
Arduino Panel Meter PC board schematic

The Blog for this project

Back to Dave's Home Page

This page was last updated 2/10/13 during the Blizzard of '13