by Brian P. Wagner, Tegra Software
MrThermistor is a freeware program brought to you be me, Brian P. Wagner. It was written completely on a dual-66 original BeBox. It uses the BeBox GeekPort to measure temperature and display it on the screen. This is my first BeOS program and it was loads of fun to program. BTW, it is being entered in the August 97 BeMasters awards (wish me luck)!
In order to run MrThermistor you will first need to download and un-tgz the files. Since this is a GeekPort program, it is assumed that a BeBox is what you are running, although it will probably work on a Mac running BeOS, you will only see Error!. Just put the program anywhere you want, it'll run.
You will also need to get and install a copy of libprefs.so. This is a preference library written by John Watte and it is located on the Be ftp server. Click here to download libprefs110.tgz.
Also, this program is only for AA_PR, since it relies on Interface Elements for the GUI work. Soon a PR upgrade will be coming.
One final detail, you will have to make a BeBox GeekPort thermistor sensor circuit. This is easy and fun, and if you have no soldering experience, then it is about time you get some.
![]() |
As you can see the circuit is a basic voltage
divider. When two resistors (in our case one resistor and
a thermistor) are in series between 5V and ground, the
node between the resistors varies between 0 and 5 volts.
This node is what the A2D converter reads. The a/d ref
pin is simply tied to ground. Parts list (total should cost ($5.00) : 1 10K (1%) resistor 1 RadioShack p/n 271-110A thermistor (you can us other thermistors, we will get to this later. 1 37 pin D-Sub geek port plug with solder cups - Jameco p/n DC37P (1-800-831-4242) 1 37 pin D-Sub hood to protect your circuit - Jameco p/n DC37H (1-800-831-4242) some misc. hookup wire, solder, etc.
|
As previously stated, the circuit above is a voltage divider where the Vnode = RThermistor/(10,000+RThermistor)*Vin where Vin is 5 V. Now the problem is that a thermistor is a non-linear device, i.e. the temperature vs. resistance curve does not follow a straight line. What to do?
Simple, what I did was create a Excel spreadsheet which plots Temp vs. Voltage and Excel does the gaussian fit of the data to a fourth order polynomial. whew! In other words excel gave me a formula of C Vs V in a form that I could use.
Here is a copy of the spreadsheet (it was done using Excel for MSOffice97) MrThermistor.xls. If you play with the numbers in the spreadsheet, you will notice that you change the formula based on the sample data. If you want greater accuracy in one range, then just stuff more numbers into the spreadsheet. Someday, I will get around to writing a 4th order gaussian fit program.
If you want to use another thermistor, all you have to do is find it's characteristic curve! Put Mr.Thermistor in port voltage mode, measure lots of sample temperatures (using another thermometer) plug the values into the spreadsheet and walla! e-mail me if you have problems doing this.
There are two main windows associated with MrThermistor. The first one is just a display screen for the temp. On this screen you will notice a small Button in the lower right. Push it and a preferences screen will appear. use this screen to set A2D port, update speed, display options, and the thermistor curve variables. Press apply to save your preferences. Mr Thermistor also remembers where your windows were last located. Play with the settings, they won't bite!
MrThermistor was written by me, Brian P. Wagner. I have a small consulting company called Tegra Software, where I do database programming in MS Access. I have a degree in EE and CS and I love electronics and programming. I hope to extend the capabilities of MrThermistor to a full GeekPort weatherstation. I also have some ideas about how to give other BeOS capable machines access to GeekPort type stuff, cheap!. I hope you have enjoyed this program.
Brian P. Wagner 2430 Dove Lane Chattanooga, TN 37421 bpwagner@chattanooga.net http://chattanooga.net/~bpwagnerMrThermistor uses libprefs.so version 110 by John Watte. This is a fantastic piece of code and I would like to encourage anyone to use it. It makes the task of saving/retrieving options a piece of cake! Thanks hplus.
MrThermistor also used Interface Elements by Attilla Mezei. This is also a great piece of work, and it comes highly recommended. Let me know where I can send my shareware check! Thanks.
Mr Thermistor also uses MessageBoy as a debugging tool. If you have MessageBoy, turn it on and watch the MrThermistor action. Message Boy does a good job at simple debugging. Thanks to Casey Fleser.
Use this program at your own risk. It has been thoroughly tested and does not cause any problems on my machine, but your mileage may vary. I did blow a GeekPort fuse once. The Author assumes no liability...
This page was last revised 7/25/97!