* Little to no microcontroller involvement. If MCU is required for some reason, use up to two AT89C2051s (pot-fest)
The core ADC chip I am using is ICL7135 @ 300Hz.
The power supply here is based on a linear design. I would prefer a switch-mode one though, if I can find a negative-voltage version of LM2596.
The front end is still up to design considerations. I am thinking about using relay-switched frontend.
I have considered doing the same thing but I would go with a simple microcontroller based design and delta-sigma instrumentation converter and push the performance. One thing which would be really nice is being able to compute and display the standard deviation of DC measurements to measure low frequency noise.300Hz at its clock input pin.
I would also consider designing it as an electrometer with a relay switched 10M shunt for general use.* Little to no microcontroller involvement. If MCU is required for some reason, use up to two AT89C2051s (pot-fest)
The core ADC chip I am using is ICL7135 @ 300Hz.
An ICL7135 at 300Hz what? 300 conversions per second? 300kHz clock for 2 power line cycle integrations?
Well then, 7812/7912 and 7805/7905 can still work.QuoteThe power supply here is based on a linear design. I would prefer a switch-mode one though, if I can find a negative-voltage version of LM2596.
A switching regulator has the potential to add a lot of noise. I might use one for the LED supply (and float it) though because the current is so much higher than the rest of the circuits.
I will look into that. I just have to imagine what kind of heatsinking I am subscribing into.QuoteThe front end is still up to design considerations. I am thinking about using relay-switched frontend.
Even old digital multimeters often used JFETs and MOSFETs for switching. Good relays are awfully expensive.
300Hz at its clock input pin.
Even old digital multimeters often used JFETs and MOSFETs for switching. Good relays are awfully expensive.
I will look into that. I just have to imagine what kind of heatsinking I am subscribing into.
Today I would also prefer an sigma delta converter based design - but this is a little hard to get if you want through hole only.
David Hess, interested to see your version as well and what more can be accomplished at the DIY level when not limited to THT.
Today I would also prefer an sigma delta converter based design - but this is a little hard to get if you want through hole only. There are mainly to choices for an DMM:
1) use a display oriented ADC like the ICL7135, so that every ADC step directly corresponds to one display digit. Adjustment is usually done by quite a lot of pots, like one for every range, but no µC needed.
2) use an ADC with higher resolution and do adjustment and compensation for divider errors in software. This is how modern DMMs are usually build, as there are no or very few trim pots needed. However there are not many high resolution ADCs available in DIP form.
For switching, usually CMOS switches are easy to use as long as the voltage is low (e.g. +-15 V) and inside the supply range. Relais might have trouble with thermal EMF and are bulky. If feasible I would avoid them for low voltage signals, though not at all costs.
For the input there is also the choice of classical form with one basic voltage range (like 200 mV) and than a multi tap divider for all the other range. This is how old analog meters and cheap old DMMs were build. The other option is a variable amplification or attenuation behind the initial amplification for ranges of maybe 100 mV/1 V / 10 V and than only one input divider of about 100:1 for all the higher voltage ranges. This allows lower noise and high input impedance (e.g. > 10 GOhms) for the low ranges without using the divider, but it usually needs a higher supply (like +-15 V.. +-20V). So this is mainly an option for mains powered meters.
A relatively easy version would be a relay switched 100:1 divider followed by an CMOS switched amplifier for something like times 10 / 1 / 0.1 .
I would not go for a voltage to frequency converter design anymore. The variable frequency causes trouble with nonlinearity due to charge injection. So accuracy is limited. If you really want to build your own ADC, one could do an integrating converter (e.g. similar the HP34401, which is also used in some supplies) based on an µC - even one in an DIP package. Still using a ready made SD ADC is way easier and some come in an still easy to solder SO8 package.I know that this is doable and even AT89C2051 have the required hardware for it (a single analog comparator) but as I have said this project requires as little MCU involvement as possible.
A ICL7135 based solution might be still fun, as it can work without an µC. But don't expect the highest performance. It also gets less attractive with more ranges, as individual trimmers are needed. So I would try to keep such an design simple as it will not get ultimate performance (good INL, low noise, flexible reading rates) anyway. I would even skip auto-ranging on this, at least for the beginning.
I would not go for a voltage to frequency converter design anymore. The variable frequency causes trouble with nonlinearity due to charge injection. So accuracy is limited.
If you really want to build your own ADC, one could do an integrating converter (e.g. similar the HP34401, which is also used in some supplies) based on an µC - even one in an DIP package.
I have many standard capability bench DMMs so if I went to design something from scratch, I would want to include capabilities that I miss like an electrometer input to medium voltages (at least +/-20V), low current measurement, and automated low frequency noise measurement which is just a firmware function if you have a microcontroller.
And at least these three capabilities would be pretty easy to add to a more conventional design.
Other all through hole designs which may be more fun perhaps but a lot more work include the multi-slope run-up integrating converter like the old Siliconix LD series (I do not think anybody makes an integrated chip set for this type anymore), the charge balancing voltage-to-frequency converter like that commonly implemented with the LTC1043, and the ratio counting design which a lot of early multimeters used. The ratio counting design is interesting because a universal counter with A/B ratio mode could be used as the display during development.
* Bench multimeter with built-in mains power supply for 240V (replaceable transformer for 120V operation)
Can you consider an optional build without mains wiring? Maybe a USB powerbank or USB supply. Or even an external 12V AC plugpack if 5V DC is not practical.This makes the power supply subsystem a bit difficult to design. And I have a specific spare mains-rated transformer I want to use.
I think less is more in this style of project.
Can you consider an optional build without mains wiring? Maybe a USB powerbank or USB supply. Or even an external 12V AC plugpack if 5V DC is not practical.
I think less is more in this style of project.
I have many standard capability bench DMMs so if I went to design something from scratch, I would want to include capabilities that I miss like an electrometer input to medium voltages (at least +/-20V), low current measurement, and automated low frequency noise measurement which is just a firmware function if you have a microcontroller.
And at least these three capabilities would be pretty easy to add to a more conventional design.
Hmm, could add some (all?) of those to an existing meter a la uCurrent style external module?
QuoteOther all through hole designs which may be more fun perhaps but a lot more work include the multi-slope run-up integrating converter like the old Siliconix LD series (I do not think anybody makes an integrated chip set for this type anymore), the charge balancing voltage-to-frequency converter like that commonly implemented with the LTC1043, and the ratio counting design which a lot of early multimeters used. The ratio counting design is interesting because a universal counter with A/B ratio mode could be used as the display during development.
Yeah, those sound much more serious. I have yet to get into things like the multi-slope converter in the 34401A.
With the ICL7135 there is no need for isolated analog and digital part. The digital part is just slow clocked, maybe even static logic to do range selection. Even if using a µC, this could be low noise, e.g. sleep mode most of the time. Isolating the LEDs would be rather high effort. So it is more about making the digital part low noise.
With the ICL7135 there is no need for isolated analog and digital part. The digital part is just slow clocked, maybe even static logic to do range selection. Even if using a µC, this could be low noise, e.g. sleep mode most of the time. Isolating the LEDs would be rather high effort. So it is more about making the digital part low noise.
However if an external supply like USB or a wall-wart is used, there needs to be an insulation, so that the supply has no direct connection to meter inputs. The obvious way would be something like a Royer-converter (especially if you want it old style).
Whether the regulators need heat-sinks is one of the last points to look at. First one needs the general design. The regulator for the LED current might need a heat sink - the other regulators likely not, but it depends. Usually the only part that really needs significant power should be the LEDs.
The simple version would use something like the +-5 volts supply of the ICL7135 for everything. So the input range in limited to about +-4.5 V or so, which is just good enough for a 2 V AC range (which has about 2.8 V peak with sine). With just a 2 V input range one might need more than just a 1:100 divider. In this case the CD405x could be used for gain switching, and an AZ OP like ICL7650 could be used for the (DC voltage) input amplifier. With limited bandwidth it could even work for AC too.
| micro- | volt | Low impedence volts |
| milli- | amp | Diode drop |
| kilo- | ohm | ESR |
| mega- | Overload | Hold |
For the usual +-2 V range the ICL7135 needs a 1 V reference. No real need for an LM399. The MAX6126 is definitely good enough. One could even go for something simpler, like LT1009.
For controlling automatic range switching a simple µC should be good enough, no need for something fancy. The ADC in the µC could be very handy to do range selection based on peak values. So the AVR Mega168 is well good enough. With a display oriented ADC and thus analog trimming one might not want that many ranges / functions anyway, as one would need a multi turn trimmer for essentially every range. Adjustment thus takes quite some time and a suitable calibration source. To ease this a little one might use each shunt for a 1:100 range and use switchable amplification of 1/10 (used for the voltage anyway). This would half the number of shunts to adjust, which is a little difficult anyway. With a good (AZ) amplifier a 20 mV burden could be enough. This would require 1 µV resolution for the shunts - not easy but possible.
One should be able to separate the project in the ADC + display part and the input stages and µC. Not many lines between those two and the ADC has differential inputs - thus no need for a common GND level separate GND lines.
With a display oriented ADC and thus analog trimming one might not want that many ranges / functions anyway, as one would need a multi turn trimmer for essentially every range.
Are those Tek DMM based on ICL7135 ? The hamegs are, so thats why I like them.
void systick_init(void)
{
// To emit a 100kHz clock, the timer should overflow at 200kHz, driving the
// T0CKO (P3.5) pin.
unsigned long count;
// P3.5: push-pull output.
P3M0 |= 0x10;
P3M1 &= ~0x10;
TMOD = TMOD & 0xf0; // Timer 0: 16-bit autoreload timer.
AUXR |= 0x80; // Run the timer at F_CPU
count = 65535 - F_CPU / 2 / 100000UL + 1; // The overflow rate is calculated.
TL0 = count;
TH0 = count >> 8;
TF0 = 0; // Start the counter
TR0 = 1;
INT_CLKO |= 0x01; // Start the clock output
ET0 = 1; // Start interrupts.
}The µC does not have to do very much. So anything capable of creating the clock, a better than 5 Bit ADC and some IOs should be fine. Using the µC to do the display decoding is a little strange, but possible. So any of the listed µC should be fine and even simper ones (like Mega88, PIC16, maybe PIC12) should be good enough. An integrated DAC could be used for fine adjustment, but an external one is possible too. I would somewhat prefer 5 V operation as the ICL7135 usually is 5 V supply.
There is little use for an µC integrated USB interface, as this would not be isolated from the meter circuit. If wanted, a PC interface would be more practical by an UART output from the µc and than via opto-coupler to an UART to USB chip (powered over USB). This could be an later option if the UART pins are left accessible.
The internal ADC would be more for auto-ranging, e.g. measure the approximate positive and negative peak voltages to detect possible clipping. So no high accuracy needed, but 2 or 3 input would be nice. Comparators would also work - but an ADC might be easier.
No need to run the µC fast. Something like a 1 or 4 MHz clock should be OK. One may not even need a crystal, as the power grid frequency is not that stable anymore - at least in Europe.
Although if there exists a high-precision Delta-Sigma in DIP package I may even scrap ICL7135 in favor of that.
Since it is a common suggestion to use some microcontroller involvement, how about this idea:
* Emit the 100kHz reference clock from the microcontroller
* Use the microcontroller to switch ranges
* Use DACs and digital pots to calibrate the circuit digitally
Delta-Sigma ADC is still out of the scope as I still don't want to touch SMT on this design.
About the choice of the microcontroller, which one seemed better? I am relaxing the MCU selection from AT89C2051-only:
* AT89C2051-24PI @ 24MHz (12T 8051 architecture)
* IAP15F2K61S2-35I-SKDIP28 @ 30MHz (1T 8051 architecture, built-in SPI master hardware for DAC)
* IAP15W4K61S4-30I-PDIP40 @ 30MHz
* ATmega328P-20PU @ 16MHz (AVR - Arduino, we all know it)
* PIC18F45K20-I/P @ 64MHz (3.3V PIC)
* PIC18F4550-I/P @ 64MHz (3.3V PIC with USB)
If a 40-pin MCU is used, maybe I will also move the display decoding and driving into the MCU, and simplify the display board into a MAX7219-driven one, or a HD44780-based display module.
AFAIK there is a way to read the ICL7135 by reading the sign, a sync signal and let the µC count pulses instead of reading the BCD values. This needs less pins on the µC. Still there is not that much room for interpretation for the µC on the ADC data. At most may be scaling with 2 to allow a +-4 V range (last digit always even).
One advantage of using an SD converter and µC for scaling would be that one is not bound to the 19999 count ranges. So one could have ranges to maybe 4 V or so which would be about the limits for an ICL7650 amplifier (one of the few available AZ OPs in DIP) for the input.
I don't know sigma delta converters in THT case. But there are a few in SMT that are still relatively easy to solder. Something like SOT23-6 or SO-8 are still relatively easy and may go to a small adapter board.
The internal ADC would be more for auto-ranging, e.g. measure the approximate positive and negative peak voltages to detect possible clipping. So no high accuracy needed, but 2 or 3 input would be nice. Comparators would also work - but an ADC might be easier.
The internal ADC would be more for auto-ranging, e.g. measure the approximate positive and negative peak voltages to detect possible clipping. So no high accuracy needed, but 2 or 3 input would be nice. Comparators would also work - but an ADC might be easier.
You can autorange using just the ADC output.
Hmm that would be interesting. The frontend, MCU and autoranging logic being one module, and ICL7135 and display being another. (I am stuck in two-board construct anyway)The internal ADC would be more for auto-ranging, e.g. measure the approximate positive and negative peak voltages to detect possible clipping. So no high accuracy needed, but 2 or 3 input would be nice. Comparators would also work - but an ADC might be easier.
You can autorange using just the ADC output.
I could see using the crummy microcontroller ADC to sample the input allowing for fast autoranging. The ICL7135 is pretty slow.
Auto-ranging just on the ADC output could be tricky, as the average DC output can be still in range, but short time there might be clipping. So one should also have some kind of detection for clipping, e.g. be comparators or maybe diode / capacitor circuits and the ADC to check from time to time. The ADC ICL7135 should have quite some headroom (e.g. up to 3.5 V) - but the input amplifier might not have that much in some ranges.
Using the ADC could also check for the limits on the next lower range - so no need to actually switch to higher gain, just to find out that this would cause an over-range due to short time excursions. It somewhat depends on the input stage how much reserve is there beyond the nominal range.
It is a little the question if one needs analog peak detection circuits or can use the ADC to just sample the signal relatively fast.