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.

ADC121S021: Getting wrong values from component

Part Number: ADC121S021

Hello, I'm having troubles using the ADC.

I'm measuring current values via a shunt and an amplificator (INA126U) which gives me an output between 0 and 1.5V (equivalent to 0 to 10A). That is the input of the ADC.

There are 2 ADC and 2 temp sensor on the SPI bus and is managed by an FPGA which as an old software written by someone I don't know.
What I see is that the output value is often doubled on the SPI whereas I know that the measure should not be (I measure it with an oscilloscope).

I'm joinning some screens from the digital analyser (picoscope) of the SPI. I would like to know if those values come from a bad SPI timing (the data is changing of the falling edge of the clock and to me, that's wrong) or something.
Or could this be from the sensor itself ?

On the screen we can see that the bit seems to be "shifted" to the left (for the one on the right).

And on this screen, we can see a "half bit".

I also noticed that when the ground of the electrical board is connected to the ground of the computer (via the picoscope), it seems to reduce this problem. Do you think the problem could be comming from EMC issue ?

Thank you in advance.
Justine

  • Hello,

    There seems to be multiple factors are play

    I first suggest starting with checking that all connections are as expected, all grounds are solid connections, and there are not ground loops. as well as power supplies and such. 

    As for the scopes you provided, is the clock source clean? Jitter nice could be causing the half  bit you described. Is this through a long trace/wire?

    Regards

    Cynthia

  • Hi,

    Thank you for your answer.

    The whole device is powered by a power outlet and powersupply (laptop type), and then connected to the computer via usb and picoscope for measure. So this create a ground loop, but do you think this can cause the problem ?

    Could you give me more information about the solid ground connections ? I guess the powersupply (laptop type) is one.

    For the scope measures, te clock source is clean. There is almost no jitter.

    The trace between the ADC and the FPGA is short (~few centimeters) but another sensor on the spi bus is far (2m via a cable, non shielded).

    Does the fact that another sensor is far on the bus can affect the data from ADC ? which is close to the source ?

    Thank you.

    Justine

  • Can you connect your laptop to the wall charger. Also, if you are using multiple PCB, be sure that all board grounds are physically connected together. 

    As for the other sensor. When device share an SPI bus, the digital communication pins (ie SCLK) will go into High impedance when their respective CS is not enable. Thus this should not be a problem.

    I would like to look further in the half bit. Would you slow down the clock frequency, by half would be good, and test to see if the half bit still occurs?

    Regards

    Cynthia 

  • Hi, 

    Thank you for your answer. 

    I noticed that when I had the cable connected (with SPI sensor going 2m away) I had much more errors on the bus than when it was not connected. And I also noticed that when I was looking at the clock with the picoscope the problem would desapear also. 

    The designer didn't add pull-up resistor on the clock, so I tried to add one and it seems to solve the problem.

    But I don't get why this would create a lag or a delay and the clock looked really good on the scope.

    By the way, I tried to slow down/ speed up the frequency, and it didn't gave me good results.

    Thank you,

    Justine

  • It seems your set up/layout is very sensitive to noise and coupling.

    I would suggest looking into the layout of the PCB, there might be some coupling going on with the sensor connection.  When connecting the scope probes, they should be in HiZ mode. 

    Regards

    Cynthia