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

0 Members and 1 Guest are viewing this topic.

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Thanks again Andreas. You are a walking Volt Lexicon  :D.

I am looking through all the links I have collected, and I found a new one that imo deserves presentation. There is a real DIY prototype (breadboard and copper clad), noise measurements and another version of the test code I have linked to in an earlier post in this thread. The chip is LTC2440 - a differential input version of the LTC2400. Imo interesting and useful for the real breadboarders and Manhattan style prototypers. And another proof that carbon film resistors are not precision stuff (the builder of the prototype knows very well):


Source: http://dangerousprototypes.com/forum/viewtopic.php?t=4247p=42053


Yes- ironically that jbeale post on the dangerous prototypes board is what initially led me to the LTC 2400 (mentioned in one of the posts in that thread) for my project.   His board using the 2440 is a work of art! and likely beyond my skill set to reproduce.....
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
The 2440 is a great little chip, widely used (in comparison, 2400 is rarely seen) and a lot easier to manage than the 2400 (it being differential).

...

...

Yes- ironically that jbeale post on the dangerous prototypes board is what initially led me to the LTC 2400 (mentioned in one of the posts in that thread) for my project.   His board using the 2440 is a work of art! and likely beyond my skill set to reproduce.....

After I saw your posts, I broadened my web search to the whole LCT2400 family. By chance I looked closer at one hit for LTC2449. That and a fried USB sound card  :-// led me by chance to the Linduino. From there I found LTSketchbook -  open C code for LT Demo Boards including LTC2418, LTC2422, LTC2449 and LTC2484.

So I will go through it, and try to copy/paste/edit a minimal code for the LTC2400. I challenge other Arduino users to do the same - please post it here.





Linduino - Isolated Arduino compatible demo/evaluation board mediator with open source code
« Last Edit: October 04, 2013, 04:15:56 pm by quantumvolt »
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Instead of sticking to my plans (build something easy, nice and new), I tried to do some measuring and made some C++ spaghetti code so that I can see the output from the LTC2400 before I start some serious averaging. As long as the signal is not drifting in trend, even noise of magnitude comparable to or greater than the signal usually can be smoothed out.

But I had problems like usual     :bullshit:  :scared:  :bullshit:

- Both the source and the meter are unshielded. The normal hands-holding-the-camera disturbance is obvious, but the readings changed when powering the camera and went back when turning it off. I will buy some copper tape and a tripod.

- The USB cable for serial data to PC shifted the readings. Different ground levels and ground noise (?). The only solution is opto couplers and isolation transformers (?).

- & other hassle ...


Anyway - the voltage source is the TI REF5050 based board from voltagestandard.com. The reference chip is proclaimed to have noise 3ppm / V. That should be 15 uV. But when the datasheet does not state whether it is max or typ, then there is imo no reason to believe it. The series plot is 20 uV between the upper and lower lines. The plot is raw ADC output - no averaging. Imo very good performance of the LTC6655 and LTC2400. And the cheap but in my case very stable REF5050 has a nicely distributed noise of around 25-30 uV that easily is averaged away.



« Last Edit: October 05, 2013, 02:18:26 pm by quantumvolt »
 

Online Andreas

  • Super Contributor
  • ***
  • Posts: 3248
  • Country: de

- Both the source and the meter are unshielded.

- The USB cable for serial data to PC shifted the readings. Different ground levels and ground noise (?). The only solution is opto couplers and isolation transformers (?).


Anyway - the voltage source is the TI REF5050 based board from voltagestandard.com. The reference chip is proclaimed to have noise 3ppm / V. That should be 15 uV. But when the datasheet does not state whether it is max or typ, then there is imo no reason to believe it. The series plot is 20 uV between the upper and lower lines. The plot is raw ADC output - no averaging. Imo very good performance of the LTC6655 and LTC2400. And the cheap but in my case very stable REF5050 has a nicely distributed noise of around 25-30 uV that easily is averaged away.

Hello,

In my experiments I use also unshielded LTC2400 devices.
In my lab I use a large metal ground plate where all devices are placed.

