On 10/23/2017 3:34 PM, John Morris wrote: > I'm looking at the CRAMPS thermistor calculations in > `hal/user_comps/hal_temp_bbb.py`, and having trouble understanding one > piece. > > The comments say: > > # The CRAMPS board thermistor input has one side grounded and the > other side > # pulled high through a 1.00K resistor to 1.8V. Following this is a 4.7K > # resistor, some protection diodes, and filtering capacitors. The ADC > voltage > # read is the filtered voltage across the thermistor. > > Change the pull-up resistor value to 2.00K, and this description > matches variable values in `adc2r_cramps()` as well as the CRAMPS > schematic [1] (p. 5, RHS).
Yes, the CRAMPS 2.0 switched from a 1K to a 2K pull-up and the protection diodes were removed (they affected the ADC readings too much). > The problem is in function return value. While it seems it should > return the resistance of the thermistor, it instead appears to > calculate the combined resistance of the thermistor and the 4.7k > resistor in parallel. The 2K resistor and the thermistor form a voltage divider. The voltage divider feeds a 4.7K resistor and two capacitors which form an RC filter to reduce noise. The BBB presents almost no load on it's ADC input pins (CMOS inputs, so it's just leakage current), so there is essentially zero voltage across the 4.7K resistor unless the thermistor is changing value very rapidly (or there is noise on the line). With no load on the THERM* pins and no effective voltage across the 4.7K resistor, the 4.7K doesn't enter into the temperature equations and the ADC is directly reading the thermistor voltage (V_T). All the thermistor current is flowing through the 2K pull-up (I_PU), and those two values are used to calculate the thermistor resistance. -- Charles Steinkuehler [email protected] -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
