K8055 : RealAnalogChannel and real value of voltage

Hello,
! I improve my knowledge about A/D converter. Then I modified the original message to be more precise.
I have been working on the board K8055 for a few days (XP/SP2 - C routines created with Borland C++ 5.0.2).
I am using the analog output as a D/A converter and the analog input as an A/D converter.

When I use a voltmeter to measure the voltage in the analog input (a motor sends in real time a tension between 0-3V to give a position, the jumpers sk2 & sk3 are dismounted) and I compare this value with the number returns by the function ReadAnalogChannel, there is a big error (from 6% to 20%).
For example, when the real voltage is ~730mV, the ReadAnalogChannel returns 32 (wich corresponds to a voltage around ~ 600 mV) but the function should return something like 40.

Does somebody know why I have these results ?

For the analog output, everything is all right, i have a good correlation between the number and the voltage (OutputAnalogChannel).

Thank you in advance. I continue to investigate …

LePapat

The reference voltage of the A/D converter is the device’s positive supply voltage (VDD).
There may be some variation of this voltage level depending on the PC where the K8055 is connected.
You may fix this problem by increasing the operational amplifier gain by proper selection of the resistors R8 and R9 (see the manual) and then using the trimpots RV1 and RV2 to fine adjust the gain.

Hi,

I did not try your solution yet. In fact I realised other tests to better understand what’s happening.

When I send a constant voltage in the analog input (same behavior with A1 and A2), and I repeat the use of ReadAnalogChannel several times, I have different result each time. I did it from 750 mV to 3000 mV and I have the same pattern. For example, for the voltage 1860 MV, the function returned 94, 93, 96, 90, 94.

I would like to try your solution but do you think it can fix this (now better described) problem ?

And how to choose the new gain ? If my actual max. voltage is 3 V, does it mean that I need to choose a gain of ~ 1.66. Or can I choose whatever gain I want without damaging the board ?

In fact, to be honnest, I don’t completely understand the sentence in the documentation “When the gain is set to e.g x4, the max. input voltage falls inversely proportionnal to 1.25 V” :blush:

Thanks in advance.

Lepapat

you can only go to 5V input so if the gain is 4x then the real input voltage is 5V:4=1.25V max input. About the readings of the A/D converter it 's because the Vref isn’t stable enough. you have to be sure that Vref is constant. The use of a highly accurate zenerdiode of 5V is needed.

OK,

thanks for all these informations. I have a few questions again (I am not an expert and your answers are really usefull).

To confirm that the Vref is not constant enough, I jave just used my voltmeter to measure the VDD (I mounted the jumper sk2 and measured the voltage ‘on’ it). It seems to be constant (~ 5.02 V) but my way of doing is perhaps not accurate enough.

Does the digital to analog converter uses the same Vref ? Because as I said before, the DA converter works pretty well and the difference in term of pattern is weird.

About the Zener diode, how could I add it to the actual board ? This is very tricky for me, I do not even know where to put this diode !

I would really appreciate if you can make my ideas more clearer again :slight_smile:

Lepapat

The K8055 card uses the USB +5V supply voltage as a reference for both analog-to-digital and digital-to-analog conversion. There is some more filtering in the D/A conversion section. This may be the reason to more stable results.
To stabilize the A/D conversion you may add some capacitor between the analog input and GND.
The value of the capacitor depends on the output impedance of your device. It may be also good idea to add a series resistor between your device output and the analog input of the K8055.