Non-Differential Signal on negative input

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

is it possible to measure a Voltage from 0V to 5V on the differntial ADCIF of the UC3C?

I read about setting the negative input to ground (AVR32_ADCIFA_INN_GNDANA).
Nice trick, works great for all positive inputs, but what if I have to connect the signal to an ADC-Pin >= Input8 (which are negative Inputs)?

Setting the positive Input to GND (AVR32_ADCIFA_INP_GNDANA) won't help here, cause normally I'd suggest setting the positive Input to VCC. :(

Greetings,
jabba

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You should bias one input to half way the range. 0-2.5 will read as negative and 2.5-5V as positive (or the other way around depending on which pin you bias).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

so I need a physically existing free positive input?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe yes, maybe not. I don't know not no nothing about the AVR32.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I connect the positive input to the positive ground (input 10) which gives me a negative ADC result that can be converted to a positive value.

Now., the typedefs for the ADC make the result registers AVR32_ADCIFA.resx[] (incorrectly in my opionion) unsigned,
so if you get some really large numbers from a conversion try typecasting it to a signed 32-bit value.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I get the results from the sequencer which does this typecast already:

#define ADCIFA_read_resx_sequencer_0(ind)                                 ((int)AVR32_ADCIFA.resx[(ind)])

But nevertheless I think my problem is another one:
my reference is 2.5V at the ADCREF0-Input, but my single-ended measurement inputs have pull-ups to 5V. :/

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can you put a pulldown resistor on those inputs so that they form a voltage divider with the external pullups ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually there is ... sorry for my incomplete explaination:

I now have a 4k7 to 5V VCC and a PTC (KTY11-6) for temperature measuring to GND. ( for testing purposes i replaced the KTYs by 2k resistors)

On the positive input (AVR32_ADCIFA_INP_ADCIN5) I have a voltage of 1,476V and the according negative input is set to AVR32_ADCIFA_INN_GNDANA.

On the negative input (AVR32_ADCIFA_INN_ADCIN13) I have a voltage of 1,485V and the according positive input is set to AVR32_ADCIFA_INP_GNDANA.

My reference is 2.5V on ADCREF0.

So I would expect an ADC-Value of about 1200 for the positive input and according to mikech -1200 for the negative input.
But surprisingly I get 1204 for the positive and -1084 for the negative input.

What went wrong here?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your result for ADCIN5 is good, but your ADCIN13 is reading about .16V low, which leads me to suspect the Sample&Hold stage that handles ADCIN8-15.

Section 36.6.16 Calibration in the datasheet says to read the calibration values from the factory-page into the ADCCAL & SHCAL registers.
Factory page 15.10 Calibration Settings

Just did some reading of adcifa_configure(,,) and it sets calibration values into the registers but you will first need to call adcifa_get_calibration_data(,)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

already appliedthe factory-page, like it's done in the adc-demo-application.

now i played a little bit with the sampling frequency and reduced it from 1Mhz to 200kHz. And surprise: i get correct values also on the negative inputs.

Why? And what to do so it works with higher frequency? (I need it, because i have to do some more samples in a defined time)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Do your 'negative' inputs have more impedance than the 'positive' inputs ?
You might need to increase the S/H settling time by setting MUXSET in the CFG register.

Another possibility is to reduce the resolution, do you need 12-bit resolution ?,
because according to the Electrical Characteristics section in the datasheet the maximum ADC clock is somewhere between 1.2 MHz and 2.4 MHz depending on what VDDANA you use and what resolution you want.

Do you really need to sample a

Quote:
PTC (KTY11-6)
thermistor at 1Msamples/sec ??????

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Do you really need to sample a
Quote:
PTC (KTY11-6)
thermistor at 1Msamples/sec ??????

:D ... not really, but i have to do all samples (incluing some time-uncritical PTCs) within a very short period.

I'll try playing with that MUXSET-Bit you suggested.