USB-cables are terrible (Standard RS232 lines are better but not good). I use opto couplers and battery supply for the references and for the ADC cirquit. Transformers also have large capacities between primary and secondary side and will create some shifts to the output.
Even the 0.25pF of the photo couplers create a few uV shift in the output depending on the placement of the USB-cables.

If you look closer to the REF5050 datasheet you will find that the noise is "typical" 15 uVpp within 0.1 .. 10 Hz.
Usually the typical noise values are reached by about 90% of the parts. Except for some "defective" parts which have much larger noise.
And the LTC2400 also has typical around 10uVpp noise. But if your pcb layout is not perfect you will easyly have a lot more noise than the 10uVpp. I would try to measure the own reference voltage or zero input (with short and long cables) to find out what the ADC noise is.

With best regards

Andreas
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Quote
the noise is "typical" 15 uVpp

The "typical" noise doesn't matter. What matters is how "disperse" the noise is (standard deviation).
================================
https://dannyelectronics.wordpress.com/
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th

...
USB-cables are terrible (Standard RS232 lines are better but not good). I use opto couplers and battery supply for the references and for the ADC cirquit. Transformers also have large capacities between primary and secondary side and will create some shifts to the output.
Even the 0.25pF of the photo couplers create a few uV shift in the output depending on the placement of the USB-cables.

If you look closer to the REF5050 datasheet you will find that the noise is "typical" 15 uVpp within 0.1 .. 10 Hz.
Usually the typical noise values are reached by about 90% of the parts. Except for some "defective" parts which have much larger noise.
And the LTC2400 also has typical around 10uVpp noise. But if your pcb layout is not perfect you will easyly have a lot more noise than the 10uVpp. I would try to measure the own reference voltage or zero input (with short and long cables) to find out what the ADC noise is.
...


Thanks for the tip about the metal plate. I will try it, but there is no ground in the room. I have been thinking about making a Faraday cage with a see-through liftable mesh lid for a long time. May be another day ...

I am not sure I understand the battery stuff. I also used a battery here. But 1) The ref and ADC must have common analog ground. And 2) The ADC SPI output must have common digital ground with the uC that performs the SPI controller function (?). Or do you use free running ADC with isolation between the ADC and uC - NOT on the USB port as is the case with the Linduino isolated Arduino-compatible board over (I only use Arduinos for uC)?

And finally - I understand that the LTC2400 has noise - you say around 10 uV. But in set-ups like this, the noise is imo not additive (EDIT I did a quick search for "additive noise". It seems that I have to study this more.). So the noise from the ADC will be masked as long as the measured source has a noise level significantly greater. So what we see in the plot will mainly be determined by the p-p performance of the REF5050 (I see I have written 3 ppm / V in my post instead of 3 uV / V  :=\ ).

And as for the datsheets - my experience is that even the big companies are not perfect. In this link http://www.ti.com/product/ref5050&DCMP=hpa_dc_general&HQS=Other+OT+ref5050-prtl it says that the noise is "0.1-10Hz Noise (Max) (uVpp)    15" (so not "typical" as you claim).
« Last Edit: October 05, 2013, 07:16:48 pm by quantumvolt »
 

Online Andreas

  • Super Contributor
  • ***
  • Posts: 3248
  • Country: de

 So the noise from the ADC will be masked as long as the measured source has a noise level significantly greater. So what we see in the plot will mainly be determined by the p-p performance of the REF5050


Hello,

The noise of the ADC is at the output of the ADC (and thus is not further filtered).
The noise of the REF5050 is at the input of the ADC and is integrated during sampling time. So you will only see a limited bandwidth of the REF5050s noise at the output of the ADC.
And yes: if the noise is really gaussian and with the same bandwidth then it will add geometrically. (as square root of squares).

What you currently see on the ADC output is the EMI noise of your USB lines. And I'm shure that if you place your hand on the cirquit, or battery pack, or on the connection line between reference and ADC you will see a voltage output shift.

In my case I use a star ground layout on the ADC PCB and a small 8 PIN PIC12F675 to convert from SPI to isolated RS232. USB is connected via FTDI USB to RS232 converters.
You have always to remember that 1mA on a 1mOhm line (and thats only several mm) creates 1uV voltage drop.

With best regards

