Still Struggling with the formula!


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322

    Default Still Struggling with the formula!

    Hi All,
    I am working with an ASC758 current detector and an LTC1298 A/D converter. The ASC758 has a manufacturers "offset" so that at 0.0 amps the A/D will put out a digital reading of 483 representing this offset. So it seems to me that you would create a formula that looks like amps= ((reading-483) ** 8000) >>4. The highest output reading would be 2868. However at low readings such as 503 the results are still showing up as 0.0! Any ideas?

    Thanks, Ed

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default Re: Still Struggling with the formula!

    Your formula does this:

    503-483=20
    20*8000/65536=2
    2>>4=0

    It works OK.

    I think the formula is wrong.

    Your ADC has 12bit resolution, so its output is 0-4095.

    But your sensor has an offset of half the power supply since it measures AC and DC currents.

    Question: Are measuring ONLY DC currents? If yes then do these:

    Scale down the ADC: adc=adc>>3 'From 0-4095 to 0-511

    Then subtract the offset that is in the middle our new scale: adc=adc-256

    Now it should be OK.

    Ioannis

  3. #3
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Still Struggling with the formula!

    Hi Ioannis!
    Thank you for the suggestion and I still seem to be missing something fundamental. At 0.0 amp (no load) the A/D gives a digital reading of 485 and after the >>3 this becomes the number 60. Therefore 60 I think becomes the offset value. At .461 amps the A/D gives 506 and after the >>3 this becomes 63. Last at .869 amps the A/D gives 516 and after the >>3 you now have 64! Just as an FYI, the spec sheet shows the offset to be 0.5 volts so the number 60 makes sense.

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Still Struggling with the formula!

    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795


    Did you find this post helpful? Yes | No

    Default Re: Still Struggling with the formula!

    On page 4 of the data sheet in Quiescent Output Voltage it clearly indicates that the output voltage will be the half of the power supply. So if the Vcc is 5 volts then the output will stay at 2.5 volts.

    Ioannis

  6. #6
    Join Date
    Mar 2011
    Location
    Los Angeles, California
    Posts
    322


    Did you find this post helpful? Yes | No

    Default Re: Still Struggling with the formula!

    Thanks Ioannis and Dave!
    Ioannis you are correct and the actual device is the 50U. I am not sure we are looking at the same spec sheet and if so then on page 6 it shows that with this sensor you get 60mv/A. Since the device is a 50 amp max. device then 60 x 50 would give 3000 or 3.0 volts. Subtract the 0.5 volt offset and then you get the 2.5 volts at 50 amps. It could very well be that there is an error in my ampmeter's scale as this is what I have been using to compare to the program results.

    Best, Ed

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts