High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set ni5761 dc offset(LT1661) by spi ?

How to set ni5761 dc offset(LT1661) by spi ? My input signal is between 0V to -1V, so I can set ni5761 dc offset?? OR Which way can ni5761 accept 1V to -1V signal by adjust ADC ADS62P49??
0 Kudos
Message 1 of 10
(9,614 Views)

Hello studylv90,

 

In the LTC1991 datasheet (http://cds.linear.com/docs/Datasheet/1661fa.pdf), page 9 shows some of the addresses for loading and updating the DAC A and DAC B registers. Ideally, the options to both load the DAC and update its value would be ideal, so these values to write are 1001 and 1010 for DAC A and DAC B, respectively. The way the trim DACs on the 5761 work is that there is a pair of DACs for each input channel of the differential amplifier on the DC-coupled version of the 5761. However, you should only ever update one of the DACs at a time to prevent possibly damaging the components. Thus, one of the DACs should be set to 0 if you are setting any value on the other DAC.

 

One of the DACs is meant to adjust the positive input of the amplifier (I believe this is DAC B), and will make the signal more positive. The other DAC adjusts the negative input of the amplifier (I believe this is DAC A), and thus adjusting that DAC will make the offset more negative. The best method for setting the actual values of these DACs is to take a measurement from the input channel, determine the current value, change it slightly, and then re-determine your offset. You can then do this iteratively until you get to the desired offset (such as with a binary search method). This is most useful if there already is an offset on the channel due to some sort of impedance mismatch and you are trying to zero it out. I am sure a similar method could be used though to get to an offset that you want. Remember, only adjust one of the DACs (positive or negative) at a time and keep the other set to 0 while you are doing so. 

 

The basic idea would be to first set the correct value for the "SPI Device Select". In the CLIP help, it shows this is a U8 value that will be 3,4,5, or 6 depending on which AI channel you are writing to (AI 0 DAC, AI 1 DAC, AI 2 DAC, or AI 3 DAC, respectively). Next, set the "SPI Address" U16 value which will be 1001 if you are adjusting DAC A or 1010 if you are adjusting DAC B (check the LTC1661 datasheet to make sure these values are correct). Finally, to actually set the current DAC value, you would wire the appropriate 10-bit input code value to "SPI Write Data" (it will accept a U16 value). Determining which actual input code corresponds to the DAC offset you want is the challenging part which may require some iterative logic to measure and adjust until you find the correct setting. To actually send the values to the board, you will need to set the boolean value for "SPI Write" to false, then true, then back to false in succession (ie- calling it three times in a row with those values wired to it) to create the rising edge needed for actually writing it to the board.

 

By setting a positive offset such as 0.5 V (which I assume is in the output range of the trim DACs), you should be able to effectively change your -1V to 0V input signal to -0.5V to 0.5V which would then fall within the range of the 5761. You would then later have to account for this offset that was added by calibrating it back out to get your input voltages correctly.

 

The method for writing to the ADC and changing the offset would be similar to what I described above though all of the SPI values would be different and you would have to look at the ADC data sheet to determine what the correct values are. I am not sure you will achieve what you are trying to do by adjusting those values though, as they are meant to be a much smaller adjustment to

account for small impedance mismatches between your source and the 5761 and not really meant to behave as a programmable voltage offset.

 

Hope this helps, 

Daniel S.
National Instruments
Message 2 of 10
(9,563 Views)
dansch,thank you. I will try it.
0 Kudos
Message 3 of 10
(9,554 Views)

Signal source   is   keithley  2400.   4mA    current   to  My NI5761-DC ,get  -200mv。

To change  offset  ,measurements do not  change.  And  I open  NI5761,I do not find LT1661.

 

File:labview2010,FPGA2010.

Download All
0 Kudos
Message 4 of 10
(9,547 Views)

Hi studylv,

 

I am attaching an example that I know works for measuring the offset and performing an adjustment to zero out the offset. The specific logic on the host to perform the search (measures offset, compares to previous value, and determines the next setting for the DAC to try) and zero out the offset may need to be changed for your application, but at least you can examine it and see one way that it is done.

 

Best of luck,

Daniel S.
National Instruments
0 Kudos
Message 5 of 10
(9,535 Views)

Is there a way to tell if the Ni 5761 is has AC or DC coupling?

thanks

 

0 Kudos
Message 6 of 10
(9,078 Views)

Hi sholm,

 

The easiest way is to look at the part number on the side of the module (the part number is found along with the serial number and such on the sticker). If there is a -01 at the end of the part number, then it is AC-coupled. If there is a -02 at the end, it is DC-coupled.

 

Best Regards,

 

Daniel

Daniel S.
National Instruments
0 Kudos
Message 7 of 10
(9,074 Views)

Ok thanks - The module says -02 however the results I'm getting are more representative of AC coupling.

I look at the same signal on a scope that is DC coupled and all signals are positive, when I AC couple the scope the signals adjust to +/- signals.

 

The results that are returned from the 5761 are + and - values.

 

Is there any way to change it or set it? 

 

Any possible way to check that the box matches the label?

thanks

 

0 Kudos
Message 8 of 10
(9,071 Views)

Hi sholm,

 

As far as checking the coupling programmatically, you can do this by reading a register in the EEPROM. If you look in the FlexRIO Host Interface library at C:\Program Files\National Instruments\<LabVIEW>\vi.lib\FlexRIO\FlexRIO_HostInterface.llb, where <LabVIEW> is your version, there is a VI titled FlexRIO_Host_EEPROMReadByteArray.vi. Select your device and enter the address 0x28. Run the VI and it should return a U8 value where the highest bit (most significant) will indicate the coupling of the channel; it will be 0 for AC-coupled and 1 for DC-coupled. Thus, I would expect you to read a 1 for this bit (the U8 will likely read as 0x80 in the case that the most significant bit is 1 and all the other bits are all 0). Note: as it states in the user guide for the module, do not write to any of the addresses of the EEPROM unless it is user space (addresses 0x7C and higher), or the device may fail to operate correctly.

 

The coupling of the module cannot be changed or set between AC and DC. However, you can change/set the DC offset (see my long response above to studylv90 and the code that I attached in the next reply for an idea of how to do this) assuming it is a DC-coupled module, by programming the DACs on each channel.

 

It could be possible that there is a large negative DC offset present in the module or due to system impedance mismatch between your module and signal source (which should be 50 Ω) that is responsible for the difference in readings between the oscilloscope and the NI 5761 module. Do you have any method of generating just a DC signal within the range of the module that you could try to connect? What DC offset do you expect to read when the 5761/scope is DC-coupled with the signal you are using?

 

Regards,

Daniel S.
National Instruments
0 Kudos
Message 9 of 10
(9,066 Views)

Hello,

 

I think this is incorrect.

 

The Offset Correction Time Constant [0:3] is the time constant of the correction loop and is a function of the sampling clock frequency, not a DC offset from what I can tell.  Was this issue solved or is there an example of setting a DC offset on the 5761?

 

Thanks,

 

Steve K

0 Kudos
Message 10 of 10
(6,182 Views)