Shop OBEX P1 Docs P2 Docs Learn Events
3D Printing and Thermal sensing, though Thermistor. — Parallax Forums

3D Printing and Thermal sensing, though Thermistor.

Now that I nearly have a complete stepper motor controller that takes simple commands over serial, and returns status to a control application, I am thinking again about my long since abandoned Propeller 3D-Printer Controller project.

I had abandoned the first version of this project when I got a Raspberry Pi that had enough GPIO's to do the job, and a AVR ATTiny that was pre programmed to read the thermistor values of the hot end and hot bed. Though now I think I want to get a good go at it again, this time using the Propeller to do all sensor input, stepper control, and PWM output to maintain the correct temperature levels.

My current Question is:
Using a simple standard Sigma Delta ADC setup on the Propeller, does anyone have any information on the values to expect, and how to wire up, to read the thermister(s) that come pre-installed on standard Hot Ends and heated print beds? Any information would help, as that was one of my stopping points before.

OT:
I should have a unipolar stepper motor controller object to show off tonight or tomorrow morning. It uses a very simple command language where each command is 32-bits and the upper 8 bits specify the command, while any parameters are in the lower 24 bits. More on that when I post it.

Comments

  • It looks like I accidentally found a very helpful bit of information on this.
    @JasonDorie:
    I am guessing that the numbers you list in the post I quote here are for the cheap thermistors used in 3D Printer Hot Ends? Is that correct?
    JasonDorie wrote: »
    I found thermistors that were good into 500*F / 250*C. The ones used in 3D printer hot ends are cheap and easy to find. If you look at the datasheet for the thermistor, you should see a table of resistance values for a given temperature. I used this table in an excel spreadsheet to figure out what the decay time would be for each resistance value given my specific capacitor, and turned that into a number of clocks at 80MHz.

    For example:
    10*C = 201660ohms

    The decay time to fall below threshold voltage is 0.693 * capacitance * resistance. So for a 1uF cap, it becomes 0.693 * 0.000001 * resistance, which is a decay time of 0.13975038 sec. That number * 80M clocks per second gives 11180030 clocks.

    Do that for ALL the temperatures in the table and you get something like this:
    'Resistance table
    '                   Temp    Clocks  (49 entries, x 2 longs)
    ResistTable   long   50,    11180030
    ResistTab01   long   59,    8787240
    ResistTab02   long   68,    6956057
    ResistTab03   long   77,    5544000
    ResistTab04   long   86,    4447563
    ResistTab05   long   95,    3590239
    ResistTab06   long  104,    2915534
    ResistTab07   long  113,    2381203
    ResistTab08   long  122,    1955480
    ResistTab09   long  131,    1614357
    ResistTab10   long  140,    1339486
    ResistTab11   long  149,    1116783
    ResistTab12   long  158,    935495
    ResistTab13   long  167,    787137
    ResistTab14   long  176,    665169
    ResistTab15   long  185,    564435
    ResistTab16   long  194,    480887
    ResistTab17   long  203,    411309
    ResistTab18   long  212,    353097
    ResistTab19   long  221,    304199
    ResistTab20   long  230,    263007
    ResistTab21   long  239,    228136
    ResistTab22   long  248,    198531
    ResistTab23   long  257,    173305
    ResistTab24   long  266,    151739
    ResistTab25   long  275,    133278
    ResistTab26   long  284,    117366
    ResistTab27   long  293,    103617
    ResistTab28   long  301,    91753
    ResistTab29   long  311,    81441
    ResistTab30   long  320,    72460
    ResistTab31   long  329,    64643
    ResistTab32   long  338,    57824
    ResistTab33   long  347,    51809
    ResistTab34   long  356,    46531
    ResistTab35   long  365,    41879
    ResistTab36   long  374,    37771
    ResistTab37   long  383,    34140
    ResistTab38   long  392,    30913
    ResistTab39   long  401,    28047
    ResistTab40   long  410,    25497
    ResistTab41   long  419,    23218
    ResistTab42   long  428,    21178
    ResistTab43   long  437,    19354
    ResistTab44   long  446,    17713
    ResistTab45   long  455,    16238
    ResistTab46   long  464,    14913
    ResistTab47   long  473,    13710
    ResistTab48   long  482,    12629
    

    Note that I also converted the Deg*C into Deg*F for my use, so the Temperature list there is in Fahrenheit.

    Once you have this table, do your RCTime measurement as usual and just figure out which table entries it's between, and interpolate.
      repeat
    
        reading := RCTIME( 1 )
    
        i := 1
        repeat while ( (long[@ResistTable][i] => reading)  AND  (i =< constant(49*2)) ) 
          i += 2
    
        i -= 3
    
        t2 := long[@ResistTable][i+0]     
        t1 := long[@ResistTable][i+2]     
    
        r2 := long[@ResistTable][i+1]     
        r1 := long[@ResistTable][i+3]     
    
        rd := r2 - r1
        td := t2 - t1
    
        t := t1 + ((((reading - r1) << 8)  / rd) * td) ~> 8        
        
        dbg.dec( reading )
        dbg.tx( 32 )
        dbg.dec( t )
        dbg.tx(13)      
      
        waitcnt( 800_000 + cnt )
    

  • davidsaundersdavidsaunders Posts: 1,559
    edited 2017-03-01 03:55
    @JasonDorie:
    Thank you for posting your table in that other thread. Here is the conversion for degrees celcius, as is more commonly used in devices that use such things. Hope it may be of use.
    'Thermistor time in clocks to temp table, 1uF capacitor.
    ThermistorV
      long   11180030, 10,  8787240, 15,  6956057, 20,  5544000, 25
      long    4447563, 30,  3590239, 35,  2915534, 40,  2381203, 45
      long    1955480, 50,  1614357, 55,  1339486, 60,  1116783, 65
      long     935495, 70,   787137, 75,   665169, 80,   564435, 85
      long     480887, 90,   411309, 95,   353097, 100,  304199, 105
      long     263007, 110,  228136, 115,  198531, 120,  173305, 125
      long     151739, 130,  133278, 135,  117366, 140,  103617, 145
      long      91753, 150,   81441, 155,   72460, 160,   64643, 165
      long      57824, 170,   51809, 175,   46531, 180,   41879, 185
      long      37771, 190,   34140, 195,   30913, 200,   28047, 205
      long      25497, 210,   23218, 215,   21178, 220,   19354, 225
      long      17713, 230,   16238, 235,   14913, 240,   13710, 245
      long      12629, 250
    

    While I am sure it will not be a perfect match, it is a good starting point.
Sign In or Register to comment.