Author Topic: DIY ACV/DCV calibrator with AD5791  (Read 9928 times)

0 Members and 1 Guest are viewing this topic.

Offline MickeTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: se
DIY ACV/DCV calibrator with AD5791
« on: June 04, 2020, 09:39:51 am »
Just wanted to share my latest project!
(Thought of putting thread in Projects section, but thought it belongs better here, if not, please move!)
It is a Precision voltage source with AD5791A/B.
Feel free to copy or just get inspiration from! (I include Gerbers, Schematics and source code)

Output max +/- 14V or 10VAC Sine wave (20Hz to 2kHz in 7 steps)
Maximum load is 150mA.

My version has three boards:
1) 10V Voltage reference LTZ1000A (1k/13k) [2-layer 100x160mm] (pictures before anti-air draft caps on LTZ1000 in place)
2) CPU board with dsPIC33EP512MC506-I/PT running at 128MHz (64MIPS) [4-layer 100x100mm]
3) D/A board with AD5791B and LT1010 output buffer [4-layer 100x160mm]

Source code is compiled with Hobbyist version of CCS C ($99, then I added support for 33EP512MC506 for additional $20). http://www.ccsinfo.com/product_info.php?products_id=c-workshop-compiler
A dsPIC33EP128MC202 (narrow 28pin DIL) can also be used, this is supported in the Hobbyist compiler, just change pin definitions and recompile!
Go easy on me, I am a HW guy, not a programmer!

There is a pin header on D/A board that connects directly to BusPirate, I used a BusPirate to get familiar with AD5791 before writing the PIC program. http://dangerousprototypes.com/docs/Bus_Pirate

For generating ACV, a 128 points sine wave table is stored in ROM and scaled down to get arbitrary voltage, and then a copy is put in RAM. At the moment the frequencies supported are 20Hz, 50Hz, 60Hz, 100Hz, 500Hz, 1kHz and 2kHz. Generating higher than 2kHz is not possible right now with 128 points sine table and 15MHz SPI.
SPI data speed is getting high, every voltage change requires 24 bits of data being sent, multiplied with 128 voltage levels for one period, multiplied with the wished frequency...

My first test version was with a less performing AD5791A and AD581LH reference instead of LTZ1000A. Luckily there were no errors on PCB and the D/A worked directly, puh! To be easy to solder, 0805 size SMD components are default.
To control it, just connect a serial cable with settings 115200,N,8,1 and use HyperTerminal, TeraTerm etc. Menu system will show up in terminal.
There is also the possibility to add a 4x20 VFD/LCD display, program is outputting display data as default. Serial and/or parallell display can be connected.
On the D/A board, the only connection between Analog and Digital ground is underneath the D/A, there is no soldermask on PCB to be able to solder a wire. There are strict zones between analog and digital, no wires or components in wrong zone on any layer. There is also galvanic isolation of the SPI-bus (which runs in 15MHz on the dsPIC33).

Offline MickeTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: se
Re: DIY ACV/DCV calibrator with AD5791
« Reply #1 on: June 04, 2020, 09:47:57 am »
D/A Board
 
The following users thanked this post: CalMachine, balun

Offline MickeTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: se
Re: DIY ACV/DCV calibrator with AD5791
« Reply #2 on: June 04, 2020, 09:48:44 am »
CPU Board
 
The following users thanked this post: CalMachine, Simon_RL, balun

Offline MickeTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: se
Re: DIY ACV/DCV calibrator with AD5791
« Reply #3 on: June 04, 2020, 09:49:22 am »
LTZ1000A VREF Board
Yes, it is Precision Wire Wound Ultrohm Plus 802 resistors from Edwin Pettis!  :)
Put copper tape around the critical resistor dividers, LTZ1000 temperature setpoint and 10V stepup.
« Last Edit: June 04, 2020, 10:03:42 am by Micke »
 
