Here in the forum I already showed some ideas and parts of an µC controlled multi-slope ADC.
https://www.eevblog.com/forum/projects/multislope-design/So here I finally show my multi-slope ADC version as a "complete" project in a separate thread. The hardware side is essentially finished, with still a few resistor/capacitor values to tweak. The board is a little more than just the pure ADC. It also includes the reference (LM399 or LM329), a buffer amplifier and MUX for the input. So it is a limited (only 10 V range with little protection) voltmeter without the display part. Currently a PC is used for display and saving the data. Power is from a 2x18 V (2x15V is likely better) transformer. The 5 V part could use a lower voltage (currently just series resistors).
The software is currently supporting the basic functions including the MUX and a few debugging function. The ADC part sends out raw results via optically isolated UART and the ground referenced side (PC) is doing the conversion to the final result.
The hardware side is relatively simple, with an µC (Atmel Mega48) for control, xx4053 switches and 7 OPs. For the performance mainly 1 OP and 6(7) of the resistors are important. However even with simple parts (e.g. TL072 OPs for the integrator and 100 ppm/K resistors) the circuit works surprisingly well. The OPs given in the plan are the ones currently used.
The circuit shown is a slightly simplified version of the test board - leaving out alternative and optional parts and the ISP connector. I know the plan is not easy to read - sorry for that.
The optional extras on the board are other resistor / reference foot prints, alternative canned oscillator, a few more caps, a LM393 comparator to detect overflow, an input buffer before the MUX for 1 channel, a simple current source and an optional buffer for the ground return current at the ADC.
From the hardware side the ADC is a little similar to the HP 34401:
- switching via xx4053 at the integrator input. Here using 74LV4053 as a slight upgrade.
- a 2 OP integrator (essentially standard), but with more modern OPs.
- using a µC for the auxiliary ADC, though a more modern one with integrated memory.
- using continuous integration instead of a reset of the integrator. Instead of starting from zero the initial and final charge is read by the µC internal ADC.
Different from the 34401, there is no ASIC and the control is directly from the µC. The main difference is that my version also includes a more classical rundown phase and this way reaches a higher resolution and in part due to the more modern OPs a lower noise. So the ADC is in between the classical multi-slope ADC like used in the Keithley 2000 and the continuous integrating variation of the 34401.
The software side is a little tricky, as the program uses the program speed for timing and thus is written in ASM with careful check for the timing. However it is only the actual conversions that are so time critical. So the time critical parts are essentially ready.
Besides the actual ADC conversions, quite some code is there for 2 internal calibration measurements. One is to measure the ratio of the reference currents. The other is to measure the scale of the µC internal ADC relative to the reference currents. With measured ratios there is no need for special and accurate resistor ratios, except 3 reasonable (e.g. 1%) equal resistors for the integrator input.
The PC side program is currently written in Turbo Pascal. The software assumes a build in RS232. So for modern PCs it would need to be rewritten, e.g. to support an USB to UART bridge. The functions are not that complicated, and even a simple µC like the AVR should be able to do the job (though it would help to have a 2nd UART or USB interface).
Despite the simple hardware (about as simple as a good multi-slope ADC can be) the noise of the ADC itself is quite low. Currently I get a little below 1 µV RMS for 1 PLC auto zero readings, good enough for 7 digit resolution and often more limited by the reference.
Compared to a normal DMM the input MUX (DG408, optional DG508) has quite some leakage currents and there is not much protection. A practical voltmeter would need either a lower leakage mux, an amplifier instead of the buffer and more protection. An alternative extension is an additional amplifier (AZ) and protection stage in front of the board - this is more like the intended extension of the board. The ISP connector could also be used to control such a front end.
So far I have only done a partial linearity test. The result looks promising, with low local linearity errors. However the test does not include all INL sources (especially thermal effects) and is not sensitive to a more smooth background, e.g. a square or cubic contribution. A full INL test is still open.
So far I don't see a reason why linearity should be much worse than the 34401, except for the resistors currently used.
So the choice of resistors can be a topic if really good linearity and stable gain is wanted. The test data shown below are with not so good resistor matching, leading to a gain drift of some 12 ppm/K. I consider this bad luck for 15 ppm/K class resistors - it was better before, with simpler resistors.
The current board has a few bodges, but not that many.
While basically running there are still a few parts unfinished or open to improvements:
- better decoupling / ground routing (especially better EMI tolerance)
- optional parts on the board (e.g. comparator for overflow )
- speedup of the rundown from currently some 200 µs to maybe some 60 µs.
- use better resistors for low INL (U³ part) and gain drift
- faster conversion mode like 1 ms (needs fast UART interface, maybe shorter data format)
- accurate adjustment of integration time for better hum suppression
- control for external front-end
- PC software: change to C (with a µC) or Python (for the PC or Raspberry)
The attached files are:
1) Circuit diagram (simplified)
2) ASM code for the AVR + Pascal code for the PC (ziped)
3) Plot of data: relative size of reference reading versus diode voltage as a temperature sensor.
The data are dots with 20 ms integration each, during warm-up for some 15 minutes.
4) Head of sample data file (with some added comments)