Author Topic: Easy DIY 5.5 Digit DVM + Volt Ref./Cal. (LTC2400+LTC6655 / SPI uC / Arduino)  (Read 130939 times)

0 Members and 1 Guest are viewing this topic.

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3250
  • Country: de
Some points going all the way to 40 V sounds like a digital problem, like getting out of sync.
Most probably wrong interpretation of the "sign" bit of the LTC2400

@Jorge: how do you measure 1/f noise (over which time span?)
usually you measure (without averaging) over a 10 second time period.

50 uVpp after the 10:1 divider would be much better than datasheet value (1.5uVRMS or 10 uVpp at the input of the LTC2400).

with best regards

Andreas
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: pm
  • It's important to try new things..
I think Jorge is sometimes using "V or VPP" in meaning of uV and uVpp.. He should be careful here with that.
Also the NPN transistor in the relay circuit, with relay wired in the emitter is not the best idea. Normally you wire the relay into the collector (with the emitter grounded).
 

Offline jorgemef

  • Regular Contributor
  • *
  • Posts: 134
  • Country: pt
I observed the "noise" by shorting the ADC input and checking the adc converted values range (VPP) while the ADC was not sending full scale code (attached capture). The range (VPP) and average are the only measure I can effectively measure in my setup.
So I could observe the result for few seconds, sometimes up to 30 seconds for the range. A single sample per reading was used.
« Last Edit: April 08, 2024, 08:27:40 am by jorgemef »
 

Offline MathWizard

  • Super Contributor
  • ***
  • Posts: 1432
  • Country: ca
I need to make some voltage and current references. But I see I have a screen just like the OP used in their project, mine came with an Arduino kit.

I was looking for something to replace an unlit LCD screen off a Keithley DMM. So one of those screens will fit pretty good. And other people have done really nice mods like this, and the chip datasheets and people's code are out there. So I don't have to be a cryptographer to translate from one IC to another.
 

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3250
  • Country: de
I observed the "noise" by shorting the ADC input and checking the adc converted values range (VPP) while the ADC was not sending full scale code (attached capture).
the captured picture shows clearly a (slightly, near zero) negative value (not full scale). (see data sheet)

with best regards

Andreas
 

Offline jorgemef

  • Regular Contributor
  • *
  • Posts: 134
  • Country: pt
I observed the "noise" by shorting the ADC input and checking the adc converted values range (VPP) while the ADC was not sending full scale code (attached capture).
the captured picture shows clearly a (slightly, near zero) negative value (not full scale). (see data sheet)

with best regards

Andreas

Thanks. I was not expecting negative values as Vin was shorted to ground. But since is common ground to digital lines and I have no termination resistors between ISO and ADC maybe is bouncing back and generating negative stuff. I had not thought on that. Since I just have 1 cm copper path between ISO and ADC I never considered that part of the lines could require coupling.
In the demo board they have nothing bewtween 74HC14 and the ADC digital inputs. Is something needed over there?

This is Chip select line going down way ahead conversion is over and waiting for /EOC. I have not updated this code. I grabbed from the project which Scully started and most people is using. So I gess this CS transition is introducing bunch of noise in the conversions. So maybe ajudsting the code to whait /EOC and then pulling CS down could improve things?
« Last Edit: April 08, 2024, 11:36:30 am by jorgemef »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14219
  • Country: de
With only a relatively short distance it should be OK to directly connect to the the digital isolator. For driving a higher load (e.g. optocoupler) one may want some driver in between to reduce ground bounce at the LTC2400.

From noise and a possible offset the result could be slightly negative, at least at times. This can happen even without extera disturbance.
 
The following users thanked this post: jorgemef

Offline jorgemef

  • Regular Contributor
  • *
  • Posts: 134
  • Country: pt
I updated the circuit again to more close what is suggested for LTC2508-32.
I also removed the cap in the chopper input as was adding lot of noise. Example attached with 330nF and without any cap - only difference.
I also changed code to whait since last reading 170ns before CS down. Not sure exact impact.

So values seems much bether.
PS, when I reffer noise I mean the VPP range. The value in the charts is in Volts.
« Last Edit: April 08, 2024, 12:52:03 pm by jorgemef »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6266
  • Country: fi
    • My home page and email address
ISO776x signal inputs source or sink at most 10µA of current according to section 5.9 of the datasheet.  (Figures 4-1 through 4-4 indicate each input has a Schmitt trigger, and e.g. Mouser agrees, but the datasheet does not explicitly say.)

It is such a high impedance that I personally might consider 10kΩ to 100kΩ suitable series resistors if there is risk of noise (capacitively) coupling to the signal tracks.
« Last Edit: April 09, 2024, 03:54:29 am by Nominal Animal »
 
The following users thanked this post: jorgemef

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: pm
  • It's important to try new things..
I updated the circuit again to more close what is suggested for LTC2508-32..
I think your current wiring is not suitable for the LTC2508-32.
That beast requires a different front end, differential, low impedance inputs, with several complications..

PS: when people mix noisy digital sigs with sensitive analog they put, say, 100-1k resistors in series with all digital signals (like from an FPGA to ADC/MUX etc). The value of the resistors depends on the signalling speed (ie the edges) required.
« Last Edit: April 08, 2024, 01:55:00 pm by iMo »
 
The following users thanked this post: jorgemef

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3250
  • Country: de
I fear you have not understood the LTC2400.
you can keep it simple.

During data transmission the LTC2400 is not able to do a analog conversion.
During analog conversion a data transmission delivers no useful data.
So you have an isolation analog / digital in time.

For the negative values:
the LTC2400 has an "overrange"
so at zero volts input voltage I would expect ideally +/-5uVpp (gaussian distributed) conversion values with respect to the LTC2400 input.

with best regards

Andreas
 
The following users thanked this post: jorgemef

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: pm
  • It's important to try new things..
..
So you have an isolation analog / digital in time..
That would work fine when you are able to stop (no 1/0/1 transitions anywhere) all the digital circuitry around. Even there is none "active data transfer between logic and the ADC", the digital logic lines stay noisy (as well as the Vcc/gnd).

On your LTC2400 boards the PIC12F675 while with running internal clock is still spreading noise via its digital lines even when the 2400 is doing the conversion.
Unless you stop the PIC's clock fully..

PS: on Jorg'es pcb the ISOxxxx isolator is running internally as well all the time (capacitive isolation), I bet.
« Last Edit: April 08, 2024, 03:15:48 pm by iMo »
 

Offline jorgemef

  • Regular Contributor
  • *
  • Posts: 134
  • Country: pt
I am running it as SPI/MICROWIRE Compatible. Means I can pull down CS during conversion and observe /EOC. Data transfer will just start when SCK starts. When pulling down CS if not properly coupled it rings through the same ground used to get measurements samples. The sequence can be optimized by waiting at least the conversion time after last CS pull-up before poking SPI again. 163ms in my case.
Anyway I think I am still 1 decade away from the optimized noise level. Will need to wait for the 6N137 to arrive to see if I can improve it.
« Last Edit: April 10, 2024, 08:54:38 am by jorgemef »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: pm
  • It's important to try new things..
As I wrote above the digital chips may be a happy source of broadbanded noise (especially when chasing uVolts) even when they "do nothing useful". The ISOxxxx certainly has got an internal clock generating AC for the capacitive couplers, any MCUs internal clocks run when the MCU waits on an external or internal ADC conversion (some have option to stop the main internal clock during internal ADC), LTC2057 opamp (any chopper/AZ) has got an internal clock(s) as well.
In order to get rid of any uV level noise you have to stop ANY clock signals, inclusive those deeply hidden clock signals on silicon..
Therefore people put those small value resistors in any digital lines as it creates a weak RC lowpass filtering (C being the parasitic capacitancies of the pcb tracks and chip inputs, say 3-10pF usually).
The value of the resistors cannot be too high (usually 22-100ohm) as it will start to limit the rising/falling edges of the useful signals (and it introduces small delays) as well..
« Last Edit: April 08, 2024, 04:00:58 pm by iMo »
 
The following users thanked this post: jorgemef

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3250
  • Country: de
That would work fine when you are able to stop (no 1/0/1 transitions anywhere) all the digital circuitry around. Even there is none "active data transfer between logic and the ADC", the digital logic lines stay noisy (as well as the Vcc/gnd).

I was referring to the direct signals (CS, Clock) to the LTC regarding eventually ringing.

By the way I have also the option to command the PIC12F675 to sleep mode until conversion ends.
(Pin change interrupt on DOUT/EOC line).
But I have not seen any visible difference in noise between sleep/non sleep during conversion.
Of course this may be different for other chips like the ISO.

with best regards

Andreas

 
The following users thanked this post: iMo

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16626
  • Country: us
  • DavidH
In order to get rid of any uV level noise you have to stop ANY clock signals, inclusive those deeply hidden clock signals on silicon.

Therefore people put those small value resistors in any digital lines as it creates a weak RC lowpass filtering (C being the parasitic capacitancies of the pcb tracks and chip inputs, say 3-10pF usually).

The value of the resistors cannot be too high (usually 22-100ohm) as it will start to limit the rising/falling edges of the useful signals (and it introduces small delays) as well.

Series termination helps up to a point but the problem is often charge transfer.  A lower peak but longer duration may be integrated to produce about the same result.

