LTC2400 SPI interface


Closed Thread
Results 1 to 27 of 27

Hybrid View

  1. #1
    Join Date
    May 2010
    Location
    SINGAPORE
    Posts
    14


    Did you find this post helpful? Yes | No

    Thumbs up hai brother

    Quote Originally Posted by HenrikOlsson View Post
    Hello,
    You still haven't said what kind of resolution you actually NEED, just that you wanted to use 24bits becaue that is what you had. I also asked you earlier if you had the 4-20mA signal converted to 0-5 or 1-5V. With 1-5V it means that you are basically "wasting" 20% of the ADC range.

    Now, with a 1-5V signal I'd configure the ADC to use the external Vref inputs instead of the VDD and VSS. That way, if you feed a stable 1V signal into Vref- and a stable 5V into Vref+ you'll use all the available resolution and you'll get 0 for 1V and 1023 for 5V. That way you get a basic resolution of 0.1bar as I outlined earlier and can increase that by oversampling.

    "If you try the aproach of 1024 samples remember that you need to add them into a 32bit variable as the result may not fit in a 16bit variable".

    /Henrik.
    hai HENRIK,

    THANKS FOR YOUR SUPPORT and sorry for delayed reply.am using "long variable" so the 32bit variable fits in it.how to feed 1v? is that any voltage regulator available for 1v.what about the -ve side.

    as you said i used the internal adc and the oversampling method and got stable reading,but for now when i seperately send the readings to the lcd and hyperterminal it works but when i used both it doesn't work .i dont know what is the problem can you help me please.

    THANKS AND REGARDS,
    PUGAL
    IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default

    how to feed 1v? is that any voltage regulator available for 1v.what about the -ve side.
    Well, anyway you like really. The simplest way is a voltage divider but then the stability and accuracy of you reading depends on the stability of the powersupply rail, which it does when you're using the Vdd/Vss for Vref anyway.

    The voltage supplied to Vref- is what will equal a returned value of 0 from the ADC, the voltage supplied to VRef+ is what will equal a returned value of 1023 from the ADC. So by feeding 1V to Vref- and 5V to Vref+ the ADC's 10 bits gets divided across 1-5V instead of 0-5V as is the case when you use Vss/Vdd as reference. (As long as you use 5V supply of course). Read up on the ADC section of the datasheet for details about the ADC.

    I can't help with your problem as I have absolutely no idea how you've coded it.

    /Henrik.

  3. #3
    Join Date
    May 2010
    Location
    SINGAPORE
    Posts
    14


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by HenrikOlsson View Post
    Well, anyway you like really. The simplest way is a voltage divider but then the stability and accuracy of you reading depends on the stability of the powersupply rail, which it does when you're using the Vdd/Vss for Vref anyway.

    The voltage supplied to Vref- is what will equal a returned value of 0 from the ADC, the voltage supplied to VRef+ is what will equal a returned value of 1023 from the ADC. So by feeding 1V to Vref- and 5V to Vref+ the ADC's 10 bits gets divided across 1-5V instead of 0-5V as is the case when you use Vss/Vdd as reference. (As long as you use 5V supply of course). Read up on the ADC section of the datasheet for details about the ADC.

    I can't help with your problem as I have absolutely no idea how you've coded it.

    /Henrik.

    As you said i looked at the pins and i cant find any -vref.

    "The positive voltage reference can be either VDD or an external voltage source. The negative voltage reference is always connected to the ground reference" this is what i found on the datasheet.

    THANKS and REGARDS,
    PUGAL
    IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default

    Hi,
    If that what it says then that's how it is. I didn't check the datasheet and I've never personally used a PIC where only the +Vref is available. Now I know they exist as well, thank you!

    Then it gets trickier, one way is to use some analog circuitry to first subtracst 1V from the signal and then amplify it with a gain 1.25, that will give you 0-5V output. An easier way is probably to get a PIC which has it's -Vref available to the outside.

    There are IC's available specifically for converting current loops to voltage, here's a MAXIM app note showing one.

    But again, what kind of resolution do you really need? Do you have a datasheet for the transducer you're using?

    /Henrik.

  5. #5
    Join Date
    May 2010
    Location
    SINGAPORE
    Posts
    14


    Did you find this post helpful? Yes | No

    Thumbs up hai brother

    Quote Originally Posted by HenrikOlsson View Post
    Hi,
    If that what it says then that's how it is. I didn't check the datasheet and I've never personally used a PIC where only the +Vref is available. Now I know they exist as well, thank you!

    Then it gets trickier, one way is to use some analog circuitry to first subtracst 1V from the signal and then amplify it with a gain 1.25, that will give you 0-5V output. An easier way is probably to get a PIC which has it's -Vref available to the outside.

    There are IC's available specifically for converting current loops to voltage, here's a MAXIM app note showing one.

    But again, what kind of resolution do you really need? Do you have a datasheet for the transducer you're using?

    /Henrik.

    hai HENRIK,

    THANKS FOR YOUR KIND HELP.For now i don't have the datasheet,but give some time ill find the datasheet and forward to you.Actually i want to read the 4-20 mA from a transduser with the accuracy of 0.1% and the resolution is 0.0000,the transduser has the accuracy of 0.05% and the range is 0-100,000psi this the maximum that we have.so if i manage to do the project,then i can use the same for all the other transduser with better accuracy.some are 0-5v and few are 0-10v which will be easy to do as you said.

    THANKS and REGARDS,
    PUGAL.
    IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.

  6. #6
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default

    Hi,
    I'm not following you on the resolution. You say the transducer measures 0-100000 PSI with a resolution of 0.0001 PSI? That's 1.000.000.000 "counts" across the 16mA output swing - WOW!

    I mean, even at 1 PSI "per count" the difference in output current is 0.016/100000=0.16uA. Push that thru your 250ohm resistor and you get a voltage change of 40uV per PSI - that's not a lot.

    If you mean 100PSI then it gets a little more managable as 1PSI now eqauls a change in current of 160uA and a voltage change across the resistor of 40mV.

    /Henrik.

  7. #7
    Join Date
    May 2010
    Location
    SINGAPORE
    Posts
    14


    Did you find this post helpful? Yes | No

    Thumbs up Thanks for the support

    Quote Originally Posted by HenrikOlsson View Post
    Hi,
    I'm not following you on the resolution. You say the transducer measures 0-100000 PSI with a resolution of 0.0001 PSI? That's 1.000.000.000 "counts" across the 16mA output swing - WOW!

    I mean, even at 1 PSI "per count" the difference in output current is 0.016/100000=0.16uA. Push that thru your 250ohm resistor and you get a voltage change of 40uV per PSI - that's not a lot.

    If you mean 100PSI then it gets a little more managable as 1PSI now eqauls a change in current of 160uA and a voltage change across the resistor of 40mV.

    /Henrik.


    THANKS FOR YOUR REPLY


    Sorry, actually the circuit must support wide ranges of transduser so that for low range transduers like 0~100 mbar and mid range transdusers like 0~500 bar it must have 0.0000 resolution and for high pressure transdusers as i said before like 0~100,000 it must have the accuracy of 0.1% and no need to worry about the resolution. so the circuit must have the capability to measure as much as possible.but for now i used the over sampling method and i got the accuracy of 0.1% for 0~100,000 psi on 10 bit internal adc which is my first stepping stone with the valuable help from MR.Henrik and thanks a lot for that.

    THANKS and REGARDS,
    PUGAL.
    IF YOU BORN POOR ITS NOT BECAUSE OF YOU BUT IF YOU DIE POOR ITS BECAUSE OF YOU.

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