This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1261: ADS1261 Measure multiple sensor

Part Number: ADS1261

Tool/software:

Dear TI (Bryan),

I have designed a PCB using the ADS1261 to measure a temperature sensor.

My sensor( DC voltage) is connected to the AIN6 & AIN7 with REF AIN1 & AIN0 and works fine with a sampling rate of 2.5Hz .

I now want to measure 3 sensors which i connect to AIN4 & AIN5, AIN6 & AIN7 and AIN8 & AIN9.

How do i do the measurement procedure?

Here is what i did so far:

- i started the measurement, like i do for one sensor (Inp, ref, mode, ...) and then i changed the INPMUX to a new channel and measured again.

Code:

self.INPMUX =  INPMUX_MUXP_AIN6 + INPMUX_MUXN_AIN7
time.sleep()
self.measure()
time.sleep()
self.INPMUX =  INPMUX_MUXP_AIN4 + INPMUX_MUXN_AIN5
time.sleep()
self.measure()
time.sleep()
self.INPMUX =  INPMUX_MUXP_AIN8 + INPMUX_MUXN_AIN9
time.sleep()
self.measure()
...
The data i am reading make it look as if the input is not changed.
Do i need to include a STOP(), START() each time i change my inputs?
Thanks in advance and best regerds,
Marcel 
  • Hi Marcel Beck,

    Writing to the INPMUX register should restart the conversion in process

    Are you holding the START pin low since you are using the START command to control conversions?

    If so, try holding the START pin high and sending the INPMUX commands to see if that works (do not send any START /STOP commands in this mode)

    Also, I am assuming you are using continuous conversion mode, not pulse convert mode

    You can also provide logic analyzer data of the communication so we can verify the correct sequence is being sent/received as well as the timing

    -Bryan

  • Hi Bryan,

    i kind of figured out where my problem is.

    The change of the inpmux and measuring them works fine, IF i leave enough time between the setting of the inputs and the measuring.
    I wrote a script (python code) looking the following:
    change_the_inputs_to1()
    time.sleep(0.1)
    read_adc_values
    time.sleep(0.3)
    read_adc_values
    ######################
    change_the_inputs_to2()
    time.sleep(0.1)
    read_adc_values
    time.sleep(0.3)
    read_adc_values
    The first read_adc_values (0.1s) still measures the old input. The second read_adc_values, so after 0.4s measures the correct and current input.
    It seems like the setting of the INPMUX needs some time to settle? Is that the case and why does it take so long?
    Is there a way to speed this up?
    I am trying to read 3 Sensors connected to the inputs with 2.5Hz (sampling rate). Therefore i cannot have a time.sleep() of 0.4ms+.
    I am also making use of the DRDY_PIN and a ISR (interrupt service routine) which is triggered by the sampling rate (2.5Hz).
    Is the DRDY_PIN also restored after changing the inputs? As a new value that has not yet been queried is reached with new inputs ? Or is it only coupled to the sampling rate?
    Thanks in advance and best regards,
    Marcel
  • I fixed my problem by switching from continues convert mode to pulsed convert mode.

    I start my conversion with START() (command) and before switching the inputs i STOP() and afterwards START() again.

    The calibration is done only once and before i repeatedly switch the inputs.

    Is the calibration now only done for the current set input and do i get the noise "back" when switching the inputs?

    Best regard,

    Marcel

  • Hi Marcel Beck,

    I am glad you were able to make progress on this issue while I was out of the office

    What kind of calibration are you executing? If you are performing a self-offset correction, then switching channels should not change this behavior because this just shorts the inputs after the mux to calibrate the PGA+ADC offset. If you are calibrating system offsets, then switching channels can affect this behavior because the external offset could be different on a per channel basis. So this really depends on what you are trying to calibrate

    -Bryan

  • Hi Bryan,

    i am only using the SFOCAL calibration at the moment.(self)

    Thanks for the explanation, that confirmed my suspicion of the system offset calibration. (system)

    How do i realise the GANCAL calibration with my 3-Sensor-Switching ? Would it be enough to just do the calibration ones and then i am "good" ?

    Best regards,

    Marcel

  • Hi Marcel Beck,

    You can generally apply the same principles to gain calibration as well: if you are just calibrating the PGA+ADC, then a single gain cal should be acceptable (you might spot check across multiple gains however just to be sure the gain matching is acceptable. This is not specified in the datasheet). If you want to calibrate each sensor and you expect the error to be significantly different per sensor, then you should calibrate each sensor separately. This will require you to store multiple sets of calibration coefficients in your controller, as the ADC can only store one set

    -Bryan