Tom Hartman says:
...I developed a way to measure thermistor resistance without an ADC. This requires two bi-directional port pins a reference resistor and a capacitor. I think others have done this as well.PIN1|---\/\/\/-----+ | R1 | C1 PIN2|---\/\/\/-----+--)(--> (GND) T1Create a reference measurement from precision resistor R1:
- Output 0 on pins 1,2 to discharge C.
- Make both pins inputs.
- Pulse PIN1 from input to high output back to input.
- Increment reference counter.
- While PIN1 input is low, go to 3.
Measure the thermistor:
- Output 0 on pins 1,2 to discharge C.
- Make both pins inputs.
- Pulse PIN2 from input to high output back to input.
- Increment themistor counter.
- While PIN1 input is low, go to 3.
Now (thermistor counter)/(reference counter) = T1/R1. C1 is cancelled. The same pin is used to detect the threshold for both resistors, so the pin threshold is also cancelled.
So T1 = R1 * (thermistor counter)/(reference counter).
There are lots of tricks you can do to simplify the math. Then use a lookup table to linearize the result.
Size C1 so the RC time constants are slow enough to be able to count with some precision.
Questions:
file: /Techref/io/sensor/thermist/capchrg.htm, 1KB, , updated: 2004/1/31 04:29, local time: 2024/11/8 16:35,
3.138.143.72:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/io/sensor/thermist/capchrg.htm"> io sensor thermist capchrg</A> |
Did you find what you needed? |
PICList 2024 contributors:
o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to www.piclist.com! |
.