Why does my A/D board experience crosstalk between channels when using xPC Target (R14SP2)?

3 views (last 30 days)
I am using xPC Target to read data from an external A/D board. I notice that, when I read consecutive channels from the board, the second channel that is read is erroneous in that it is different than what would be expected. I observe this different voltage only when I use the A/D input block in xPC Target to read data from my board.
An experiment that demonstrates this is the following:
1) Feed some signal, perhaps produced by a sinewave generator, into channel 1 and leave channel 2 disconnected.
2) Create a model that reads and displays both channels 1 and 2. You will see that channel 2 shows almost the same voltages that channel 1 shows.
3) Connect a resistor from channel 2 input to ground. Now the signal you see on channel 2 is suppressed and depends on the value of the resistor. A smaller resistor does more suppression of the extraneous signal on channel 2. If the source resistance of the circuit under test is large, then clearly, adding a resistor to ground is not acceptable since it will change the measured voltage.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 13 Jan 2010
This issue is related to the speed at which xPC Target reads data from the board. The observed increase is due to leftover charge in the A/D converter circuitry. This charge must dissipate after an A/D conversion before xPC Target can attempt another read.
There are a few ways to improve the accuracy of A/D conversion:
1. Connect the signals to odd input channels only and ground all the even input channels. This will ensure that the data is sampled from all channels and thus disregarding results from the even channels.
2. Add a voltage follower to each input.
A voltage follower should have a high input impedance and a very low output impedance.
This method is costly, but is the only way to maintain the board speed. UEI has an input conditioning board, PD-BUFF, that you can insert between the signals and the A/D inputs. This board has a voltage follower for each channel. Note that this board only works for UEI PD2-MF boards because it gets power from the board to which it is connected.
For most xPC Target boards, it is not possible to slow down individual acquisitions for multiple channels. In these cases, you must use a hardware solution, such as adding a voltage follower.
3. Decrease the rate of A/D conversion.
For some boards, you can decrease the rate by editing the C code of the S-function associated with the A/D conversion input corresponding to a particular board. Vary the A/D conversion rates to find the best rate for your application. Each board manufacturer has different methods of accomplishing this:
  • National Instruments
These boards have a settable parameter that sets the length of time that elapses between switching channels and when the A/D converter samples the voltage. An xPC Target National Instruments driver contains a constant that is the number of ticks of the internal 20 MHz crystal between acquisitions during a single scan over the selected channels. You can change this constant as necessary. For example, the variable in the driver file adnipcie.c is called convDelay. It is set to a board-specific value. The default value for this variable is the shortest time between conversions that the board can support. Increase this value by 20 for each microsecond of extra delay you need to set.
  • United Electronic Industries (UEI)
The UEI PD2-MF series has a slow bit per channel that delays the A/D converter. If you enable this bit in the mask, the driver allows additional settling time. When acquiring multiple channels, set the slow bit for each channel.
For other UEI boards, such as the UEI PD2-MFS series, each input has sample and hold amplifiers that eliminate the problem.
  • General Standards
The General Standards ADADIO board resolves the issue by having a separate converter for each channel. This eliminates the need for switching.
Note, an additional side effect of the charge in the input circuitry of these boards is that the board draws some measurable current (in or out) while the capacitance charges or discharges through the circuit under test when the input multiplexer switches. This can insert a glitch on the circuit being measured under some circumstances.

More Answers (0)

Products


Release

R14SP2

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!