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.

MSP430 weigh scale application note

Other Parts Discussed in Thread: ADS1232REF, ADS1232, TL431

Hello,

 

I currently designinig a MSP430 based weigh scale and, I read the application note provided by Texas, but in this part I can't understand these mathematics used by the autor, 

 

he says: For a 2mv/V weigh scale powered by a 3V battery we have a full - scale of : 3V * 2mV/V = 6mV  for 10Kg, well, the he says:

 

Our weigh will have 10000 counts.

 

Well then I thinked, If we have 10000 counts, and the full load is 10kg, and the resolution is 1g, the voltage for 1g  is : 6mV / 10000 * 1 = 0,6uV, well great, this is the same logic what I thinked.

 

But followingf he says: In order to resolve 1g the LSB voltage should be four times small than 0,6uV, then 0,15uV...

 

If for 1g is equal to 0,6uV and my A/D can measure this voltage for 1 count,  why the autor divided it by 4? 

this is link for application note, the page is 2.

http://focus.ti.com/lit/an/slaa220/slaa220.pdf

 

Thanks for any help.

 

Felipe

 

 

  • Hi Felipe,

    Welcome to the E2E forums. This question really belongs in the MSP430 forum, as this app note originated from that group, but we will see if we can get someone from their group to take a look at it.

  • Felipe,

    With load cells in general, you need to design for noise free counts.  I don't know the specifics with the converter used, but generally you need enough resolution to overcome the noise.

    We also have some weigh scale specific parts that are part of a reference design for the ADS123X family of parts.  You might take a look at the ADS1232REF.  This also uses a MSP430, but is not a single chip solution. 

    http://focus.ti.com/docs/toolsw/folders/print/ads1232ref.html

    Best regards,

    Bob B

  • Thanks for response,well, i pretend to use this ADS1232 and my weigh scale use about 10,000 same the application note, I read ADS1232 datasheet and find about noise free counts, to minimize problems about noise (we working at low voltage signals) require to "spend" some bits about total resolution of ADC then in this case in app note the autor did it and used 4 bits  due 1g give about 0.6uV in LSB in case of small weigh measure problems with noise will appear, am I right?

     

    Well, now I can proceed with my design and the firmware write.

     

    I`ll post here the results, thanks a lot for help.

     

    Best regards,

     

    Felipe.

  • Felipe,

    You are on the right track except it is 2 bits not 4, as it was divide by four.

    Best regards,

    Bob B

  • Ops I pressed the wrong key, is 2 bits :D

     

    Well following track, these are the results that I calculated:

     

    Npoints = 10.000 counts.

    FSRcell = AVDD*2mV/V ->  (my AVDD is 3V) -> 3*2mV/V = 6mV for a 10Kg load.

    Then for measure 1 g the load cell outputs 6mV / 10000g  = 0.6 uV/g  right?

     

    My A/D converter is ADS1232, following the table 1 in datasheet the noise free bits quantity is  20bits + 1bit via software averaging

    The Vref value is 2.50V.

     

    A/D VLSB = Vref/2 / 2^(24 -1) -> 1.25 / 2^23 = 0.149uV per count. (I using PGA gain = 1).

    Now, I have to count 4 times for 1g because 0.149 is aproximately 0.6 / 4 right?

    In this case the RAW result (disconsidering offset, and calibration for a while)  will be = ADCRESULT / 4.

    If I mistake some detail can you tell me?

     

    Felipe.

     

     

     

  • Felipe,

    In the example you gave you are correct if you mean RAW is the result in grams.  The problem here is still noise and you will not be able to achieve the noise free counts you need to have for 1 gram resolution.

    When using the ADS1232, you want to make use of using the excitation supply as your reference so that the measurement is ratio-metric.  This will help reduce the overall noise and decrease drift issues.

    The second thing is you want to take advantage of using the PGA within the ADS1232 to maximize the effectiveness of the device.  So in this case you have Vref/2 / PGA /2^23 which results in the LSB of 3/2/128/2^23 or 1nV for a PGA gain of 128.  So, even though you lose more bits to noise, you make better use of the full-scale range and resolution.  In your example you get noise free counts of 2^21*(0.006/2.5) which is about 5000 noise free counts at LSB of 0.149uV.  Using the PGA you get about 177,000 noise free counts.

    Best regards,

    Bob B

  • Yes, my RAW result will be in grams.

     

    In ratiometric measure, I read which the load cell excitation voltage must supply  the A/D converter voltage reference, 

     

    My application I use a TL431 to generate a 2.5V, but it is supplied by the same analog supply of load cell (my analog supply and digital supply are separated, and the ground planes too), now am I using the ratiometric mesure right?

     

    About the PGA I`ll test with the gain value you suggested, I`ll work with 1nV voltage per count  then my result will be 0.6uV/ 1nV = 600, the  my RAW  is = ADCRESULT / 600.

    Right?

     

    Thanks for the help.

     

    Best regards.

    Felipe. 

  • Ok Bob, I understood now, see:

     

    I using the following parameters:

    PGA gain = 128;

    Vref = 2.5V

     

    So my LSB voltage will be : 2.5/2/128/2^23 = 1.16nV 

    Using a PGA with a 128 gain magnitude, I`ll have 17.6 noise free bits with a analog supply 3V and 10SPS, so my noise free counts will be:

     

    Noise-Free-Counts = 2^(17.6 + 1[averaging filter]) * (6mV/(2.5/128))  = 122061 noise free counts. That is sufficient to a 1 gram resolution right?

     

    Then to calculate weigh in grams my result will be:  

    1.16nV per count  - 0.6uV (per gram for a 10Kg full load cell) - x counts 

     

    using a simple three  rule:

    1.16nV - 1

    0.6uV - x  .'. x = 517 counts (how 0.6 uV is a 1 gram) then 517 counts is a 1 gram right?

     

    using the two point calculation mechanism my weigh will be:

     

    Weigh (g) =  (ADCRESULT/ 517) - CalMin / CalMax - CalMin * 10000.

     

    Well, this track is correct?

     

    Thanks for help.

     

    Best regards,

     

    Felipe. 

  • Felipe,

    I think you are close, but maybe forgot some groupings.  You also need to use a calibrated weight  so that you can find the slope of your system.  From the zero point or no weight (CalMin), measure that code.  Then measure the calibrated weight (CalMax.)  The slope is gram(s) / code which is:

    Slope = Calibrated Weight / (CalMax-CalMin)

    The measurement in grams will then be:

    Weight (g) = Slope * (ADCRESULT - CalMin)

    If you use a 10Kg calibrated weight,

    Weight (g) = (10000 / (CalMax - CalMin) ) * (ADCRESULT - CalMin)

    Using the above calculations leave out any math error related to reference calculations and strictly use measurements based on calibrated weight.

    One other thing to keep in mind about your system is the overall noise.  You have made your earlier calculations on the best case scenario of the converter.  Your system is likely to deliver much fewer noise free bits.  Board layout and supply noise can be large contributors to system noise.

    Best regards,

    Bob B

  • Bob, 

     

    Thank you very much,  now I can see how to write firmware and the hardware tips to have a weigh scale with a minimal noise,

     

    I`ll take care with board lay - out, and my power supply is stable and have a good ripple rejection.

     

    I decoupled digital  and analog VDD and Ground planes.

     

    Now I can proceed the design with more success chance :D

     

    I`ll feedback the results later.

     

    Best regards,

     

    Felipe.

**Attention** This is a public forum