The following users thanked this post: CalMachine, serg-el, balun

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: DIY ACV/DCV calibrator with AD5791
« Reply #4 on: June 04, 2020, 10:07:04 am »
Very nicely done project. I love it!

Just a stupid question: Why 82.5nF?   Or is the frequency compensation that critical to achieve something?
 
The following users thanked this post: balun

Offline MickeTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: se
Re: DIY ACV/DCV calibrator with AD5791
« Reply #5 on: June 04, 2020, 10:43:36 am »
Thanks Yansi!
The reason for 82.5nF was as simple as that I had many on hand  ;) But I did calculate that I should be in that neighborhood according to a formula I found somewhere on the Internet...
 

Offline jbb

  • Super Contributor
  • ***
  • Posts: 1135
  • Country: nz
Re: DIY ACV/DCV calibrator with AD5791
« Reply #6 on: June 04, 2020, 09:27:38 pm »
Oh nice.

Not too complicated and in a nice box.

I have a couple of questions / comments:
  • What's the main power supply? Mains frequency transformer? (Sorry if you already said...)
  • You've got a few precision resistor stages in there (7V->10V, 10V->-10V, output amp).  Would it make sense to use a +-7V reference for the DAC to avoid one set?
  • The AC output seems to have some glitches on DAC update.  Are these glitches in line with the DAC spec, or is it something else?  (e.g. opamp slew, ringing in DAC or opamp supply rail ferrites+capacitors)
  • The proposed 14V output buffer (LT1010) might clip against +15V rail.  You should check for dropout specification, and have a look at supply rail tolerances
  • Maybe - maybe - consider separate regulators for the output buffer. That way the external load current won't perturb the internal supply rails.

I'm not sure how important AC generation is to you, but I have some thoughts:
  • Looks like some filtering is required :-)
  • For spectral purity, you want very good timing of the DAC update.  At present, I guess that timing comes from the SPI transfer.  If the SPI transfer is started by software, you could get jitter.  Driving the LDAC pin from micro controller timer output (via isolator) could be a very effective way to tighten that up.
  • At lower output frequencies you should be able to do >>128 samples per period.  In fact, I think you want to, so that the noise inherent in the sampled sine wave is pushed up to a higher frequency and easier to filter out.
    Some kind of Direct Digital Synthesis (DDS) might be good here: you can get adjustable frequency with fixed update rate.
 

Offline Yansi

  • Super Contributor
  • ***
  • Posts: 3893
  • Country: 00
  • STM32, STM8, AVR, 8051
Re: DIY ACV/DCV calibrator with AD5791
« Reply #7 on: June 04, 2020, 10:02:05 pm »
I have also couple other stupid questions:
I see the analog opamps in there (AD867x) have 12uV Vos. What is the specific reason for using these, instead of a chopper amp, that should have much less drift and offset? Is the 1/f corner noise the issue or what?  I am certainly no precision instrumentation designer, so trying to figure out.

Would be interesting to see if a less-precise version with LM399 could be made similar way, with cheaper components. (I happen to have couple of those references  ;D ) and already thought about making a portable calibrator, but with high voltage output capability (with HV amp on the output).
 

Offline jaromir

  • Supporter
  • ****
  • Posts: 337
  • Country: sk
Re: DIY ACV/DCV calibrator with AD5791
« Reply #8 on: June 05, 2020, 08:51:50 am »
Absolutely lovely project. It's obvious you spent your time spit-and-polishing the thing.
What I really appreciate it's finished, working and documented project, being of rare occurrence here. Well done!

I have some additional questions, to clear up some design particularities:
1, The most obvious one - did you measure the linearity and stability of your calibrator? I know this task is non-trivial, but still, design verification is part of the design. Also, it could be interesting to compare AD5791A and AD5791B.
2, Could you, please share internal view of the enclosure? For precision stuff, thermal design is quite critical, even for "low power" devices like multimeters or simple reference sources; when dealing with power stage it's even more prominent - that's why I'm curious.
3, The enclosure looks really good - is that custom made enclosure or you repurposed existing one? Googling for "xflash max" logo visible on front panel didn't bring obvious results.
4, What connectors have you used for voltage output?
5, LT1010 does have 2,5-3V of saturation voltage at output current 150mA (both polarities), supplying it with +15V may not be enough to get +14V of output at 150mA. It should be fine at lower output currents. How does your prototype behave in this aspect?
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14166
  • Country: de
Re: DIY ACV/DCV calibrator with AD5791
« Reply #9 on: June 05, 2020, 09:43:00 am »
I have also couple other stupid questions:
I see the analog opamps in there (AD867x) have 12uV Vos. What is the specific reason for using these, instead of a chopper amp, that should have much less drift and offset? Is the 1/f corner noise the issue or what?  I am certainly no precision instrumentation designer, so trying to figure out.

Would be interesting to see if a less-precise version with LM399 could be made similar way, with cheaper components. (I happen to have couple of those references  ;D ) and already thought about making a portable calibrator, but with high voltage output capability (with HV amp on the output).
The offset of the AD867x is not that critical. If at all it is about the offset drift and low frequency noise. For much of the range the reference would have considerably more drift and noise.  A reason to use a BJT based OP here could be the higher frequency noise and also the speed, so that the settling after DAC steps is fast.  AZ OPs produce quite some higher frequency spikes. Without filtering these may get to the output. A high BW for the AC function limits the filtering, even if using only some 2 kHz. Chances are a modifies software could get a little higher frequency (e.g. maybe 10 kHz) with less sampling point.

Cost wise the LTZ1000 reference is only one part. The AD5791 DAC tends to be even more costly.
So a lower cost version would probably also use a cheaper DAC (e.g. maybe AD5781 - still not cheap).
 

Offline MickeTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: se
Re: DIY ACV/DCV calibrator with AD5791
« Reply #10 on: June 05, 2020, 10:59:32 am »

Quote
Oh nice.
Not too complicated and in a nice box.
Thanks jbb!

Quote
I have a couple of questions / comments:
    Quote
    • What's the main power supply? Mains frequency transformer? (Sorry if you already said...)
    For analog circuits pure linear supply with toroid transformer and LM317 being used. VFD and CPU have a switched mode 5V supply.
    Quote
    • You've got a few precision resistor stages in there (7V->10V, 10V->-10V, output amp).  Would it make sense to use a +-7V reference for the DAC to avoid one set?
    Good question! My first idea was just a source with +/-10V, afterwards I came up with that it would be nice with generating ACV up to 10V, and there I needed amplification. So it is kind of optimized +/-10VDC or 7VAC. But you are right! Might be a good idea to use the 7V from LTZ1000 as reference and only have ONE amplification stage after D/A to get full +/- 14.142V   :)

    Quote
    • The AC output seems to have some glitches on DAC update.  Are these glitches in line with the DAC spec, or is it something else?  (e.g. opamp slew, ringing in DAC or opamp supply rail ferrites+capacitors)
    What I found is that the ringing is coming from the LT1010 buffer stage, got improved when I put the bias resistor of 47 \$\Omega\$ on LT1010. But it can certainly be improved more! Hopefully the analog gurus on this forum have some ideas!  ;)

    Quote
    • The proposed 14V output buffer (LT1010) might clip against +15V rail.  You should check for dropout specification, and have a look at supply rail tolerances
    Sorry! Did not update schematics, but indeed you are right, I am using +/-16.2V supply to overcome the dropout in the OP´s...

    Quote
    • Maybe - maybe - consider separate regulators for the output buffer. That way the external load current won't perturb the internal supply rails.
    Good idea, might improve things!


    Quote
    I'm not sure how important AC generation is to you, but I have some thoughts:
    Quite important, I already have accurate DC sources, but none for ACV for calibration of DMM´s etc. Function generators usually don´t have accurate and stable amplitude (at least not the ones I have tried).
      Quote
      • Looks like some filtering is required :-)
      Yes, indeed!  8) I am just worried about how much the filtering would affect amplitude accuracy, but will certainly try it!
      Quote
      • For spectral purity, you want very good timing of the DAC update.  At present, I guess that timing comes from the SPI transfer.  If the SPI transfer is started by software, you could get jitter.  Driving the LDAC pin from micro controller timer output (via isolator) could be a very effective way to tighten that up.
      Yepp, you are right, I do have some jitter! Now DAC update LDAC automatically after getting 24 bits on SPI. There is one extra channel left in the galvanic isolator and test points available, so easy to add it. I also think this would certainly improve things to load DAC data, and at precise intervals pull LDAC low. First i tried interrupts, but since I wanted to generate as high frequency as possible, I wanted interrupts very often, but every call to interrupt routine is using many machine cycles making it slow. So now I just use a stupid delay in main-loop...

      Quote
      • At lower output frequencies you should be able to do >>128 samples per period.  In fact, I think you want to, so that the noise inherent in the sampled sine wave is pushed up to a higher frequency and easier to filter out.
        Some kind of Direct Digital Synthesis (DDS) might be good here: you can get adjustable frequency with fixed update rate.
      I knew there are lots of DDS chips available with precise frequency but not that accurate amplitude, but I might use some DDS principles in the SW? Hmmm, wish I was a better programmer...

      [/list]
       

      Online Kleinstein

      • Super Contributor
      • ***
      • Posts: 14166
      • Country: de
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #11 on: June 05, 2020, 12:16:04 pm »
      Using the DDS principle (fixed sampling frequency and calculating the phase in steps) can give fine control over the frequency, but it can also effect the amplitude stability. For higher frequencies one would still need filtering. So for a calibrator the way with fixed table with an integer number of points per period and repeating the table is probably better. The 128 samples sound like a reasonable compromise, though 64 or 30 points could still be OK if higher frequencies are more important.

      Skipping the 7 to 10 V step and use a single amplification behind the DAC is an option. This way one could also skip the extra buffer for the 10 V.  The extra buffer for the 10 V it only needed to generate the -10 V, with the 7 to 10 V amplifier and 10 to -10 V stage on different boards.
      In principle the LT1013 from the LTZ1000 circuit could directly drive a 7 V to -7 V stage.

       

      Offline MickeTopic starter

      • Regular Contributor
      • *
      • Posts: 101
      • Country: se
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #12 on: June 05, 2020, 05:05:45 pm »
      Quote
      Absolutely lovely project. It's obvious you spent your time spit-and-polishing the thing.
      What I really appreciate it's finished, working and documented project, being of rare occurrence here. Well done!
      Thanks Jaromir!

      Quote
      I have some additional questions, to clear up some design particularities:
      1, The most obvious one - did you measure the linearity and stability of your calibrator? I know this task is non-trivial, but still, design verification is part of the design. Also, it could be interesting to compare AD5791A and AD5791B.
      Unfortunately the best gear I have at home is FLUKE 8846A and Agilent 34410A. I really miss the gear at my previous work, I used our 3458A and FLUKE 5520A a lot for personal projects  8) Not to mention calibration of all my dozens handheld FLUKE´s  :-DD What I have noticed is that AD5791B indeed is more accurate (more linear) than AD5791A (not statistically enough samples of course...), I read somewhere on AD forum the chips undergo extensive trimming and very extensive testing. They after all guarantee all parameters including INL and DNL, I guess in lack of good gear we have to trust them!  ;)

      Quote
      2, Could you, please share internal view of the enclosure? For precision stuff, thermal design is quite critical, even for "low power" devices like multimeters or simple reference sources; when dealing with power stage it's even more prominent - that's why I'm curious.
      I attach pictures, it is rather compact inside! Luckily there was already a metal shield inside, perfect between A/D board and CPU board!

      Quote
      3, The enclosure looks really good - is that custom made enclosure or you repurposed existing one? Googling for "xflash max" logo visible on front panel didn't bring obvious results.
      I repurposed one box I had at home, made by German company Röntec, seems to have been some kind of advanced scientific equipment.
      Quote
      4, What connectors have you used for voltage output?
      Output is gold plated double binding post, and 2mm banana jacks for measuring VREF Positive and Negative (SW can be re-calibrated with new constants)
      Quote
      5, LT1010 does have 2,5-3V of saturation voltage at output current 150mA (both polarities), supplying it with +15V may not be enough to get +14V of output at 150mA. It should be fine at lower output currents. How does your prototype behave in this aspect?
      I use +/- 16.2V, so far I can get 10VAC out, have not loaded output that heavy yet, will try and see what happens!
       
      The following users thanked this post: jaromir

      Offline SilverSolder

      • Super Contributor
      • ***
      • Posts: 6126
      • Country: 00
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #13 on: June 05, 2020, 07:51:32 pm »

      Looking at your work, @Micke, is like admiring art at an exhibition!  Thank you for sharing & inspiration.
       

      Offline jaromir

      • Supporter
      • ****
      • Posts: 337
      • Country: sk
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #14 on: June 05, 2020, 08:56:44 pm »
      Thanks for clarification and some more pictures.
      Also, I took a look at your sources and found similarity to my programming style. You decide whether it's praise or insult  ;D

      When testing the load regulation, apart from short test you may want to try power dissipation/temperature stability test. Set output to something like 10V, so you have a lot of headroom from 16,2V. Load it with maximal current and log the output voltage (HP34410 should be OK for this test). I guess you may expect two processes to happen - first is fast voltage sag, caused by uncompensated internal resistance of your circuit (ground lead) or voltage drops on PCB traces. Notice that at 10V and 150mA, every 66 microOhms of path resistance will cause 1ppm error. 10cm of 1mm diameter (approx. 0,8mm cross-section, 18AWG) copper wire has resistance roughly 2mOhms.
      That is the part that is somehow easier to remedy by having two separate force and two differential sense terminals. On the other hand, the heat dissipated (from linear output stage of LT1010 plus losses in power supply) will also warm up your circuit and possibly cause voltage drift (drifting resistors in voltage dividers, reference or offset voltage of opamps, thermal EMF). This may take minutes to hours to stabilize. You may also insert temperature probe inside and calculate the temperature coefficient. At this point, one may be tempted to do temperature compensation, but it may be tricky thing to do properly.

      I don't know how much of a drift you'll observe, perhaps this is non-issue, but I think it's interesting experiment to do with tools you have on hand.
      Fortunately, usually one don't need much of a current from a voltage calibrator, so this may be not a problem for usual mode of operation, though useful to know.
       

      Offline MickeTopic starter

      • Regular Contributor
      • *
      • Posts: 101
      • Country: se
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #15 on: June 05, 2020, 09:38:00 pm »

      Looking at your work, @Micke, is like admiring art at an exhibition!  Thank you for sharing & inspiration.
      Thanks SilverSolder! I have myself got lot of inspiration of people sharing things, hopefully someone get some inspiration from my project!  :)
      I thought of adding extra features, like an extra resistor divider to have like a 100mV range, but wanted to try basic functionality first...
      But I am very happy it worked straight away, even if buying the "cheaper" AD5791A it would have hurt if destroying it due to an "upps" in schematic or layout...

       

      Offline MickeTopic starter

      • Regular Contributor
      • *
      • Posts: 101
      • Country: se
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #16 on: June 05, 2020, 10:05:44 pm »
      Quote
      Thanks for clarification and some more pictures.
      Also, I took a look at your sources and found similarity to my programming style. You decide whether it's praise or insult  ;D
      Haha, I take it as a praise! I know many things could have been done more elegant, for example configuration of D/A, instead of just putting value 0x200332 I tried a Union struct where LINCOMP, SDODIS, BIN_2sC etc. could be set more intuitive, but it did not work...  :-[  And as jbb kindly pointed out, there are things to sort out to reduce the jitter... would be nice to have a "real" programmer that knew the MCU inside out for these accurate timing things!

      Quote
      When testing the load regulation, apart from short test you may want to try power dissipation/temperature stability test. Set output to something like 10V, so you have a lot of headroom from 16,2V. Load it with maximal current and log the output voltage (HP34410 should be OK for this test). I guess you may expect two processes to happen - first is fast voltage sag, caused by uncompensated internal resistance of your circuit (ground lead) or voltage drops on PCB traces. Notice that at 10V and 150mA, every 66 microOhms of path resistance will cause 1ppm error. 10cm of 1mm diameter (approx. 0,8mm cross-section, 18AWG) copper wire has resistance roughly 2mOhms.
      That is the part that is somehow easier to remedy by having two separate force and two differential sense terminals. On the other hand, the heat dissipated (from linear output stage of LT1010 plus losses in power supply) will also warm up your circuit and possibly cause voltage drift (drifting resistors in voltage dividers, reference or offset voltage of opamps, thermal EMF). This may take minutes to hours to stabilize. You may also insert temperature probe inside and calculate the temperature coefficient. At this point, one may be tempted to do temperature compensation, but it may be tricky thing to do properly.

      I don't know how much of a drift you'll observe, perhaps this is non-issue, but I think it's interesting experiment to do with tools you have on hand.
      Fortunately, usually one don't need much of a current from a voltage calibrator, so this may be not a problem for usual mode of operation, though useful to know.
      To mitigate voltage drop, I put +sense directly on binding post, and put 1,5mm² cable directly from ground binding post to the power supply, not to get voltage drop on the PCB on ground traces. . The optimal solution would be as you say to have sense wires also on - line as well. But I will do as you suggest, heavy loading and log during duration of hours. At my current work place I can borrow a Keysight 34465A, I love the trend display and histogram of this meter! But as you say, normally you don´t have much load on a reference, but good to have the current capability if needed (and take into account the offset error due to loading...)
       

      Offline jbb

      • Super Contributor
      • ***
      • Posts: 1135
      • Country: nz
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #17 on: June 06, 2020, 12:46:41 am »
      ...
      Yepp, you are right, I do have some jitter! Now DAC update LDAC automatically after getting 24 bits on SPI. There is one extra channel left in the galvanic isolator and test points available, so easy to add it. I also think this would certainly improve things to load DAC data, and at precise intervals pull LDAC low. First i tried interrupts, but since I wanted to generate as high frequency as possible, I wanted interrupts very often, but every call to interrupt routine is using many machine cycles making it slow. So now I just use a stupid delay in main-loop...
      ...
      Yeah, it's quite a lot of updating.

      Maybe you could use DMA transfers to send the SPI updates?  That way you could calculate the appropriate sequence of raw DAC words (i.e. sinewave sample * calibration gain * desired output voltage + calibration offset) once, place them in RAM and use DMA to transfer them to the SPI port on timer pulses.  Also frees up a lot of CPU time...

      Using the DDS principle (fixed sampling frequency and calculating the phase in steps) can give fine control over the frequency, but it can also effect the amplitude stability. For higher frequencies one would still need filtering. So for a calibrator the way with fixed table with an integer number of points per period and repeating the table is probably better. The 128 samples sound like a reasonable compromise, though 64 or 30 points could still be OK if higher frequencies are more important.
      That's true. In almost all cases, the DDS phase increment and truncation will not reliably hit the top & bottom DAC values every cycle.  It seems like DDS is often used for RF applications where frequency and harmonic control are more important than amplitude control.

      However, it might be possible to use special cases to achieve good results.  I.e. if the master clock falls at a convenient frequency, we could get an exactly integer frequency word setting which also happens to be an exact fraction of the phase length...

      Hmm.  For 50 Hz output, how about 204,800 Hz update rate with 4096 steps per cycle?  For 60 Hz, a 245,760 Hz update rate also with 4096 steps per cycle.  Oh, that leaves us needing a variable frequency update rate, which could be done but might be annoying...
      Maybe a separate wave table for different output frequencies would work better?

      (I think that some of the really special equipment these days generate precisely adjustable sample clocks by chaining up an RF DDS generator (for variable frequency) with an analog phase locked loop (for jitter removal).  Seems like a lot of work...)

      ...
      You've got a few precision resistor stages in there (7V->10V, 10V->-10V, output amp).  Would it make sense to use a +-7V reference for the DAC to avoid one set?
      ...
      On second thought, this might not help as much as one would like, because there is still the matter of providing stable Zener (and temperature sensor / buffer transistor?) drive currents, so benefits may not be as much as one would hope.  I'm absolutely not an expert here...
      It seems to me like you can at least relax a bit on absolute resistor ratios as long as they are stable.  Stable gain errors can be calibrated out.
       

      Online Kleinstein

      • Super Contributor
      • ***
      • Posts: 14166
      • Country: de
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #18 on: June 06, 2020, 07:41:50 am »

      ...
      You've got a few precision resistor stages in there (7V->10V, 10V->-10V, output amp).  Would it make sense to use a +-7V reference for the DAC to avoid one set?
      ...
      On second thought, this might not help as much as one would like, because there is still the matter of providing stable Zener (and temperature sensor / buffer transistor?) drive currents, so benefits may not be as much as one would hope.  I'm absolutely not an expert here...
      It seems to me like you can at least relax a bit on absolute resistor ratios as long as they are stable.  Stable gain errors can be calibrated out.
      Directly using a +-7 V (e.g. 2 x LM399 in series) reference is not that easy. One would still need to have a 1:1 divider for the center to fix the zero. With LM399 references 3 in series to get some +-10.5 V may be possible and save on the amplification.

      One can combine the 7 to 10 V and +10 to -10 steps in a way to avoid ground current and have one precision resistor less, but a little more influence from one OP.  Another downside is that one has no longer 2 equal resistors to set the zero.

      Anyway the boards are beautiful made, so why redo it just to save a few parts.

      With just 2 terminal output there will always be some sag if there is heavy load. So the heavy load case can not expect the highest accuracy, but it can still be useful if just a low noise source is needed. In this sense one may even consider to optionally enable some filtering (switch in a capacitor for C33) to choose between low noise and high accuracy for the AC part.

      For the output stage it may help to add some constant current load to the output of U6, so that it's output stage is in class A mode and avoids cross over on transients. This may help a little with the ringing, so that at least the ringing would change less with direction and step size. With the LT1010 as power stage a much faster OP would be problematic.
       

      Offline MickeTopic starter

      • Regular Contributor
      • *
      • Posts: 101
      • Country: se
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #19 on: June 07, 2020, 06:22:12 pm »

      Quote
      Anyway the boards are beautiful made, so why redo it just to save a few parts.
      Thanks Kleinstein!

      Quote
      With just 2 terminal output there will always be some sag if there is hea :-//vy load. So the heavy load case can not expect the highest accuracy, but it can still be useful if just a low noise source is needed. In this sense one may even consider to optionally enable some filtering (switch in a capacitor for C33) to choose between low noise and high accuracy for the AC part.
      Yep, did not plan to load output that heavy, and if I do, I will adjust the voltage accordingly to compensate. Yes, C33 was prepared as you say to be able to do some filtering  8) Will do some experiments and see how much the amplitude is affected, might be possible to enter an offset (one per frequency range) to compensate.

      Quote
      For the output stage it may help to add some constant current load to the output of U6, so that it's output stage is in class A mode and avoids cross over on transients. This may help a little with the ringing, so that at least the ringing would change less with direction and step size. With the LT1010 as power stage a much faster OP would be problematic.
      Ahh, sounds reasonable! Thanks for advice, I will put some small loading (like 10k) on U6 output, and see if the ringing gets smaller! Ahh, it gets worse with faster U6? I thought it settled faster with faster OP and thereby less ringing...
       

      Offline jbb

      • Super Contributor
      • ***
      • Posts: 1135
      • Country: nz
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #20 on: June 07, 2020, 06:45:51 pm »
      Erm, before going to town on the output buffer stage, have you checked the VOUT_DAC waveform? The buffer stage might be carefully amplifying a real signal...
       

      Online Kleinstein

      • Super Contributor
      • ***
      • Posts: 14166
      • Country: de
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #21 on: June 07, 2020, 06:58:06 pm »
      The response to the steps has 2 parts: a fast one with quite some overshoot an likely ringing and a considerably slower approach to the final value, more like an exponential.
      The slow part is probably due to C31. Here one could get away with even less to get a faster approach and could get less amplitude if there is some additional capacitance (e.g. 30 pF) at the other half of R30 too.


      In any case a fast amplifier with feedback directly from the output and thus low output impedance is tricky. To make it tolerate some capacity at the output one kind of needs some impedance, at least at the higher frequency end. There is a reason why higher frequency AC usually has some 50 Ohm output impedance and not near zero impedance.
       

      Offline MickeTopic starter

      • Regular Contributor
      • *
      • Posts: 101
      • Country: se
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #22 on: June 07, 2020, 07:55:26 pm »
      Erm, before going to town on the output buffer stage, have you checked the VOUT_DAC waveform? The buffer stage might be carefully amplifying a real signal...
      Did some measurements like a week ago, was curious as you say if the buffer introduced garbage or was happily amplifying garbage...
      Will continue with more measurements...
      Blue trace is before LT1010 (TP26), and Red trace on J6 connector.
       
      The following users thanked this post: MegaVolt

      Offline RikV

      • Regular Contributor
      • *
      • Posts: 130
      • Country: be
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #23 on: April 30, 2021, 03:40:48 pm »
      Are there some evolutions in this project?
      I am considering building it. Is there any more recent Gerbers? Bill of material (for LTZ1000)? Firmware?
      Any test results? :-//
       

      Offline MickeTopic starter

      • Regular Contributor
      • *
      • Posts: 101
      • Country: se
      Re: DIY ACV/DCV calibrator with AD5791
      « Reply #24 on: April 30, 2021, 09:13:50 pm »
      Hi!

      No more evolutions so far, I did though plan for an add-on with a resistive divider to give more accurate results in the hundreds of milliVolts range...
      Bought some resistors from Ebay:
      https://www.ebay.com/itm/111726905871
      https://www.ebay.com/itm/111928514332
      https://www.ebay.com/itm/121841204486
      Plan is to use an output from MCU to enable a bistable (latching) relay when wanted output is under like 100mV, the resistive divider with a chopper opamp will be enabled dividing 10V to like 100mV (depending on resistor ratio).
      No more recent Gerbers, the ones I posted are more up to date than the ones I ordered, for example the pinning for LT1010 was wrong on my boards, but is corrected in the attachments.
      Have not done a BOM for LTZ1000 board, please see schematics, but is according to LTZ1000 datasheet, nothing new really! Any 10V reference can be used.
      Source code for PIC MCU is attached in my second post, source code can surely be greatly improved!  ;) jitter when generating AC for example...  8)
      I have done measurements, unfortunately my best test equipment I have access to is a Keysight 34465A and Agilent 34410A, but test results looks good, can see if I can gather some results and post!

       


      Share me

      Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
      Smf