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.

LMP91000EVM: ADC161S626

Part Number: LMP91000EVM
Other Parts Discussed in Thread: LMP91000, ADC161S626

Tool/software:

I'm trying to build heavy metal content on liquid with 3 leads electrode that the final result will be Cyclic Voltammetry and the concentration of the heavy metal (ppb), using LMP91000EVM and raspberry pi 3b. I have a problem on operating the ADC on LMP91000EVM, the current and the voltage output is always constant in some value (not zero). Is there any advice to solve that?

I have check the Vout LMP that already connected to raspi using oscilloscope and this is the result:

Thank you

  • Hi Anniza,

    What kind of troubleshooting have you tried so far? How are you powering the EVM, and how are you configuring the LMP91000? We no longer offer the SPIO-4 USB controller that is meant to be paired with the LMP91000EVM, so you will have to carefully read the schematic and make appropriate connections.

    thanks,

    ren

  • Dear Ren,

    To troubleshoot the ADC, I actually didn't do much, what I did was check whether the CS was low or not. When I use Arduino and just to check the ADC161S626 the output produced is constant. Here the pin configuration, code, and results of checking the ADC on the LMP91000EVM with Arduino Mega and potentiometer

    ADC161S626 Arduino Mega
    VDD 3,3V
    GND GND
    IN+ (vOUT) Analog signal from potentiometer
    IN- GND
    CD pin 53
    SCLK pin 52
    DOUT pin 50
    REF 3,3V

    #include <SPI.h>
    
    const int chipSelectPin = 53;
    
    void setup() {
      // Initialize serial communication
      Serial.begin(9600);
    
      // Set up chip select pin
      pinMode(chipSelectPin, OUTPUT);
      digitalWrite(chipSelectPin, HIGH);
    
      // Initialize SPI
      SPI.begin();
      SPI.setClockDivider(SPI_CLOCK_DIV16); // Set clock speed (depends on your configuration)
      SPI.setDataMode(SPI_MODE0);           // SPI mode 0
      SPI.setBitOrder(MSBFIRST);            // MSB first
    }
    
    void loop() {
      uint16_t adcValue = readADC();
      double voltage = adcValue * (3.3 / 65535.0); // Assuming a 3.3V reference
      Serial.println(voltage, 6); // Print voltage with 6 decimal places
      delay(1000); // Delay for readability
    }
    
    uint16_t readADC() {
      digitalWrite(chipSelectPin, LOW);
    
      // Read 16-bit data
      uint8_t highByte = SPI.transfer(0x00);
      uint8_t lowByte = SPI.transfer(0x00);
    
      digitalWrite(chipSelectPin, HIGH);
    
      // Combine high and low byte
      return (highByte << 8) | lowByte;
    }
    

    What should i do to make the ADC on the LMP91000EVM work?

    Kind regards,

    Anniza

  • Anniza,

    The LMP91000 has an I2C interface, and you are not making any I2C transactions in your Arduino code. You will have to configure the LMP91000 using its I2C interface before you can make measurements with it. Please refer to the LMP91000 datasheet.

    thanks,

    ren

  • Dear Ren,

    I mean the code above is only intended to test the ADC161S626, should I also need I2C to test the ADC?

    Kind regards,

    Anniza

  • Anniza,

    It is the output from LMP91000 that drives the input to the ADC. You will have to configure the LMP91000 to produce an output other than 0V.

    thanks,

    ren

  • Dear Ren,

    I have already activated the LMP91000 by adding I2C communication, but the results displayed are still constant. What else do I need to do to enable the ADC on the LMP91000EVM so I can use it with both Arduino and Raspberry Pi?

    Kind regards,

    Anniza

  • Hi Anniza,

    What settings are you using in the TIACN and MODECN registers? This will impact the LMP91000's output.

    thanks,

    ren