Optocouplers or pulse transformers, which normally are used to provide galvanic isolation, work better because of lower capacitive coupling, and can be combined with series termination.  I have seen some high resolution meters which used opto-interrupters because they have even less capacitive coupling than optocouplers.

Somewhere in here the analog section should be powered by a supply which also has high isolation. Batteries are a simple way to get the ultimate in power supply isolation.
 
The following users thanked this post: jorgemef

Offline jorgemef

  • Regular Contributor
  • *
  • Posts: 134
  • Country: pt
I think my setup is not that bad. All values I divide by 10 and my code is multiplying by 10. I never thought it is multiplying noise as well. Now Andreas comments above make sense. :)
Shorting the ADC inpupt and not multiplying by 10 (and removing the overange values) I get 2,038uV RMS.

Anyway when not dividing by 10 with the in circuit chopper and reed relay open, I have input resistor as 9Meg so noise in chopper stays a litle high around 30uVPP.

I think I am topped up with this configuration and the best strategy for this ADC is to go with 5V reference so can measure up to 10V with a divide by two which will compute noise levels x2 in the Arduino if not averaging.
 

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3250
  • Country: de
Shorting the ADC inpupt and not multiplying by 10 (and removing the overange values) I get 2,038uV RMS.
Hello,

the "overrange" values are valid results. So you should not remove them.
Instead calculate the correct sign for it.
(Otherwise you get an unwanted offset when averaging).

And take care when calculating on a small processor.
Usually they have only single precision floats (4 byte) with 24 bit mantissa.
This is not enough to handle 24 bits + sign + overrange (+ 4 sub-LSBs)
And also not enough for averaging.
You get additionally unwanted quantisation noise.

I calculate the results on a PC with double floats (64 bit mantissa).

For 10V range I use a LTC1043 capacitive precision divider.

with best regards

Andreas
 
The following users thanked this post: jorgemef

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14219
  • Country: de
On a small µC I would use fixed point integers. 32 bits are just OK for most tasks, though it can get tight for averaging.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4795
  • Country: pm
  • It's important to try new things..
32bits integer is not enough when doing something like y=(a*x)/b or similar with 24bit "ADC values".
I spent a week messing with it in my ADuC845 experiments (== 2x24bit SD ADC and single cycle 8052 on a chip), where C I have handy has got single precision float only and none 64bit integer math.
I had to go with my own 64 bit integer mult/div (plus printf) to calculate gain and offset calib properly, ending up with an 1nV math resolution  ;D ..
« Last Edit: April 12, 2024, 07:32:52 am by iMo »
 

Offline jorgemef

  • Regular Contributor
  • *
  • Posts: 134
  • Country: pt
Hello.
I just realized the reference I am using which is 4ppm/C (actualy seing 5ppm/C with my circuit) as is 4,096V whenever temperature changes 1ºC it changes 20uV. This means ADC readings as I am multiplying by a factor of 10 should reflects around 10 times as well in the computed output. So with 1ºC change reading 10V I see ~100uV (didnt understood exact math. 10*5ppm*Vout/Vref?) changes on my readings. Definitivelly will need to drop the divide by 10 for some usefull reference tracking.
The DMMA.Volt I am passing it now in a IIR filter with factor of 6 until I decided how to change the circuit next.
« Last Edit: April 14, 2024, 06:15:33 pm by jorgemef »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14219
  • Country: de
The temperature effect from the reference would be 5 ppm/K *V_out.  The change in the reference effects the scale factor no matter how the signal is scaled.
So when measuring an external 10 V reference this would be 50 µV/K.

The can be additional drift from the divider. Those 10 M resistance dividers can also have a TC in the 5 ppm/K range.
 
The following users thanked this post: jorgemef

Offline jorgemef

  • Regular Contributor
  • *
  • Posts: 134
  • Country: pt
Thanks. So at least that part is not directly dependant on the 10x multiplier. More on the grade of the reference.
By the price of a B or D grade almost make sense to use an LM399 somehow. :)
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14219
  • Country: de
The Lm399 ref. is 7 V and thus needs an extra divider to get down from 7 V to some 3.5 V to 5 V. A stable divider can also be a bit expensive and add to the TC and drift.

 
The following users thanked this post: jorgemef

Offline jorgemef

  • Regular Contributor
  • *
  • Posts: 134
  • Country: pt
How is people doing tracking of multiple references with these ADC+voltage references? Theses 5v references are for sure having a lot of temperature variation to keep track of other references. I see Andreas solder some NTC to close his board references ground.
Is it a practice to monitor voltage reference temperature and compensate for the temperature variation known ppm in the MCU or later on the PC?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf