Welcome! Log In Create A New Profile

Advanced

RTD Amplifier

Posted by rq3 
rq3
RTD Amplifier
December 08, 2021 06:04PM
Marlin does a miserable job with platinum resistance temperature measurements. Even after I pointed out that Marlin was still using 10 bit conversion, though all recent 32 bit boards use 12 bit AD converters, the thermistor tables are all 10 bit.

You can, of course, use a Maxim RTD converter chip, which reports RTD temperatures over SPI. Or you can add an amplifier running on the same 3.3 volt supply that provides the microprocessor with its Vref.

Attached is a zip file containing the discussion, schematics, board layout, Gerber files, TINA-TI SPICE model, and a Texas Instruments Excel spreadsheet for such an amplifier. It outputs 0 volts at 0C, and 3.3 volts at 500C (or 409.6C, depending on component selection). This utilizes the full input range of the ADC, and the circuit uses positive feedback to linearize the RTD response to within 0.031% ideally, or 0.05% using real, obtainable components.
Attachments:
open | download - OPT1000_Files.zip (270.3 KB)
Re: RTD Amplifier
December 09, 2021 09:21AM
Is it possible to see a PDF of the schematic as I don't know what EDA program you are using?

At the moment I use type K thermocouples with Adafruit pre-amps. So far very good but PT1000 may be better.

Mike
rq3
Re: RTD Amplifier
December 09, 2021 09:53AM
Hi Mike;

The schematic and board layout were done with ExpressPCB, which is a free utility that also allows almost one click ordering of boards. They also provide the gerber files.

Also free is TINA, a Spice modeling utility from Texas Instruments, which will allow you to open the .TSC file in schematic form for modification and modeling.

Texas Instruments also published the Excel spreadsheet for linearization of RTD amplifiers. The actual board is within microvolts of the model, but I have yet to do the fiddly surface mount deconstruction of my printer controller to install it.

The issues I am having with Marlin include:
1) All temperature data is extrapolated from 10 bit sensor lookup tables. This is a hold over from before Marlin became 32 bit board capable.
2) Until I brought it to their attention, Marlin was still using 10 bit ADC measurement routines. See #1 above. This has been "fixed" to 12 bit with oversampling, but something else got broken in the process.
3) Marlin attempts to invoke the Callendar-Van Dusen equations for platinum RTD's when it generates the appropriate look-up table when an RTD is declared, but somehow messes up. Measured temps can jump instantaneously by up to 20 degrees, which is obviously not real. But Marlin thinks it is, and completely loses control of the PID function for the hot end.

Attached is a document with screen shots showing the problem.

Edited 3 time(s). Last edit at 12/09/2021 05:28PM by rq3.
Attachments:
open | download - Temp_Compare.docx (748 KB)
Re: RTD Amplifier
December 10, 2021 05:35AM
I had a similar problem with thermocouples as the bias and gain support was not evident in Repetier firmware configuration. I did however get a quick response from Repetier ( [forum.repetier.com] ) and it is now working well.

Mike
rq3
Re: RTD Amplifier
December 10, 2021 07:09PM
Mike, your response prompts me to try a firmware other than Marlin. I've only used Marln since it became 32 bit capable, but I'm open to suggestions. Development is done on a delta printer with Chitu 32 bit STM32F103ZETA board. Keep in mind I am NOT a programmer. Analog and mechanical design, no problem.

PS: Glad to see you active again!
Re: RTD Amplifier
December 11, 2021 07:22AM
Quote
rq3
Mike, your response prompts me to try a firmware other than Marlin. I've only used Marln since it became 32 bit capable, but I'm open to suggestions. Development is done on a delta printer with Chitu 32 bit STM32F103ZETA board. Keep in mind I am NOT a programmer. Analog and mechanical design, no problem.

I went for Repetier long ago and would not change horses in midstream - but equally, I don't think I would recommend changing as Repetier is not without its quirks and foibles.

Quote

PS: Glad to see you active again!

Today is the first time I am allowed to drive againsmiling smiley

Mike
Re: RTD Amplifier
December 13, 2021 07:45AM
If you have a raspberry pi you can dedicate to your printer, Klipper may be an option worth exploring/experimenting with. There is likely a template configuration for that board already in its github repository you can use as a starting point. Klipper is well documented and very much expects you to RTFM before you start asking for support though. So be prepared.
Sorry, only registered users may post in this forum.

Click here to login