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.

wheigh-scale system with ads1232

Other Parts Discussed in Thread: ADS1232REF, ADS1232

hello,
I have a doubt, I'm reading the values ​​of the ad, but I'm getting wrong date. The correct weight appears, but with it come some variations. I'm using a pic 18F452 with a crystal of 4 MHz, for the ad, I used the same circuit ads1232ref. In an initial program, managed to make the correct reading, but after putting more functions, these errors are appearing. To make the correct reading'll have to calibrate all the time? Could be eliminating these variations weight?

  • Hi RKI,

    If you were getting good data and then by adding more functions to your program you are getting varying data it appears that you are not capturing the data fast enough before the next update occurs.  For example, if you have a long processing loop and part of the loop is to read out the data, some of the other processing functions may delay the reading of the result from the ADS1232.  If the data is being read out of the device at the same time as a conversion update appears, the data will be corrupted.

    The best way to process the data is to read the results as soon as they become available.  This can be done using an interrupt based system.  This is the method used by the ADS1232REF.  The ADS1232REF uses a MSP430 and operates at 8MHz.  Due to the complexity of the operating loop even at 8MHz, the system uses freeRTOS (real time operating system) to maintain proper timing.

    Best regards,

    Bob B

  • thanks Bob,

    I am using spi communication to get the data. With it, the pic generates a clock, which I'm using in AD. Do you think better to use external clock for AD?

  • RKI,

    Please send me your schematic so that I can follow what you are talking about.  There are two clocks used by the ADS1232, the master clock and the communications SCLK for SPI.  The ADS1232 has an internal oscillator that can generate the master clock and it is not necessary to drive it with a clock from the micro.  If you tie pin 3 (CLKIN) pin to DGND, then the ADS1232 will use the internal oscillator for the master clock.  The master clock must be active for the ADS1232 to operate.  It will not convert without an active master clock.

    SCLK must come from the micro as part of the SPI communications.

    Best regards,

    Bob B

  • The schematic is the same ads1232ref. I'm putting the pin in 3 DGND. It's that I'm still in doubt. I'm having trouble with the interruption. Could you tell me which part of the program is being made ads1232Ref interruption for reading data?

  • Hi RKI,

    The reason I ask for the schematic is that it is not the same as the ADS1232REF when you use a different microcontroller and firmware.  It would be more helpful if I knew exactly how you have connected your system together.

    If you power up the ADS1232, and if the CLKIN pin is connected to DGND, then assuming the proper analog and digital supplies are connected, and all digital pins are properly connected (for example PDWN is pulled high to DVDD) then you should see DRDY toggling (or pulsing) at the chosen data rate.  So, connect an oscilloscope up to DRDY/DOUT and see if it is toggling at the correct data rate.  If you see this pin (24) pulsing, you should be reading the data after the high to low transition.  If this is connected to an interrupt pin (which is in addition to the MISO pin of the micro so it is connected to two pins), then the interrupt should trigger on the positive to negative edge.  Disable the interrupt while you are reading the data, then after the data is read re-enable the interrupt.

    Hope that helps,

    Bob B

  • Hi Bob,
    I am sending my 5734.schematic.pdf. outputs of the board are connected on a pic 18F452 with a crystal 4Mhz. Communication is SPI SCLK is receiving clock Fosc / 4
    G0 and G1 = 5V.
    RST and EXC = 5V
    TEMP = 0
    SPEED = 0
    PDWN = 1
    The problem still persists. times when the back hand on EXC, it works better, but still makes some erroneous readings

  • Hi RKI,

    Let's take one thing at a time.  First, let's take the load cell out of the conversation initially.  If you monitor pin 24 of the ADS1232 does it toggle at the specified data rate (without trying to read any data)?   If the ADC is converting correctly, make sure that your software is reading the data at every conversion completion.  If it does, make sure that the load cell is connected correctly.  I would avoid using the analog switch and hard wire the excitation (EXC-) connection directly to AGND to rule out the possibility that it is causing a problem.

    Best regards,

    Bob B

  • Thank you Bob,
    I had to review the whole circuit again. were failures at some points in the solder oxidized. is functioning normally