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.

ADS1015: fpga using two ads1015 in the same i2c bus

Part Number: ADS1015

I am trying to use two ads1015 each one is reading only one voltage in diferential mode, I am working with an FPGA so I created a state machine that configures and then read the ADC constantly, I had no problems with channel 48h but when I read channel 49h with the same program it doesn´t work at all, the FPGA shows a wrong value as a result of reading that channel, and it seems to be diferent for each device I have tried, most of the times negative value that is not responding to change in the voltage of the sensor attached 

  • Hello,


    To use address 1001 001 please make sure that pin1, ADDR, of the second device is connected to VDD.
    The first device, seems to be correctly have pin1 connected to GND.   Please make sure this is correct

    Page 31 on the datasheet demonstartes a quickstart guide as to how to communicate with the device and write to the deseried registers. note that the first 7-bit sent from the master to the slave is the device address, follwed by the 8 being a read/write indicator. (high/low respectively) 
     
    Regards,
    Cynthia

  • Hello Cynthia, thanks for the reply, My name is Andres (I still don´t know how to change it)

    I am aware of the connection of address pin, in fact, I conected the addr pin to gnd in one device and to vdd in the other, and I expected it would work just fine, but only the ADC in address 48h worked, I made the circuit of this schematic, V50 is 5 V power supply and V33 is 3.3 V power supply the part with the MOSFET is a bidirectional bus interface for devices that work at 5V and 3.3V (this was made to somehow protect my FPGA), and the picture is the third version of the complete circuit.

    I have tested that circuit with an arduino and worked fine, and after that I tested the same circuit with an nvidia jetson that a friend of mine is working on, it was programed with C (he used a library found on internet) and he could read every channel on both ADCs.

    After the picture, I send some screenshots of the SCL, SDA and Output (Reading) of the comunication between my FPGA and ADS1015.

    1. configuration of ADC 48h 

    2. selecting conversion register of ADC 48h and its first conversion.

    3. the next conversion, where reading value changed, the value 40 is equivalent to 40 mV at the input

      

  • This is the same state machine seting up and trying to read from the ADS1015 with address 49h.

    If you find something that might be wrong please let me know.

     

  • Hello Andres

    I would suggest comparing your friends code to your own, focusing on the 3 waveforms you have provided.
    One way to help easivly do this, is visually. Compare the scope shots of your code waveshapes to your friend's

    Looking at the first waveshape you provided, you are configuring the second device the same as the first, to use AIN1 as AINP; and AIN3 and AINN. The issue is that the second device is not connected the same as the first, it does not have an input connected to AIN1.
    Please check this.

    Regards, Cynthia
  • Cynthia, Thank you very much, that was the problem and after a long time trying to read 2 adc's I have never noticed that I was reading a nc pin on the adc.