Andreas

 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Very informative post. I guess I have to study this stuff seriously - or go back to my nice and cosy USD 9.99 three-and-a-half digit DMM  :-DMM
 

Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
If capacitive coupling through an opto coupler causes issues, you could use an audio fibre optic connection.  Just make up an adapter at the PC end and feed it into/out of the UART on the uC.

I've done this before, it's easy to do and cheap, however can be a bit power hungry if you want speed.
 

Online Andreas

  • Super Contributor
  • ***
  • Posts: 3248
  • Country: de
If capacitive coupling through an opto coupler causes issues, you could use an audio fibre optic connection. 
I've done this before, it's easy to do and cheap, however can be a bit power hungry if you want speed.

For my battery powered devices a TORX173 for e.g. consumes nearly a order of magnitude more power than the rest of the cirquit; 1-2mA for the reference including ADC and a few hundred uA for the PIC processor including transmission of 8 bytes to PC via photo couplers each 160 ms.

With best regards

Andreas
 
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Thanks to Harvs and Andreas for this optic stuff. I didn't even know it was used outside science and big scale communication systems. But it has made me think. If I follow the pursuit of noise reduction to the bitter end, I will have no time for other things. (There is imo no end - only the frustrating work that yields smaller and smaller improvements the more you have succeeded until now. I think economists call it diminishing returns).

---

I read that it is impossible to get rid of the USB ground connection without a USB isolator. If this is correct and I understand it correctly I want to try these two things:


- use optocouplers with the two-wire Rx/Tx of RS232. If the ADC+uC is battery powered and have good ground design (star ground as in the LT schematic in a post over), and the 4-wire USB cable stops at a USB-to-RS232 breakout board at the Arduino, then one can galvanically isolate the ADC+uC from the PC by using 2 optocouplers (Rx/Tx).

- buy or make a USB Isolator based on ADuM3160 or similar. This will be a more general thing that I also can use for other measurements for example measuring 1 V differential at common mode 50 V DC with an op amp, collect the 1 V measurement on analog I/O on the Arduino, and then transfer the 1 V measurement from the Arduino that now has floating ground 50 V DC to the PC via USB cable.


Alternatively - since I very seldom need any precision measurements, I could take away the USB cable completely. When I want to collect measurements that will be sent to PC, I can store them in a software declared array, in I2C EEPROM or in SD card, and transfer them after the measurements are finished. I also have bought EEPROM chips, but never used them.

I don't know - really. But I do know that there has to be a limit somewhere. And I am happy to know that my limit is before beginning with one more technology (optic fiber) when I haven't even tested more traditional solutions.

There is so many other things I should have made in analog and mixed signals. Thanks for making me realize that I have to make priorities ...

---

And I also must rethink the whole less-than-1-ppm 'philosophy' (from a pragmatical point of view 10 ppm is very good and 25 or 50 ppm seems to be realistic most of the time). I knew this from before, but he states it very clearly:

"Although the chip has 24-bits of reso-
lution, it isn’t really a 24-bit converter.
The speci?cation sheet says the typical
output noise is 1.5 uV RMS. Gaussian
random noise has a crest factor (peak
divided by RMS) of about ?ve so 1.5 x 5
x 2 = 15 av pk-pk. At 5 V full scale, the
least-signi?cant bit isjust 0.3 uV so the
converter noise effectively “uses up” the
lower ?ve hits; at best we have a 19-bit
converter, which is really quite good for
an SO-S 1C!"

Source: www.tdl-tech.com/hires-vm.pdf?
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Quote
And I also must rethink the whole less-than-1-ppm 'philosophy'

The datasheet or application note should walk you through the calculation of "noise-free" resolution, or the like, assuming idea conditions. Typically 24-bit dacs, you get 22bits (at the high-end) and 20 bits (at the low-end) of noise-free resolutions, again, assuming idea conditions.

Many other factors contribute to degraded resolutions. Layout is an obvious one, power supply is another. The filters used and clock choices are frequently ignored by novice designers, as does phase noises.

I said this before, it takes an analog giant to use a 24-bit figure.
================================
https://dannyelectronics.wordpress.com/
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Great info in this thread!



