LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PCIe 6738 control relays with digital output for analog signals in LabView

Hi,

Before purchasing a PCIe 6738, I was wondering if anyone is able to confirm to me my idea that the digital outputs of a PCIe 6738 could be used to control a TTL relay, that would relay the analog outputs of the PCIe 6738 into different resistor networks to attenuate the signals depending on gain.

 

For example,

- One analog output would be wired to four relays that contain voltage divider circuits to attenuate the signal by 10, 25, 50, or 100. 

- Through LabView programming, the peak amplitude of an output signal from an .csv file would be determined to determine which "gain" to use in LabView to stay within device limitations. if the peak amplitude of an array of samples was 175mV, LabView would determine this and calculate that out of the options of 10, 25, 50, or 100, the entire signal could be output at 50x its value for a new peak amplitude of 8.75V.

- This new multiplied waveform would be output by the PCIe-6738, and a TTL signal would trigger the voltage divider relay that would then attenuate the signal by a factor of 50, and not use the circuits that attenuate by 10,25, or 100. This would return the signal to its original amplitude.


The goal is to use such a circuit to provide a finer resolution at the output, as the 16bit +/- 10V would not be an accurate enough resolution for my application if the waveforms were streamed from the device at their original amplitudes without any modification.

 

What problems might I face attempting to implement the device in this capacity?

Is it possible that I could even control digital potentiometers with the digital output signals of the PCIe 6738, reducing the amount of space consumed by PCB boards full of resistors?

Any suggestions on 32 or 64 channel relay boards that would work well for this application?

Looking for any advice on how my idea may be implemented more efficiently, or if it would work at all. 

 

Thank you for any help in advance.

 

0 Kudos
Message 1 of 19
(1,635 Views)

Hi Tareyes,

 

