User define thermistor: ADC value instead resistance

edited January 2017 in Repetier-Firmware
Hi Roland, there's way to insert in the on-line configurator the ADC value read with "M105 X0" command in the "User define thermistor table"?
I've the ability to physically detect the temperature on my nozzle with a precision instrument, and it would therefore be easier for me to be able to enter the temperature reading value and ADC instead of the resistance.
I think i've really wrong temp reading with my RAMPS V1.4 because the Arduino 5V voltage regulator go out only with 4.7V, so I guess this can cause errors in calculation of the temperature.
Bests,

Marco

Comments

  • Hi Marco,

    Arduino 5V is also Reference Voltage for the ADC.
    As Thermistor is used in Voltage divider with 4K7 Resistor on Ramps it shouldn´t matter if 5V is only 4.7 V.

    Tolerance of 4K7 resistor is the bigger issue.

    Best regards
    RAyWB
  • edited January 2017
    Hi RAyWB, thanks for reply.
    I know this problem, so now i've installed an external BEC with a stable voltage "5.00V" connected to the endstop VCC, but i prefer tune my thermistor with a personal table.
    So if it was possible to enter the ADC value for the temperature many of the problems could solved (i think).
  • edited January 2017

    OK Marco so you gave the answer for the wrong readings yourself.

    Arduino Mega in standard Setup takes Reference Voltage from +5 so in your case 4.7V.

    But your Voltage divider with the Thermistor is working on +5.0V

    that doesn´t match and will return error of about 6% what makes

     an error of 12  degrees at expected 200 degrees


    best regards,

    RAyWB

  • edited January 2017
    Ok, now i understand the real problem, thanks!
    Now, since i need to have stable 5V external voltage that can inject and remove the Arduino voltage regulator?
    I thought that by connecting the BEC to the endstop V pin of this was done.
  • edited January 2017

    i´ll check schematics and try to answer this question this evening, just one question , did you cut the pattern for supplying external 5V?, i mean 5 V Connection from ramps to Mega

  • You mean to remove the diode D1 or there's a pattern?
  • No, i mean Connection from +5V RAMPS to +5V Arduino.

    so if you supply external +5V to ramps it will be connected to arduino +5.

    IF YOU DID NOT cut this Connection your external +5 also goes to arduino and if it´s higher than arduinos 5V

    my mention from above is wrong .

    in that case i would suggest to remove arduinos 5V Regulator.

  • Roland, please, I already wait this implementation!
    The possibility to insert in the on-line configurator the ADC value read with "M105 X0" command in the "User define thermistor table" instead the resistor value, thanks!
    Read the ADC is easy with a command, read the resistance a little more complex.
  • Never noticed this thread. Have added this for the redo of the config tool. Also this is not that reliable as what you measure and when thermistor measures are different points so it will differ. But it is a good way to make tables for users not knowing what type they have.
  • edited December 2017
    Sure it's comfortable if you have a professional probe thermometer, like me.
    For example this is the ADC value at some temp here:


    Temp / ADC
    178     754
    192     588
    204     473

    Etc. etc.
    With this value i can easy create my thermistor table in a flash, without temp error.
  • Hi Roland, no news about this request?
    I can't see anything about this in the configurator...
  • No and I'm not sure I will. But it easy to reorder the equation:
    adc = 4095 * rs / (rs + r2)
    
    now you have adc and want rs:
    rs=-(adc*r2)/(adc-4095)
    
    So you can compute resistance from adc value.
  • edited October 2018
    Repetier said:
    No and I'm not sure I will. But it easy to reorder the equation:
    adc = 4095 * rs / (rs + r2)
    
    now you have adc and want rs:
    rs=-(adc*r2)/(adc-4095)
    
    So you can compute resistance from adc value.
    What? I'm sorry but the equatiion is not very clear... where is the temperature? :-)
    EDIT: ok, i understand now...
  • edited October 2018
    Example: ADC is 3923, temp is 23° and R2 4K7.... RS? -107198??????????
    I keep reiterating that being able to insert the ADC would make a custom table in an instant! :P
  • why -107198... it´s + 107198 (formula is absolute correct)
  • (3923*4700)/(3923-4095) = -107198 (on my calc)... :)
  • edited October 2018
    I created my thermistor table by applying this formula in an Excel spreadsheet.
    If the Configurator had allowed me to directly insert the ADC I would not have to use Excel or even the calculator.
    Entering this formula in the Configurator is a matter of a few minutes, and it would be easier.
    The evolution of any software is a winner with simplification, not complicating it.
    Imho the developers should understand that the user should be helped as much as possible in these processes.
    Things that are taken for granted by many are complicated.
    My two cents...

  • edited October 2018
    Marco67 said:
    (3923*4700)/(3923-4095) = -107198 (on my calc)... :)

    rs=-(adc*r2)/(adc-4095)  you missed the "-"

    but anyway,thermistors are not really made for precise measurement
    and you´ll not find 2 identical thermistors.
    they are all within tolerances of let´s say minimum 5%
    so you´ll have to set up the table for each single thermistor.
    and how do you get the reference temperatore referring to the ADC signal?

    and even if you do a calibration for every single thermistor....
    how do you compensate errors caused by printing speed, flow rate?
    also the mounting position of thermistor might change caused by vibratins

    I think there are too many other issues causing wrong readings , even the
    reference measurement with external thermometer is critical.
    And to be honest a measurement with thermistors and tolerances below 5%
    which makes 10 degrees @ 200°C is irrealistic.

    to get closer you have to use high quality thermoelements or PT100 / PT 1000
    sensor in awell designed heater block.

    but that´s my personal Opinion based on >30 Years experience in electronic Design



  • I agree about the tollerance, but my request makes sense, as it would simplify the whole customization process without having to use a calculator, only a termometer and M105 X0, nothing all.
    Why make things more complicated if they can be so simple?
    I know, it's not the developer mentality... ;-)
  • The normal way is having the thermisitor data sheet where you have the resistence and temperature. That is why the conversion works in that direction. The other way would be much harder and also partially wrong as temperature you measure also depends on the position you measure  and that is not where the sensor measures. Plus all the tolerances. So your way is actually the more difficult way. The way the config tool is implemented I had to decide on one way. Will see if I can do it better for V2 config tool when I write it:-)
Sign In or Register to comment.