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.

ADS1247 does not work

Other Parts Discussed in Thread: ADS1247

Hello. I haven't had any experience before with external adc and spi, so I decided to buy and try out ads1247 for my project with 2 pt100 sensors. Firstly tried to write to register and read back, no luck, then tried read MUX0 for 0x01, all the same. 


I discovered that DRDY pin always stays low, even if  ic is completely disconnected from spi interface, but with power supply - 3v dvdd 5v avdd.

Does it mean that my ic is defective, or did I miss something?

  • Roman,


    Can you provide the schematic and your connections? I think it is possible that you've missed something.

    If you go through the list of pins, I'd make sure of the state of some of them. First, make sure /RESET is high so that the digital section of the device is not held in a reset state. Make sure the START pin is high. Holding this pin low will keep the device powered down. Lastly check the CLK pin. I'd make sure the clock pin is connected to ground so that the internal oscillator is activated.

    Other than those connections. I'd make sure the SPI lines are active like you think they are. Use an oscilloscope or a logic analyzer to make sure the communication polarities and timing are correct.


    Joseph Wu
  • Thanks for your reply, Joseph. The problem was solved - I simply failed to notice that in order to read register, you need to stop continuous readings, which is default mode.
  • Roman,


    Thanks for letting me know. If you have any other questions, please post back to the forum.


    Joseph Wu
  • Hi, Joseph. I'm stuck with another issue, so could you help me, please?
    As I was able to write&read from registers and convert input voltage, I decided to connect pt500 to ads1247 in simplistic 2wire connection for a start, but couldn't get appropriate output current. Here's the snippet to check current source:

    int main(void)
    HAL_Delay(50); //50ms
    HAL_SPI_Transmit(&hspi1, &SDATAC, 1, 5); //0x16
    HAL_GPIO_WritePin(GPIOC, START_Pin, GPIO_PIN_SET); // START pin high
    HAL_SPI_Transmit(&hspi1, WREG1, 3, 5); //{0x42, 0x00, 0x30} enable & select onboard VREF
    HAL_SPI_Transmit(&hspi1, WREG2, 4, 5); //{0x4a, 0x01, 0x04, 0x0f} IDAC1 500µA, AIN0
    HAL_SPI_TransmitReceive(&hspi1, RREG, rregval, 8, 5); //RREG = {0x2a, 0x01, 0xff, 0xff}

    rregval = {0x00, 0x00, 0x94, 0x0f}

    All I get is ~150µA, with 1000µA selected ~ 300µA, with 1500 ~470µA measured.
    AIN0 - Pt500 - GND
    RESET tied high, CLK, VREFCOM tied low, 2.2µF cap between VREFOUT-VREFCOM. IC soldered on mockup board for tssop. AVDD - 4.7-4.8V DVDD - 2.9V

    Best regards
    Roman
  • Roman,


    It's hard to know what the problem is with so little information.

    First, can you read back all of registers and report them back here? There are plenty of settings on the device that might make affect different measurements. Then, can you provide a basic schematic? It's important to show all connections and components on your board.


    Joseph Wu
  • All other registers are at default values.

    I start with delay 50ms, then send 0x16 to stop continuous readings, pull start high and transmit 0x42, 0x00, 0x30 then 0x4a, 0x01, 0x04, 0x0f. That's all I do.

    I can read those values back. 02h has value of 0x30 and 0Ah contains 0x94 - 9th revision as I may assume, default DRDY/DOUT and 500µA, as expected.

  • Roman,


    First, I think it's worth reading back all of the registers just in case. If there's something wrong, this is the easiest way to rule out a bad configuration. It's also important that's read back just to ensure the SPI communications are correct.

    I would start debugging this by making some measurements. Use a multimeter to make sure that C1 has 2.048V across it. Second make sure that you have your 3V and 5V supplies correctly connected (I think you've done that though, based on your last post). One you establish the IDAC current measure the voltage across the RTD.

    I can't see your digital lines, but make sure those are also connected properly. Make sure START is high.

    Note that the RTD is not inside the common-mode input range. The input will not measure ground in this configuration. Analog inputs must be within AVSS+0.1V to AVDD-0.1V. This is an even tighter range when the device is in gain. This might account for a small loss in voltage measurement, which becomes more pronounced at smaller IDAC currents.

    I would also note that most will use a ratiometric measurement for measuring an RTD, using a precision reference resistor and connecting it to one of the external reference input. This way the output code is proportional to the RTD resistance divided by the reference resistance. If you get a current copy of the datasheet a two-wire RTD is shown in Figure 115. Just make sure that you don't route the internal reference to the external reference pins (for REF0 if you use it).


    Joseph Wu
  • Hello, Joseph.

    I've read all the registers:

    Сurrent is set to 1.5mA this time(0x97). Voltage drop across rtd is 0.25V(550Ω).
    Voltage on VREFOUT as expected 2.04V.
    I've noticed, that after reading all the registers, ic went into sleep mode with START pin high, as I assume, because there was 0V on VREFOUT and 2.04 when I deleted rreg line from code and reran it.

    In my future project I would use ratiometric 3-wire configuration with hardware compensation, this setup is just for experiment.


    Best regards

    Roman

  • Joseph,

    The problem was somehow solved by itself. Voltage drop became pretty accurate after enabling and switching to the second current source, and then switching back. Now everything works just fine. 


    Best regards
    Roman

  • Roman,

    I'm glad you were able to solve your problem. I think it would help to get some sort of logic analyzer to view all of the transaction to the device.

    Joseph Wu

  • Hi, Joseph

    Currently I do not have access to logic analyzer.
    After changing PGA gain I don't have any current anymore, even though I can read all the registers back correctly. Changing back or rerunning without accessing sys0 register doesn't help either. Values are the same as in my previous post, but sys0 = 0x10 or 00.
    Why would ic stop working after reading registers back? It does not respond to WAKEUP command and pulsing START pin low and then high.
    Thank for your patience and advice, but i think I would give up on this. Maybe sometime in future I will inspect it closely with oscilloscope/analyzer.


    Best regards


    Roman

  • Roman,


    I'm sorry you couldn't get this to work. However, I highly recommend getting a logic analyzer. These devices aren't very expensive and it's very important to make sure that the communications coming out of your controller are correct.

    I use a Saleae Logic 8, and I think it was about $200us. I think it has great user interface and it has helped debug many problems that I've seen.


    Joseph Wu