I think that your idea can be implemented using NI hardware and LabVIEW.

 

  • 16-bit analogue output means a resolution of 305 microVolts (0.3 mV) across the ± 10 V range. This is a good resolution for most applications. Are you sure that you need a higher resolution?
  • If you do need a higher resolution, have you also considered how to protect against electrical noise in your design?
  • It is possible to control electro-mechanical relays (EMR), solid-state relays (SSR), or digital potentiometer chips using the digital outputs of the PCIe-6738. In the case of solid-state relays, digital potentiometers, or other high-impedance devices that draw small amounts of current you only need to ensure that the digital voltage output level of the PCIe card matches that of the device being controlled. In the case of electro-mechanical relays it's more difficult, because you need to check whether the PCIe card can supply enough milliAmps of current over a digital output to drive the coil of the relay. In many cases the PCI/PCIe digital output might not have enough "strength" to drive a relay coil. If that's the case you might have to drive an SSR first, which in turn drives the coil of an EMR.
  • How many Analogue Output (AO), Analogue Input (AI), Digital Output (DO) and Digital Input (DI) channels do you need? NI offers a wide range of PCI and PCIe cards ( https://www.ni.com/en-gb/shop/category/voltage.html ). Are you sure that the PCIe-6738 is the one that suits your application the best?
Message 2 of 19
(1,531 Views)

Another consideration: You think 16-bit analog resolution at 10V will be not enough but happily want to use relays to do an attenuation network. How accurate will you make those resistors? 1% is about what you can get without resorting to very expensive laser calibrated resistors. But that also ends at 0.1% usually, way higher than your 16-bit analog resolution. You really should look at the whole measurement chain. Some higher resolution for the actual measurement input is not bad, as all the errors are cumulative, but trying to reduce the measurement error of one component to several magnitudes above the measurement error of the worst component in the chain is usually just throwing money out of the window.

 

The NI-6738 doesn't have that, but generally I would try to use DACs with an external voltage reference to change the range of the output voltage, rather than trying to attenuate the analog output after the fact. If you talk about wanting to go beyond 16-bit accuracy, even relays start to be anything but an ideal wire and will actually have an influence on the accuracy, both absolute as well as over time, as they wear out.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 3 of 19
(1,513 Views)

Hi Petru and Rolf, thank you for your replies, the insight is truly appreciated. 

 

For my application, a resolution of 305µV would not suffice. I am emulating sensors that are recorded at a resolution of 1µV. I do not necessarily need to achieve this 1µV resolution fully, but 305µV is not quite there in terms of an accurate representation of the waveforms being emulated. 


I have considered that noise would be introduced into the system with all of the extra components but am truthfully not fully aware of how impactful this could be. I have had a hard time finding a product on the market that is capable of achieving my goal without exceeding my budget of $5k. My closest answer was a custom system of relays and resistors and the use of the 16-bit NI PCIe-6738 device.

 

As for I/O, I need 8 analog output channels, and potentially a few digital outputs to drive other hardware. I have no need for any analog or digital inputs. I have crossed off all other options that NI offers, some components like the cDAQ modules do not have a large enough FIFO buffer, while others like the cRIO systems could work but exceed the budget by a large margin.  

I need the capability to output from up to 8 analog output channels simultaneously with custom waveforms to emulate sensor voltage data, with 300ms worth of data (~25k samples total) at 20kHz and an ideal resolution of 1µV. 

I have also considered digital potentiometers in place of resistor networks, but digipots at best have a 1% tolerance, and I'm likely looking at resistors with a tolerance of 0.1% or even 0.01%. Could solid state relays achieve what I am looking for without the need of driving separate EMR circuits? 

To note, this system would have minimal runtime. It is not something that would be ran daily, it would be used for testing purposes occasionally outputting a set of waveforms a single time per use, so long term wear from extended use is not likely to be a factor.

0 Kudos
Message 4 of 19
(1,491 Views)

Have you considered the inaccuracy due to loading on the resistor divider? and the thermocouple effect at every junction could be in several uV?

 

When your external circuit tries to consume current from this sensor simulation - http://hyperphysics.phy-astr.gsu.edu/hbase/electric/voldiv.html

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 5 of 19
(1,481 Views)

Hi Tareyes,

 

I concur with the concerns raised by rolfk and Santosh. Achieving 1 µV resolution (and the associated accuracy and/or precision) over the whole ±10 Volts range sounds like a challenging application.

 

  • "I do not necessarily need to achieve this 1µV resolution fully, but 305µV is not quite there in terms of an accurate representation of the waveforms being emulated." What is the minimum resolution you need? In other words, what is the maximum allowable step size in the output waveforms? Is it something like 2 µV, 4 µV, 8 µV? Let this maximum step size be called MaxStepSize.
  • Are you sure that you need the same MaxStepSize over the whole ±10 Volts range? What is the typical peak-to-peak amplitude of the signals you need to output? It should be easier to achieve tight resolutions when the peak-to-peak range is the smallest it needs to be.
  • What device is receiving or acquiring the signals that your application generates? Are you sure that that device's input resolution is equal to or smaller than MaxStepSize?

The PCIe-6738 uses a 16-bit DAC. A 24-bit DAC could theoretically achieve a resolution that is 256 times better than a 16-bit DAC, which would mean a theoretical resolution of around 1.2 µV over a ±10 Volts range. After a quick online search, I wasn't able to find a NI PCI or PCIe card that uses a 24-bit DAC. For example, the more expensive PCIe-7852 also uses a 16 bit DAC.

 

It seems that even powerful bench-top Arbitrary Waveform Generators from other manufacturers, such as Tektronix, don't offer 24 bits.

Petru_Tarabuta_1-1698784115687.png

 

If such a tight resolution is indeed needed, perhaps one way to implement it would be to use 2 Analogue Outputs of the PCIe-6738 for each of the 8 signals to be generated. One of the AO's would generate the "course" element of the waveform, and the other would generate the "fine detail" element. The two AOs would be fed to custom analogue circuitry that would scale each AO by a certain gain and then sum the two scaled signals. Not sure if this would work, and even if it would, it sounds difficult and would require deep knowledge of analogue electronics!

Message 6 of 19
(1,465 Views)

Can you share more about the sensor that you're trying to simulate?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 7 of 19
(1,455 Views)

Thanks for the responses,

The full +/- 10V range will not be needed, the peak amplitude of most of these waveforms doesn't exceed 250mV. A large portion of them have peak amplitudes as low as 10-20mV. 

As for minimum resolution needed, a specific value isn't necessary as tolerances can be adjusted and documented. Essentially, as close as it can possibly get to the original sensor readings with the ideal resolution being 1µV without introducing too many variables that would inevitably end up causing more harm than good in terms of refining the signal for optimal accuracy.

The device being used to acquire the signals currently for prototyping is a SlicePro SIM, but the end goal is to be able to verify any DAS system with these waveforms.

The sensor data that I am currently working with is from 7264C Accelerometers.

As of now, I am working with a DT9834 DAC device and utilizing its four analog outputs for testing, but the end goal is to utilize a different device that can provide the necessary amount analog output channels.

0 Kudos
Message 8 of 19
(1,415 Views)

My 2 cents:

I never used digital potentiometers, but from what I was able to search, it would require some communication protocol (like I2C or SPI) that you won't be able to implement just with the digital IOs of the PCi 6738, it will require another device just for that. 

 

 

Message 9 of 19
(1,409 Views)

So, the topic shifts completely when the sensor you're trying to simulate is an accelerometer. This was a piece of critical information that you must have shared in the first place as the nature of the signal to generate determines the best hardware.

 

6738 is not the best AO to generate sine waves without harmonics, you need the DSA series of cards to generate sine signals with very high fidelity like the 4463.

 

DSA cards have a high dynamic range with their 24-bit data converters and the ability to retain frequency information with high fidelity.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 10 of 19
(1,398 Views)