Alternatively - since I very seldom need any precision measurements, I could take away the USB cable completely. When I want to collect measurements that will be sent to PC, I can store them in a software declared array, in I2C EEPROM or in SD card, and transfer them after the measurements are finished. I also have bought EEPROM chips, but never used them.


While not super cheap. couldn't one use an XBee set up to wirelessly stream the data to a PC?
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: PPMgeek! 5.5 Digit DVM + Volt Ref./Cal. (for Arduino or any uC w. SPI)
« Reply #63 on: October 06, 2013, 06:08:30 pm »
Quote
LTC2400

That would be challenging for anyone to use.

Sorry. I do not understand your post.

Thanks dannyf.

This last post makes me understand your earlier post. However - it is LT and the other manufacturers that operates with 24 bit - not me.

If you read post #13 you will see I write:

"You can get 24 bit ADC's from TI and others also. The same goes for refs and op amps. You can mix whatever you like - just keep in mind that your end product can quite easily give you some 17 - 19 'noisefree' bits (around 5-5.5 digits or 0.0025% or 25ppm) if you use pieces with similar precision."
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Great info in this thread!



Alternatively - since I very seldom need any precision measurements, I could take away the USB cable completely. When I want to collect measurements that will be sent to PC, I can store them in a software declared array, in I2C EEPROM or in SD card, and transfer them after the measurements are finished. I also have bought EEPROM chips, but never used them.


While not super cheap. couldn't one use an XBee set up to wirelessly stream the data to a PC?

Very good idea. Bluetooth, RF, even IR (almost free) will work. I am obsessed with Arduino shields and am always looking for an excuse to buy a new one or two  >:D. It is just that I haven't tried anything before, because the need to get rid of USB related problems was never there. One learns to walk by crawling ...  :-DD
 

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Well for my project (solar system current measurement and logging via a 500A/50mv shunt), I need to process the data on a PC so I'll need some ongoing connection - wired or wireless.  I hadn't considered the noise issues a  USB cable introduces - so this thread is a great education for me.

Quote
I am obsessed with Arduino shields and am always looking for an excuse to buy a new one or two  >:D. It is just that I haven't tried anything before, because the need to get rid of USB related problems was never there. One learns to walk by crawling ...

Ha - Looks like I'll have an excuse to buy a new shield and learn more new stuff as well.. ;D   In my case, I'm not sure I'm even crawling yet - just now learning how to roll over and lift up my head :-[
 

Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au

- use optocouplers with the two-wire Rx/Tx of RS232. If the ADC+uC is battery powered and have good ground design (star ground as in the LT schematic in a post over), and the 4-wire USB cable stops at a USB-to-RS232 breakout board at the Arduino, then one can galvanically isolate the ADC+uC from the PC by using 2 optocouplers (Rx/Tx).


Just do this then. It's a straight forward solution that will still give you a very good result.

However, to make your life easier, use one of the digital isolators such as http://www.digikey.com.au/product-detail/en/SI8421AB-D-IS/336-1755-5-ND/2170662

Much easier to use than dealing with actual optocouplers, just pop it on the board in the signal lines, add power and decoupling and you're done.
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
@ mtdoc. Yes, shields are cool. When my Manhattan style prototypes go up in smoke, I can always retreat to a plug-in shield. Works every time ...

@ Harvs. Nah - it is a RF Transceiver with 2.5 kV resistant silicon isolation (?). To fancy for me. I found some 4N25 I bought for my trains last year.

