Talk:Thermistor
I think the thermistor tables and generator script should be changed as per http://www.brokentoaster.com/blog/?p=148
A few issues: DaveX 18:22, 6 November 2012 (UTC)
- The links to http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py appear broken.
- https://github.com/reprap/firmware/blob/master/createTemperatureLookup.py appears to be the official program
- http://reprap.svn.sourceforge.net/viewvc/reprap/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py?view=markup&pathrev=3448 by Nophead calculates its own max_adc and treats r1=0 as a non-existent or r=infinity
- https://github.com/triffid/Teacup_Firmware/blob/master/createTemperatureLookup.py is used by teacup, but does the temps as temp*4 for fixed point math.
- R1 of zero seems nonsensical with respect to the text. The article needs a schematic and the matching code to make sense of it.
num_temps patch
The code at http://reprap.svn.sourceforge.net/viewvc/reprap/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py?view=markup&pathrev=3448 indicates a --num-temps=... option, but it is not in the code. The following patch adds it:
- createTemperatureLookupNophead.orig.py 2012-11-07 15:39:35.000000000 -0500 +++ createTemperatureLookupNophead.py 2012-11-07 15:38:03.000000000 -0500 @@ -66,7 +66,7 @@ num_temps = int(20); try: - opts, args = getopt.getopt(argv, "h", ["help", "r0=", "t0=", "beta=", "r1=", "r2="]) + opts, args = getopt.getopt(argv, "h", ["help", "r0=", "t0=", "beta=", "r1=", "r2=", "num-temps="]) except getopt.GetoptError: usage() sys.exit(2) @@ -85,6 +85,8 @@ r1 = int(arg) elif opt == "--r2": r2 = int(arg) + elif opt == "--num-temps": + num_temps = int(arg) if r1: max_adc = int(1023 * r1 / (r1 + r2)); @@ -124,4 +126,4 @@ print __doc__ if __name__ == "__main__": - main(sys.argv[1:]) \ No newline at end of file + main(sys.argv[1:])