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.

Problem with ADS1230

Other Parts Discussed in Thread: ADS1230

Hai Frnds,

I am new to ADS1230 ADC convertor. i had designed my hardware and i had developed my code also.. when i tried to test the code with the hardware i found that the data ready signal is not received from the convertor. i found it through scope.. 

the DRDY/DOUT pin remains HIGH throughout till i switch off the supply. 

kindly help me in this regard.. hope u reply me soon..

Thanks in advance frnds..

  • Hi Tamilarasan,

    Make sure both the AVDD and DVDD as well as the grounds are properly connected with the proper voltage and that both AGND and DGND are connected together.  Make sure that the PDWN pin is in logic high state.  Also make sure that the SCLK is in logic low state when idle.  If SCLK is high the part will go to standby mode. 

    Also the ADS1230 requires a clock to operate.  The easiest thing to do is make sure the CLKIN is connected to DGND to use the internal oscillator.  No input pins should be open or floating.

    Best regards,

    Bob B

  • Hi sir,
    thank u for ur reply. i will check for the proper connection.
    i gave the following connection. please check it sir.

    AVDD,DVDD,REFP is shorted and connected to +5v
    AGNS,DGND,REFN is shorted and connected to gnd(0v)
    GAIN, CLKIN, SPEED is shorted and connected to GND(0v)
    connected 104 capacitor across CAP pins,
    connected 104 capacitor across AVDD and AGND, DVDD and DGND
    PWDN pin is in logic high state.
    SCLK is in logic LOW

    now after providing the above connection i switch on the power supply and monitor the DRDY/DOUT pin in the scope. i observed the pin is in LOGIC HIGH only and it does not getting low.

    am i right.. will the pin get low after the ADCconversion.
  • Hi Tamilarasan,

    Your pin connections appear to be ok, and you should see the DOUT/DRDY going low.  It is possible that the POR for the ADS1230 did not properly take place.  Mke sure you follow the section on page 19 of the datasheet titled Power-Up Sequence that is at the top of the page.  After the supplies have been fully established there must be 10us or more delay before PDWN goes high.  This is shown in Figure 30. Figure 31 shows an optional method for ensuring the minimum delay if the PDWN pin is not connected to a micro.

    If the PDWN pin is connected to a micro, you may also want to include a pull-down resistor on the PDWN pin as most micros will have the GPIO pins as either tri-state or as inputs on initial power up until configured. The pull-down will make sure that the PDWN is logic low on power up. This resistor can be in the range of 10k to 100k.

    Best regards,
    Bob B

  • hi sir,
    now my ADC is working sir, there is some dry solder problem with the PCB.
    i read the 20 bit digital value from the ADS1230 through PIC controller and i displayed the raw value in 7segment display via MAX7219. it is also displayed. but if i add weight to the loadcell the value varies slowly and also not in a linear manner.. it jumps in values as 189432, 190542, 198523, 235845.... what may be the reason for this slow response.

    also i face problem in ADC value conversion to the weight. the loadcell details are as follows.

    load cell range: 3kg
    rated output : 2mv/V
    rated supply : 9 to 12 V

    but i am using 5v supply. is it right. i am getting 10.9mV as the no load differential voltage. is there problem with input supply voltage or with the load cell..?

    suggest me how to convert the adc count value to voltage and from voltage to weight.

    With Regards
    Tamilarasan V
  • Hi Tamilarasan,

    Bob is currently out of office, but I try to help out for now.

    Do you know if your codes settle to a final value at some point?
    Also what kind of input filter/capacitors do you use on the ADS1230 inputs?
    Does the settling improve if you remove all input capacitors?

    There is probably a reason why the load cell is specified for a specific voltage range. I guess the load cell will not meet its specified performance when operating at a lower voltage. But it should work in principle.

    With no load the output of an ideal load cell should be 0V. However the load cell itself and also the ADS1230 will have a certain offset. That is why you will never measure exactly 0V at zero load. You will have to implement an offset calibration first to compensate for the offset.
    An offset of 10.9mV sounds kind of large to me though.

    Converting ADC count to voltage:
    The ADS1230 outputs data in twos-complement. So you first have to convert this correctly.
    The LSB size of the ADS1230 is 1LSB = (VREF/Gain) / 2^20
    I assume you are using a Gain=128 so your LSB size will be 1LSB = (5V/128) / 2^20 = 37.25nV
    The input voltage can then be calculated as VIN = Code x LSB size

    Converting voltage to weight (or code to weight):
    At 3kg the load cell will produce a full scale differential output voltage of 2mV/V x 5V = 10mV. Means you have a sensitivity of 3.33 mV/kg.

    Your code to weight transfer function should then read like this:
    Weight = (Code x LSB size) / 3.33mV/kg

    Regards,
  • Hi Tamilarasan,

    I thought about it some more. As you are probably implementing a ratiometric measurement (5V is used to excite the bridge as well as for the ADS1230 reference) you may want to reflect that in your calculation as well.

    As you can see from the following derivation, the weight can be calculated now without having to know the exact VREF voltage:
    Weight = (Code x LSB size) / 3.33mV/kg = [Code x (VREF/128)/2^20] / (VREFx2mV/V / 3kg) = Code / [(2mV/V / 3kg) x 128 x 2^20]

    Regards,
  • hi sir,

    i am working on ur suggestion. let me reply about it later. now i need a help on speed of the ADC convertion.

    if i test the ADS1230 alone with a scope. i am getting the data ready pulse at 100ms exactly. but when i connect it with the controller i dont get the dataready signal in 100ms interval. it take time interval of 770ms. what maybe the reason. i am using 2uS for each clock pulse. i am doing it using interrupt. so the timing cannot be missed. but this is the timing sequence i observed from scope. 

    also please tell me how to convert the raw data from ADS1230 i.e., 2's complement data into ordinary decimal value. only the signed bit must be scaned for conversion or the whole data to be involved in some conversion formula..? kindly help me in this regard.

  • hi sir,
    i have one additional doubt. if i calibrate the ADS1230 by providing 26 clk pulse after data ready. what is the next adc count i will get after the calibration cycle.
  • Hi Tamilarasan,

    did you make sure you follow the timing for the /PWDN pin as Bob mentioned above (please see p.19 in the datasheet)?
    Do you trigger on the falling edge of /DRDY or do you just poll if /DRDY is low?
    Do you keep SCLK low after data retrieval?

    The MSB of a two's complement data word will tell you if the value is positive or negative. Data with an MSB of 1 will indicate negative values. I believe Bob can send you a code example that shows how to properly convert the data.

    After a calibration the next /DRDY falling edge indicates that new (fully settled) data are available for data retrieval.

    Regards,
  • hi joachim Wurker.

    i am waiting for the example code from your side. kindly send the code as soon as possible. 

    i have a doubt on the data retrived from the ADS1230. Is the 2's complement data is used to check whether the data is positive or negative? 

    can i check the MSB of the data and decide the data as positive or negative and use the rest bits to find the value of the ADC count. now i am getting 524287 as the positive max value. am i getting a right value.?

  • Hi Tamilarasan,

    we will send you some example code tomorrow.

    Your are correct, a positive full-scale value would be 524287 (=7FFFFh).
    A negative full-scale value would read 80000h as shown in the datasheet in table 4.

    Regards,

  • Hi Tamilarasan,

    The output of the ADS1230 is binary two's complement.  In many processors the integer value is also binary two's complement, however this is not a C requirement.  I have yet to see a common processor where the method used is not binary two's complement.  Let's assume that your hardware/compiler uses two's complement.  In this case both the ADS1230 and the processor are in the same format.  You may have a question as to why the firmware is reporting a positive number instead of a negative number.  The reason is the most significant bit of the data is the sign bit.  If the msb is 1, the value is negative and if it is 0 the number is positive.  When a 20-bit value is read from the ADS1230 and stored to a 32-bit value number (signed long), the msb is 0 because the data lengths are not the same.

    You can correct this sign problem by sign extension.  This is accomplished by evaluating bit 20 of the data. If bit 20 is 1, then you can add (or OR) a value to extend the sign correctly.  The following is 1 of many different methods:

    long ADS1230_Data;    // ADS1230_Data is the conversion result read from the ADS1230
    
    if(ADS1230_Data & 0x80000) ADS1230_Data = ADS1230_Data | 0xfff00000;    // if the MSB of the conversion result is 1, then sign-extend the result

    The above method can only work with integer types.  You cannot use bit evaluation for floats.

    Best regards,

    Bob B

  • hi Joachim Würker,
    i am eagerly waiting for the example code sir. kindly send me the same as soon as possible.
  • Hi Tamilarasan,

    I initially thought it is more 'complicated' to convert twos-complements, but as Bob explained above, all you need to do is to 'sign-extend' your data properly (assuming you and your MCU use the correct data format). Bob showed this in the code above. So this would be the 'example code'.

    Regards,