Temp readings and voltage input


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1

    Default Temp readings and voltage input

    Hi all,

    i'm my 16F88 temp monitor project i have a LM35 sensor with no vref.
    The input voltage for the workbench was always 5v and everything is working perfectly.

    After moving for the pcb i have found an issue that puzzled me.

    For the PCB aplication i have it connected ( via 7805 ) to a 4.8V NiCd pack. This pack when fully loaded is 5.3V and after some use it drops to +-4.5V.

    This is causing some bad temperature readings when the pack drops bellow 5v.

    The code i used for temperature is like this :

    temp= (in */5000)>>2

    I have no vref because i can live with the 0.5ºC stepping ( 10Bit resolution ) and this code allows me to have an output like XXX,X.

    My question is:

    Is there a better code to be flexible with the input voltage and still have accurate readings ?

    Thanks

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking

    The answer is simple ...

    Use a Voltage Ref !!! a TL431 i.e is cheap, TO92 shaped, and easy to trim ...

    OR use a Temp to Digital ( DS18B20 i.e.) or temp to PWM ( SMT 160-30 i.e ) sensor ...

    No miracle to wait for !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Use TL431 with care

    Hi,

    I personally prefer voltage references from the Microchip Analogue familiy. MCP1541 is which I use most. While using TL431 cap values are important and improper design causes noise which would set things up. Find the attachment and open in Microsoft Excel. It is a TL431 calculator. Make sure macros are turned on from your Excel security settings.
    Attached Files Attached Files
    Regards

    Sougata

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Hi, Sougata

    Thanks for the XLS sheet ...

    TL431 is to consider like a Zener diode ... noise involved !!!

    I always use a solid aluminium 10µF cap ( Alusol C 122 ) or tantalum cap ...

    With a good 4.5 digits multimeter for trimming - and quality components - ... performance is to compare to MAX or AD best voltage refs ...

    Not so bad, for such an oldie !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5


    Did you find this post helpful? Yes | No

    Default

    Thanks Acetronics,sougata,

    The idea for the digital sensor has crossed my mind. Actually i would prefer but i have the problem that the DS18B20 does not reach 150C ( that i what ) and the SMT 160-30 is not available here

    I guess i will have to use the Vref. and have 2,5V there.

    I never used the vref on this chip. Correct me if i'm wrong here:

    In the data sheet it's marked Ra2 and RA3 as Vref- and Vref+.

    I may use only the Vref+ pin and set the ADCON1 REGISTER (ADDRESS 9Fh) like :

    ADCON1=%10100000

    And i have to change the code to:

    temp= (in */2500)>>2

    Is this right ?

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking The goal, always look for the goal ....

    Ha,ha,ha ...

    I think VENOM might tell you something !!!

    Now, this would be much easier to use a NTC Thermistor or a KTY 81-1xx NTC sensor.

    Just use a Lookup table with a linear regression between points ... and HOP, in the pocket ( as told the Kangaroo ... )

    ...

    BTW ... choose your "gas" carefully ... lots of degrees to win here !!!

    see :

    http://www.carburant-modelisme.com/

    and

    http://www.meccamo.com/fr/indexFR.htm

    for really serious blenders ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Acetronics,

    you lost me there...

    .

Similar Threads

  1. unstable ADCIN readings when using DT ELAPSED.PBP
    By peter_wiersig in forum General
    Replies: 8
    Last Post: - 27th February 2010, 19:16
  2. AD input and 7segment dysplay output
    By ruijc in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th November 2007, 13:45
  3. Good (stable) voltage regulator?
    By achilles03 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th December 2005, 19:39

Members who have read this thread : 0

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