NTC resistor


Closed Thread
Results 1 to 11 of 11

Thread: NTC resistor

  1. #1

    Default NTC resistor

    Does somebody already made something with a NTC in it.
    I like to build a NTC controlled fan circuit, but need a schematic and source to read a 47 KOhm NTC resistor.

  2. #2


    Did you find this post helpful? Yes | No

    Default

    I gave up on this approach and used a digital temp sensor instead. A lot less hassle.

  3. #3
    Join Date
    Jun 2005
    Posts
    53


    Did you find this post helpful? Yes | No

    Post

    NL2TTL,

    What pic are you using?
    I use a 10K NTC thermistor, 10K fixed resistor voltage divider connected to an analog input on a 16F819. I get approximately 6 counts per degree F resolution.
    I also use the hardware PWM to control 400 watts of fan motors based on temperature.
    I also recommend Darrel Taylor's averaging routine. It works great!
    http://www.pbpgroup.com/modules/wfse...hp?articleid=7

    Mark

  4. #4


    Did you find this post helpful? Yes | No

    Default

    I'm using a NTC because the costs are lower, and the PIC i'm using is a 16F877.

  5. #5
    Join Date
    Jun 2005
    Posts
    53


    Did you find this post helpful? Yes | No

    Default

    NL2TTL,

    What are you trying to acheive?
    What temperature range are you planning to control?
    Do you plan on using PWM?

    35 degrees C Off
    40 degrees C 50% duty factor
    45 degrees C 70% duty factor
    50 degrees C 70% duty factor

    65 degrees C 100% duty factor


    Mark

  6. #6


    Did you find this post helpful? Yes | No

    Default

    yes something like that, only a resistor (NTC) is not liniar so to compensate that you have to use a formula.

  7. #7
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Why not have a look at AN685 from Microchip. It's about Thermistors in Single Supply Temperature Sensing Circuits.

    Dave Purola,

  8. #8
    Join Date
    Jun 2005
    Posts
    53


    Did you find this post helpful? Yes | No

    Post

    NL2TTL,

    Try these 2 routines;

    This is how I read A/D converters with 10 bits resolution (0 - 1023)
    The average routine is Darrel Taylor's averaging routine followed
    by a simple linearization.

    ReadAD: ' Read A/D converters with 10 bits resolution (0 - 1023)
    ADCIN 0,AD0 'read channel 0...AN0
    VALUE = AD0 >> 6
    Sensor = 0
    gosub Average
    AD0 = VALUE
    ADCIN 1,AD1 'read channel 1...AN1
    VALUE = AD1 >> 6
    Sensor = 1
    gosub Average
    AD1 = VALUE
    ADCIN 2,AD2 'read channel 2...AN2
    VALUE = AD2 >> 6
    Sensor = 2
    gosub Average
    AD2 = VALUE
    ADCIN 3,AD3 'read channel 3...AN3
    VALUE = AD3 >> 6
    Sensor = 3
    gosub Average
    AD3 = VALUE
    ADCIN 4,AD4 'read channel 3...AN4
    VALUE = AD4 >> 6
    Sensor = 4
    gosub Average
    AD4 = VALUE
    Return

    Average: ' Average Analog values -=-=-=-=-=-=-=-=-=-=
    IF Value = ADavg[Sensor] Then NoChange
    IF ABS (Value - ADavg[Sensor]) > FAspread OR Value < AvgCount Then FastAvg
    IF ABS (Value - ADavg[Sensor]) < AvgCount Then RealClose
    ADavg[Sensor] = ADavg[Sensor] - (ADavg[Sensor]/AvgCount)
    ADavg[Sensor] = ADavg[Sensor] + (Value/AvgCount)
    GoTo AVGok
    FastAvg:
    ADavg[Sensor] = Value
    GoTo AVGok
    RealClose:
    ADavg[Sensor] = ADavg[Sensor] - (ADavg[Sensor]/(AvgCount/4))
    ADavg[Sensor] = ADavg[Sensor] + (Value/(AvgCount/4))
    AVGok:
    Value = ADavg[Sensor] ' Put Average back into Value
    NoChange:
    if AD0 >= 435 then RA = 66 'thermistor linearization
    if AD0 >= 446 then RA = 67
    if AD0 >= 450 then RA = 68
    if AD0 >= 456 then RA = 69
    if AD0 >= 461 then RA = 70
    if AD0 >= 477 then RA = 71
    if AD0 >= 473 then RA = 72
    if AD0 >= 479 then RA = 73
    if AD0 >= 486 then RA = 74
    if AD0 >= 492 then RA = 75
    if AD0 >= 499 then RA = 76
    if AD0 >= 506 then RA = 77
    if AD0 >= 513 then RA = 78
    if AD0 >= 519 then RA = 79
    if AD0 >= 526 then RA = 80
    if AD0 >= 529 then RA = 81
    if AD0 >= 535 then RA = 82
    if AD0 >= 544 then RA = 83
    if AD0 >= 548 then RA = 84
    if AD0 >= 552 then RA = 85
    if AD0 <= 438 then RA = 59
    if AD0 >= 562 then RA = 58
    Return



    This is how I determine my fan speed. In my case the minimum Fan speed is
    60%.

    IF RA <= SETPOINT Then cbs
    ERROR = (RA - Setpoint )
    IF ERROR <= 2 then FANSPEED = 153 '60%
    IF ERROR >= 3 then FANSPEED = 178 '70%
    IF ERROR >= 5 then FANSPEED = 204 '80%
    IF ERROR >= 7 then FANSPEED = 229 '90%
    IF ERROR >= 9 then FANSPEED = 255 '100%
    CASE 2
    cbs: FANSPEED = 153 ' manual spd 1
    CASE 3
    FANSPEED = 204
    case 4
    FANSPEED = 255
    end select
    IF FANSPEED > SPD + 50 THEN SPD = SPD + 2 'softstart or slowly
    IF FANSPEED > SPD THEN SPD = SPD + 1 'change speed
    'IF FANSPEED < SPD + 50 THEN SPD = SPD - 10
    IF FANSPEED < SPD THEN SPD = SPD - 1
    hpwm 2,SPD,32767 ' PWM 32 KHz
    return

    I hope this helps get you started.

    Mark

  9. #9


    Did you find this post helpful? Yes | No

    Default

    I requisted a few digital samples by maxim, and gonne try it with those.
    Because the failure is mutch lower, thanks for al the replys

  10. #10


    Did you find this post helpful? Yes | No

    Default

    Which ones are you getting from Maxim?

  11. #11
    Maniac's Avatar
    Maniac Guest


    Did you find this post helpful? Yes | No

    Default

    Hello

    I got exited to see the code Mark posted. I am in the process of building a controller. It will need to cycle between 2 temperatures using a thermistor and a small heater. Did anyone have built something similar using a PIC?
    Attila

Similar Threads

  1. MCLR resistor
    By The Master in forum Off Topic
    Replies: 20
    Last Post: - 5th November 2007, 16:01
  2. resistor in parallel with a thermistor
    By Pic_User in forum General
    Replies: 0
    Last Post: - 13th March 2007, 01:42
  3. Reading A Photo Resistor using ADC
    By jessey in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 25th January 2007, 09:28
  4. Replies: 5
    Last Post: - 2nd March 2006, 09:21
  5. Do I need that Resistor with my LCD?
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 15th July 2004, 10:50

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