fiasgardone
Joined: 19 Jan 2010 Posts: 71
|
|
Posted: Mon Nov 26, 2012 6:02 am |
|
|
| asmboy wrote: | fascinating....
I could not agree more forcefully with AVOIDING Floats unless absolutely required.
I've been working the past few days on a customer, project that
replaces a water-bath microscope stage micro-incubator, with a
replacement , low cost, electrically heated design.
The lock center point is 37.0 deg C
and the total range is only 31 to 44 deg C
My solution for accurate ( after offset calibration ) of a deg C
displayed environment is to actually use the Natsemi LM34 Fahrenheit sensor - digitized on a 12 bit pic 18f2523 - and an ext a/d reference of 1.234v
The internal maths convert all values for INTERNAL use
to represent deg F as a 16 bit quantity that is 10x calibrated to deg F ,
such that 98.6 deg F is INT 986. all set point management is done with deg F resolution. And to show it, as is, you simply use %3.1w formatting.
Transfer to C (37.0 nominal ) for user display is achieved with a simple conversion function when driving the LCD for eyballs to watch.
-
A source output of 10mv /deg F is much better resolved to deal with than a direct reading 10mv / deg C.
The use of nothing but integer math with decimated DISPLAY might
"float" your maths better too.
 |
Nice !!Thanks |
|