But I will take a break from measurements - I hope I can realize my first modern PCB experience (last PCB from me was in the early 1970's) - namely the Gerbers and a test batch of the Arduino DVM Shield  ;D
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
I found some videos from a Japanese "volt-nut"? I am envious of the software. It is "QuikEval" http://www.linear.com/designtools/software/#QE1 with board DC590B http://www.linear.com/demo/DC590B and the LTC2400 board DC573A http://www.linear.com/demo/DC573A. If I don't get them for free I will have to save up 100 bucks  ;D


 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th

USB-cables are terrible (Standard RS232 lines are better but not good). I use opto couplers and battery supply for the references and for the ADC cirquit. Transformers also have large capacities between primary and secondary side and will create some shifts to the output.
Even the 0.25pF of the photo couplers create a few uV shift in the output depending on the placement of the USB-cables.


I have not yet clearly understood if there are any important differences between isolating the SPI serial bus or isolating the USB with optocouplers in RS232 Tx/Rx. In the first case the ADC and reference will not share common ground with the microcontroller.

I have several uses for testing out this isolation:

- external noise in precision measurements (see posts over)

- making a voltage/current LCD display for a 2-channel supply with separate grounds (2 single supplies with separate windings on the same transformer) - the Arduino shares ground with only one rail

- protecting the microcontroller from differential to single ended measurements with common mode voltage up to 50 volt in a discrete op amp that I make as 2-quadrant DC source/sink


I found a good article by Jim Williams showing opto isolation on SPI. Schematic of the circuit using the LTC2400 for measurements on divided-down mains AC voltages:




Source: http://m.eet.com/media/1131750/14298-pdf.pdf
« Last Edit: October 08, 2013, 01:51:17 pm by quantumvolt »
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
I have not yet clearly understood if there are any important differences between isolating the SPI serial bus or isolating the USB with optocouplers in RS232 Tx/Rx.

Isolating USB is usually more difficult. Further, if you isolate at the USB interface, then almost all of the instrument can be at dangerous voltages. So you need very good isolation of things like the display, the buttons, etc.

Quote
I found a good article by Jim Williams showing opto isolation on SPI.

The first opto-isolator is connected in the wrong direction.
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Online Andreas

  • Super Contributor
  • ***
  • Posts: 3248
  • Country: de
I have not yet clearly understood if there are any important differences between isolating the SPI serial bus or isolating the USB with optocouplers in RS232 Tx/Rx. In the first case the ADC and reference will not share common ground with the microcontroller.
When you isolate RS232 you will need only 2 photo couplers.
When you isolate SPI you need a additional isolated power supply and usually more than 2 photo couplers.
(except when using the auto conversion mode of the LTC2400).

The common ground of the microcontroller does not mind if you use a star point ground layout.
Further you can put the PIC into sleep mode during conversion. (But I see no difference between sleep mode and normal mode).

With best regards

Andreas
 

Online Andreas

  • Super Contributor
  • ***
  • Posts: 3248
  • Country: de
The first opto-isolator is connected in the wrong direction.

No the LTC is used in "clock out" (auto conversion) mode.

With best regards

Andreas


 

Offline Harvs

  • Super Contributor
  • ***
  • Posts: 1202
  • Country: au
I have not yet clearly understood if there are any important differences between isolating the SPI serial bus or isolating the USB with optocouplers in RS232 Tx/Rx. In the first case the ADC and reference will not share common ground with the microcontroller.

Where I've got free choice of interface, I always choose an async serial (i.e. uart) to isolate because it's the easiest of them all.  You only have to worry about getting one signal through at a time.  No problems with clock skew.

In this case with the 2400 in clock out mode you won't encounter the typical problem with isolating SPI, that is that the master clock gets delayed once through the isolation barrier, then the data return from the slave gets delayed again on the return.  So you have twice the round trip delay to count for when working out your timings.  This is where fast digital isolators become much easier to work with, and you realise just how slow that optocoupler is going to make things.  However, if it's purely unidirectional things are much easier.
 

Offline quantumvoltTopic starter

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Thanks to all for advice.

I think I got it now. I have decided to first try 2 optocouplers on SPI. These are my main reasons:

It is imo simpler and 'cleaner' to isolate the DVM measuring unit (at the SPI bus) from all other circuitry that might be the object of measurements - including analog stuff like external voltage references, sensors, power supplies, amplifiers etc. that share ground with the Arduino and other uC's (Attiny, Atmega) in a small 'rack'. This breaking of instrument ground and DUT ground will not be achieved by only isolating the RS232 serial bus.

This also allows me to measure differentially on all components (without using a differential front end DVM). (Common ground for meter and test circuit allows only measurements on ground referenced components. ) I can also - by accident - reverse the measuring probes without creating a short (but probably only kill the ADC itself and/or it's front end).

At least this is what I think now ... Thanks again :scared:
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf