Close



Results 1 to 10 of 12

Threaded View

  1. #10
    Staff Engineer printbus's Avatar
    Join Date
    May 2014
    Location
    Highlands Ranch, Colorado USA
    Posts
    1,437
    Add printbus on Thingiverse
    For completeness, when you start talking about errors on temperatures measured by Marlin and RAMPS with a thermocouple, there's another substantial error component to consider. I ran into this compiling the data for thread Comparison of Type 1 thermistor and E3D thermocouple temperature measurements

    That testing used a thermocouple adapter board from E3D that is based on the AD597, a less precise version of the AD595. These and similar amplifiers all output a voltage that changes linearly with temperature. The thermistor and thermocouple measurements all leverage the analog-to-digital (ADC) converter in the processor. Marlin (or perhaps the underlying Arduino libraries) confugures the AVR processor to use the board VCC, nominally 5V, as the analog voltage reference to be considered as "full scale" by the ADC. In converting the ADC sample value to a temperature, Marlin firmware (at least as of the becdac fork in late 2014) assumes an exact 5.0V as the supply voltage. But regulator output voltages aren't all that precise, possibly leading to errors in the voltage being measured by the ADC. For thermistors, it turns out this doesn't cause an error since the VCC being applied to the ADC reference input is also being applied to the resistor divider containing the thermistor. If VCC is high, the ADC reference input will be high but the voltage coming from the resistive divider will also be high by the same percentage. So, no error from the VCC being off from 5V for the normal thermistor approach.

    Thermocouple amplifiers like the AD595 are designed to output a voltage linear with temperature, and are designed for that output voltage to remain fairly stable regardless of the supply voltage, as they should. But this creates an error source between what the thermocouple amplifier is outputting and how RAMPS/Marlin measures it. For a given temperature and thermocouple amplifier output voltage, Marlin will result in a temperature result that changes as the electronics VCC (and the ADC reference input) changes. Options around this include hacking the electronics to provide your own VCC source set exactly to 5.00V like the Marlin conversions assume, or measuring your VCC and modifying the Marlin temperature calculation algorithm to reflect your actual voltage. The latter has another issue, however, in that the electronics VCC might vary over temperature or with different loading. If so, this could result in a varying amount of temperature measurement error.

    None of this explains why Marlin is hitting MAXTEMP in this case, but I thought I'd point out this error source.
    Last edited by printbus; 12-29-2015 at 05:09 PM. Reason: corrected details in using VCC as ADC reference

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •