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.

ADS1220:Periodic reset of ADC settings

Part Number: ADS1220

Hello. I use in my project ADC ADS1220. I initialize ADC settings only 1 time at program start. While the program is running, I switch the channels of the multiplexer and set gain. And I noticed that while the program is running, the data rate is reset. It is set to the default value. I can not say for sure whether all the ADC registers are reset, but this parameter is reset exactly. This happens irregularly. The program may work normally for several days, and then a register reset may occur, but a reset may occur after a few hours. Tell me, please, what could be the reason?

Power settings:

AVDD = 5V
DVDD = 5V
AVSS = GND
Ref = 2.5V

ADC initialization function:

void init_adc(void)
{
long in_adc = 0x0000A0E0;

//reset settings
SPI_Send_byte(0x07);

// Delay a minimum of 50 us + 32 * tclk
del_50();
Delay10TCYx(4);

wrreg(0, 4, in_adc); // starting from the Configuration Register 0, 4 bytes, value 0x0000A0E0

// start
SPI_Send_byte(0x08);
}

ADC settings at program start:

Input multiplexer configuration = AINP and AINN shorted to (AVDD + AVSS) / 2
Gain = 1
Normal mode
Single-shot mode
Data rate ~ 440 SPS (DR Bit Settings = 101)

Fosc = 3.686400 MHz
SCLC = Fosc/16

I use the following functions while the program is running (I select the channel and set the gain):

unsigned char KuU[8] = {0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E};

void set_u(void) {
	wrreg(0, 1, (0x70 | KuU[i]));
}

void set_uc(void) {
	wrreg(0, 1, (0xE0 | KuU[i]));
}

void set_ic(void) {
	wrreg(0, 1, (0xE0 | 0x02));
}

void set_i(void) {
	wrreg(0, 1, (0x60 | 0x02));
}

  • Hi Anton,

    If only the configuration register 1 is changing to default then the results should be similar and only the data rate is changing. If the whole device is resetting, then the voltage reference would change as well (from external to internal) in the configuration register 2 and the conversion result would also be affected.

    The issue that most often occurs causing a configuration reset is a transient event. These transients can often occur with prototyping a solution. These transients can occur from EMI/RFI such as from motors turning on/off or from cell phone activity. The transient is often picked up in exposed wiring and can affect analog inputs as well as reference or power supplies. Another transient event can be caused from ESD by just touching devices or wiring.

    With the ADS1220, if either the DVDD or AVDD supply should dip or brownout out a reset will occur.

    I also noticed that in your initial configuration that the first 2 registers are left to the default settings while register 2 is set to A0 (external reference and register 3 is set to E0. E0 for register 3 is invalid as it uses a reserved setting. I am assuming that the data is transmitted in the order shown.

    Best regards,
    Bob B
  • Bob Benjamin said:
    Hi Anton,

    I also noticed that in your initial configuration that the first 2 registers are left to the default settings while register 2 is set to A0 (external reference and register 3 is set to E0. E0 for register 3 is invalid as it uses a reserved setting. I am assuming that the data is transmitted in the order shown.

    Thank you for the answer. Only you did not understand correctly how my ADC is configured.
    Register 0 is set to E0 
    Register 1 is set to A0
    Register 2 and 3 - default settings.
    I can not detect the reset of the ADC settings, because I constantly reconfigure the channels in the multiplexer (set gain). So I get the correct conversion result, but I can see that the data rate has changed. But I can not notice it in time, because the device can work normally for several days, and then there will be a reset.
  • Hi Anton,

    Ok now I understand how you registers are being written.  I was thinking of data in an array moving left to right, but you are actually transmitting data right to left. 

    To absolutely verify if the ADS1220 is resetting or if just the register is changing for some other reason, I would suggest writing a value to Configuration Register 2 that is not the default, such as 0x07.  This will set the IDAC output, but as you are not using the IDACs this should not be an issue.  If the entire ADS1220 is going into a RESET state, this register will also go to 0x00 which is the default value.  This will make it more conclusive as to whether there is just an SPI communication issue, or it the device is going into a full reset condition.

    Best regards,

    Bob B

  • Hi Anton,

    The following post had a similar issue where the device would periodically reset.  You may find that the information in this post is helpful.

    https://e2e.ti.com/support/data-converters/f/73/p/795175/2959058#2959058

    Best regards,

    Bob B

  • Hi Bob. Thank you very much for the advice. I will try to add capacitors on the ADC power line, and check if all ADC registers are reset or not.

  • Hi Bob. We have upgraded the program code of the project and added an analyzer that helps to catch the moment when the data transfer rate has changed. I have a measurement cycle that is tied to the frequency of receiving data from the ADC (600 SPS). Therefore, I know how long the entire measurement cycle lasts for a given ADC setup. The analyzer helps me to understand when the time of 1 measurement cycle has increased more than 20 times. I read the value of register 1 at this moment - I got the value of A0. That is, the ADC is configured correctly, but I get the wrong result. Can you advise something else on this issue?

  • Hi Anton,

    Let me make sure I understand what you are telling me.  The conversion starts from the START/SYNC command, but the conversion may take longer than the programmed setting based on some timer used to check for abnormal conversion rate.  If the conversion period takes much longer than expected you read the configuration register but it shows the expected (or previously programmed) setting.  Is my understanding correct?  Did you look at all of the registers or just register 1?

    What do you mean by getting the wrong result?  What is expected (and what input voltage is applied) and what code value is returned?

    What I'm suspecting is there is a transient that is causing the device to be placed in an odd state.  If you are prototyping, and there is any exposed wiring you can easily pick up a transient.  The transient may not be enough to fully reset the device, but instead cause a brownout of some of the internal circuitry.  If communication is still working, a RESET command should allow the device to recover. 

    The transient could also be a result of wiring or trace inductance.  Supply wiring (both source and ground) should be low inductance so that needed current is not choked from the ADS1220 during short, but fast current demands.  Inductors or ferrites on the supply lines is discouraged for the same reason.

    You are very familiar with your design and setup but I am not.  It would be very helpful for me to see your schematic and some pictures of your test setup.  Without further information I can only make a guess at to what might be happening.  The ADS1220 device is very robust, so most likely there is some external event or wiring issue that is causing what you are seeing.  We need more information to narrow down the possibilities as to what is causing it. 

    The link I provided in an earlier post has some similarities and the issue was discovered to be relative to the power wiring inductance and not the ADS1220.  In this case the supply voltage dipped below the operating threshold because the wiring inductance limited current demand.  Adding a larger value cap closer to the ADS1220 supply inputs resolved the problem where the cap acted as a charge reservoir when short duration charge was required.

    Best regards,

    Bob B

  • Hello, Bob. I now have the opportunity to add capacitors to the input of the ADC. Please tell me, is it necessary to add low ESR capacitors? What should be the capacity of these capacitors (range)? Is 100 µF required?

  • Hi Anton,

    This is difficult to answer because we have not clearly identified the problem. If you read through the thread I referred to you will see that the user identified the problem first, then resolved it. At this point I don't think the problem has been clearly identified, so it is difficult to say how best to treat the issue. Cap placement is most likely more important than value or ESR.

    I would appreciate seeing schematics and pictures of your testing setup so we can more clearly identify what might be happening. I would highly recommend using an oscilloscope on the supply lines and monitoring the supplies to see if this is where the issue is taking place. It may be coming from poor grounds or from other signal lines.

    Best regards,
    Bob B
  • Hello, Bob. Here is a diagram of the device. Look at it, please, and tell me, what are the options to improve the scheme?

  • Hi Anton,

    I'm a little confused by the schematic. It appears that you are attempting to capture an AC input signal. The signal is amplified through the INA, with a large cap load on the INA output to block DC and low frequencies (I'm not sure how well the INA will like to see this much cap load). It is not clear as to why the second set of DC blocking caps are needed at all as you essentially have a bandpass filter into the INA. It is not clear the purpose of DA21 and associated components. It should be possible to add a simple low-pass filter with no need to add the additional circuitry to set the common-mode R11 and C11 as the INA is already referenced to 'f'.

    Here are a few considerations as they directly relate to the ADS1220. The connections between AVSS and DGND should be a low impedance connection as close to the device as possible. It appears these connections are joined together at 'b' through a couple of jumpers. In the end it would be best to use a single ground plane. There probably only needs to be one 5V LDO as well. There is probably not much to be gained by using separate supplies.

    Second issue I see is the Vcon connection. When switch DA5 is closed, 12V will be applied to the AIN1 input which exceeds the absolute maximum ratings for the device. Even though there is a series resistance to limit the input current to less than 10mA, the ADS1220 is not designed to operate correctly outside of the recommended operating conditions. If the intention is to measure the source voltage, then a voltage divider should be used so that the analog input does not exceed the analog supply voltage of the ADS1220.

    I see another area of concern relative to the CLK pin on the ADS1220. Normally this pin would be connected to ground to turn on the internal oscillator of the ADS1220. Instead you have this pin connected to the crystal oscillator of the PIC. Changing the frequency of the internal oscillator will change the digital filter characteristics and output data rate of the ADS1220. Perhaps that is your intention. However, using the micro oscillator circuit is not the best method as the oscillator circuit does not like the additional loading and can skew the frequency as well as cause issues with startup. Instead, it would be better to use an output pin from the micro to directly drive the CLK pin of the ADS1220 if the PIC allows the internal clock to be sent out a GPIO. If this is not possible I would suggest either using the internal oscillator of the ADS1220, or an external oscillator of the desired frequency instead of the crystal circuit of the PIC.

    If this schematic is the same as the one you have been testing, then the areas of concern are the Vcon connection, the clock source, the ground connections, and the caps associated with the input signal path that can store energy during EMI/RFI events.

    Best regards,
    Bob B
  • Hi Bob. Thank you very much for the detailed answer. We will discuss your proposals in a team, and I will definitely write to you about the results of the work.

  • Hello, Bob.

    We tried to do what you advised - to use the internal generator ADS1220. I have to choose the mode - Single-Shot. According to table 11 in the datasheet: conversion time = 6994 t(clk) for Single-Shot Mode at frequency f(clk) = 4.096 MHz.

    (1/4096000) * 6994 = ~ 0.0017s
    1s / 0.0017s = ~ 585 SPS.
    But we see on the oscilloscope not 0.0017s, but ~ 0.002s, which corresponds to ~ 500 SPS (in the screenshot). Tell me, please, if there are any features that I did not see?

    Bob Benjamin said:
    Hi Anton,
    Second issue I see is the Vcon connection. When switch DA5 is closed, 12V will be applied to the AIN1 input which exceeds the absolute maximum ratings for the device. Even though there is a series resistance to limit the input current to less than 10mA, the ADS1220 is not designed to operate correctly outside of the recommended operating conditions. If the intention is to measure the source voltage, then a voltage divider should be used so that the analog input does not exceed the analog supply voltage of the ADS1220.

    I would like to tell more in detail about this part of the circuit: not 12V will be applied to the AIN1 input. The voltage here is limited by a divider: a 1Ω resistor and a 36Ω coil resistance. Therefore, ~ 0.3-0.35V will be applied to the input of AIN1. We recognize that there may be surges from EMF in this section of the circuit, because the load is inductive. Bob, can you advise something, please, how can you limit these bursts? We have an idea to insert a schottky diode in front of a Vcon (bold in the diagram). Will this help?

  • Hi Anton,

    The timing of the internal oscillator can vary by as much as 2% from the nominal. Also, when using the internal oscillator you need to add 50us for the time it takes for the oscillator to start. This however would not add to the difference you are seeing. We cannot see from the scope plot the SCLK. When issuing the START/SYNC command, the start does not take place until the 7th falling edge of SCLK of the command. So you cannot use the rising edge of DRDY to the falling edge of DRDY as your measurement. You must use the 7th falling edge of SCLK of the START command as the beginning of the conversion start.

    As far as the EMF of the coil, it is difficult without seeing the response to know what might be the best treatment. The method you propose might help, but the BAT54 is a leaky device and you might want to consider a BAV199 instead. A couple of other options would be to use a reverse biased diode across the coil or a low leakage bi-directional TVS diode in place or in addition to the diode array.

    Best regards,
    Bob B