Shop OBEX P1 Docs P2 Docs Learn Events
Fahrenheit vs Celsius — Parallax Forums

Fahrenheit vs Celsius

manxstampmanxstamp Posts: 57
edited 2004-11-09 17:56 in General Discussion
Working my way through various Basic Stamp projects and reading the N&V Stamp articles, I am struck by the extraordinary mathematical lengths to which the authors go·to convert the perfectly good scientific output from temperature measuring devices such as DS1620 from Celsius (Centigrade) to Fahrenheit. Why not just use Celsius?

When Fahrenheit invented his scale in 1714 he used the coldest temperature he could produce (ice and salt) as 0 and the body temperature as 100 (he must have had a fever, probably due to sitting with all that ice and salt!). So it was a metric scale. When Celsius invented his scale at about the same time, he used very easily standardised temperatures, melting ice and boiling water at sea level, as his 0 and 100 metric scale. If you are going to use a metric scale, why not use the international scientific standard adopted in 1948, Celsius (aka Centigrade). You might as well use Reamur's scale (ice at 0 and boiling at 80).

In the UK and·Europe, we are fascinated by the USA's persistence with pounds, feet, foot pounds, nautical miles etc. in scientific applications, even when, as in a recent joint space mission, confusion between feet and metres caused disastrous problems.

So, over to US contributors to reply to my (deliberately·wink.gif )·, provocative·post!

John



▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



Manxstamp,
Isle of Man, British Isles

Comments

  • KenMKenM Posts: 657
    edited 2004-08-26 01:42
    I was born and raised in the USA where our units of measurement stink......sure I am comfortable with our US system, but I agree with you completely. The metric system makes a lot more sense the way units are sub units of each other by powers of ten (at least distances)
    manxstamp said...
    Working my way through various Basic Stamp projects and reading the N&V Stamp articles, I am struck by the extraordinary mathematical lengths to which the authors go·to convert the perfectly good scientific output from temperature measuring devices such as DS1620 from Celsius (Centigrade) to Fahrenheit. Why not just use Celsius?

    When Fahrenheit invented his scale in 1714 he used the coldest temperature he could produce (ice and salt) as 0 and the body temperature as 100 (he must have had a fever, probably due to sitting with all that ice and salt!). So it was a metric scale. When Celsius invented his scale at about the same time, he used very easily standardised temperatures, melting ice and boiling water at sea level, as his 0 and 100 metric scale. If you are going to use a metric scale, why not use the international scientific standard adopted in 1948, Celsius (aka Centigrade). You might as well use Reamur's scale (ice at 0 and boiling at 80).

    In the UK and·Europe, we are fascinated by the USA's persistence with pounds, feet, foot pounds, nautical miles etc. in scientific applications, even when, as in a recent joint space mission, confusion between feet and metres caused disastrous problems.

    So, over to US contributors to reply to my (deliberately·wink.gif )·, provocative·post!

    John


  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-26 03:59
    In the course of my professional life I've worked with and been to Europe many times, so·I'm comfortable with the Metric system too, but if I didn't convert to US units I have even more mail in my already-overflowing e-mail box.· Maybe we can get the EU to foot the bill for changing all of our signage, scales, measuring devices, text books;·afterall, the EU loves America so much.... tongue.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office


    Post Edited (Jon Williams) : 8/26/2004 4:04:05 AM GMT
  • dlborgmandlborgman Posts: 11
    edited 2004-08-26 05:04
    I may be wrong, but I was under the impression that England still
    measured in feet and inches just the way we do. But I could be wrong:-)

    Besides, whats so hard about stamp programming degreesF = ((degreesC * 18) + 32) / 10.
    Us yanks can do that in our sleep! ;-) I KNOW what 90 degrees F feels like. I have to go
    do the math to know what 20 degrees C feels like.

    It's all in what you where raised with. Not that we can't learn something new, we do that
    everyday of our lives. But converting 300,000,000 people to think in metric is no small task
    and would/will take several generations to accomplish. Slow learners? NO· Stubborn? YES :-)

    Dennis
    ·
  • GadgetmanGadgetman Posts: 2,436
    edited 2004-08-26 07:25
    No, no, no!

    We should dump both scales and use Kelvin instead...
    (The scale starts with 0 being the 'absolute zero', and ice melting at 271 or so...)

    Did anyone mention Inches?
    Imperial, or any other?
    Imperial is 2.54cm, Norwegian is 2.63cm...
    We have big hands, all right?
    (No, it's not used any more, as far as I know.)

    Why is it that DIP modules are measured in .1" increments, while everywhere else they use 1/2, 1/4, 1/8 and so on?

    A nautical mile is 1850meters, or 10 'cable lengths'

    One Knot is one Nautical mile/hour

    Measurements can be fun...
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2004-08-26 12:59
    The world would be quite boring, indeed, if we all spoke the same language, had the same culture, and agreed on the perfect size vessel for a cold drink after all this hard work!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas Office
  • Wade SmithWade Smith Posts: 25
    edited 2004-08-26 13:01
    I think Jon's point about footing the bill is well put. I have been working for the last two years for a European firm that approves pressure equipment built in the US to export to the EU with the CE mark we all see on calculators, phones, etc. We use both systems in the US which is clumsy, but from what I have seen the younger engineers in the US are more familiar and comfortable with metric. It just takes time, and unless someone wants to reimburse the billions of dollars already invested in domestic products (don't give the government any ideas!) it will probably take another 50 years. Let's do it the old-fashioned way, by choice and preference, not mandate.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-26 13:25
    I find it easy to work with metric in Automotive Applications (Working on cars), or in drafting, blue-printing, and mechanical drawing...But I agree with dlborgman...I know what 32F or 72F feels like...When I see temps in Celsius, I feel stupid!· Same with Miles...Kilometers just doesn't cut it for me....But I had 35 years of programming in US Standards...I would say give it a few generations...

    For now, those tired of math can convert MANY types of units from one to another using a simple free program found on the net, called simply, "CONVERT".· You can get it here:

    http://www.knightdesigns.com/files/CONVERT.EXE·(OLD LINK REMOVED)

    I wasn't sure if EXE files were allowed for attachment...

    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 4/12/2005 2:01:13 AM GMT
  • Harry StonerHarry Stoner Posts: 54
    edited 2004-08-26 14:56
    Here in Canada we've had the pleasure of converting from ENGLISH to metric in my life time. It took many years to "think" in metric terms, especially for temperature. Now I think in Celsius but also comfy in Fahrenheit.

    The worst part was converting from gallons to litres for fuel. Not only did they change the units, they also inverted the measure of fuel econpmy for cars. Used to be miles per gallon. Then some idiot decided litres per hundred kilometers was a better unit. I still think in miles per gallon, but also in kilometers per litre - but not litres per kilometer (or 100 kilometers).

    And for real fun, travel to the US and try and remember how to convert litres to Imperial gallons then to US gallons, then also convert Cdn currency to US currency to see how much gas costs compared to home.

    Re: electronics, what I find funny are the Molex ".156" connectors with .156 inch spacing. Really they are 4mm. Try using a ruler to measure in units of .156 inches so you can drill holes. Then try using units of 4mm (our rulers have metric markings on them) and tell me which is easier!

    Harry
  • hutdonhutdon Posts: 32
    edited 2004-08-26 15:48
    I work for a state highways department. Not too many years ago the Feds convinced all of us we were going metric. Well we changed all our specs, all our MP's (material procedures), all of our bid lettings. This seemed to be working - until the steel reinforcement industry told us they would NOT change the way they produced rebar (basically in 1/8 inch diameter increments). They also had the political clout to get laws passed that although they would not produce metric sized rebar we could not purchase it outside the USA (read Canadian). So we had to un-change all our specs, MP's, and bids. We are just now getting back to the point where we don't have to refer to two spec books - one English and one metric.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-26 17:15
    Harry Stoner said... (trimmed)
    The worst part was converting from gallons to litres for fuel. Not only did they change the units, they also inverted the measure of fuel econpmy for cars. Used to be miles per gallon. Then some idiot decided litres per hundred kilometers was a better unit. I still think in miles per gallon, but also in kilometers per litre - but not litres per kilometer (or 100 kilometers).
    Harry
    Harry, now that you mention it, although we use US Gallons over here for fuel, and economy is rated in MPG, ENGINES are still rated in CC's or Liters...Weird.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 4/12/2005 2:01:23 AM GMT
  • Tom WalkerTom Walker Posts: 509
    edited 2004-08-26 17:47
    I'm partial to "furlongs per fortnight" [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed

    ...you're about average...
  • manxstampmanxstamp Posts: 57
    edited 2004-08-26 19:57
    I'm pleased to have started some light-hearted conversation about units! I have to come clean and confess that the British are not very comfortable in metric in everyday life either (which is why I deliberately added 'scientific' in my post). We reluctantly buy fuel in litres (at·around 7 dollars per gallon) for cars, with engine sizes in litres,·that do miles per hour, at miles per gallon, on roads marked in miles. The inch is still much loved as it is a 'human' dimension (the thumb originally), as·are the foot and yard (originally the distance from the King's outstretched thumb to his nose),·but children are becoming used to metric units. I note a sense of 'Europhobia' as well in one post; something the US also shares with Britain, which does not really see itself as part of 'Europe'. I always wondered if it was the rapid adoption of metric units by the Soviet Union after the revolution which put the US off smile.gif

    When I was a child (in the 1950's I have to admit) you could buy notebooks with little tables on the back cover which showed how many pecks were in a bushel and chains in a furlong etc.!

    You are all·right in that it doesn't really matter, and the PBasic programs are easily written for either Fahrenheit or Celsius, but perhaps a truly universal set of units might be a little·help in this troubled world.

    Thanks for the interesting views,

    John

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔



    Manxstamp,
    Isle of Man, British Isles
  • Tom WalkerTom Walker Posts: 509
    edited 2004-08-26 20:04
    And for the geeky types...an attoparsec per microfurlong is pretty close to an inch per second... 8<|;^)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed

    ...you're about average...
  • Fe2o3FishFe2o3Fish Posts: 170
    edited 2004-08-31 16:09
    Uh, Tom....

    <geekiness value="high">
    That should be attoparsec per microFORTNIGHT (1.0043268 inches/sec).
    A furlong is a measure of distance.
    </geekiness>

    Sorry, couldn't resist.

    -Rusty-
    --
    Rusty Haddock = KD4WLZ = rusty@fe2o3.lonestar.org
    **Out yonder in the Van Alstyne (TX) Metropolitan Area**
    Microsoft is to software what McDonalds is to gourmet cooking
  • Tom WalkerTom Walker Posts: 509
    edited 2004-08-31 17:37
    You are absolutely right...too much stuff happening at the same time in my head...

    I had amnesia once -- or twice.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If at first you don't succeed

    ...you're about average...
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-31 17:45
    Speaking of the original subject, I realized testing my Digital Thermostat the other day that there are gaps in the Farenheit conversion process on the BS2...At least using the routines I have now.· I am using the DS1620 and the conversion routine in StampWorks...This produces some gaps so that the temperature goes from 80 to 82 (No 81) for example.· I am wondering if there is a better conversion process I should try...




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 4/12/2005 2:01:32 AM GMT
  • NewzedNewzed Posts: 2,503
    edited 2004-08-31 17:54
    Chris, what formula are you using?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    TWS/RWS RF Modules

    http://hometown.aol.com/newzed/index.html
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-31 17:56
    If you have the StampWorks manual, it's in there for the DS1620 experiment...If not, I will send it to you once I get my Laptop plugged back into the bench (All my code is on it, not this machine).




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 4/12/2005 2:01:42 AM GMT
  • NewzedNewzed Posts: 2,503
    edited 2004-08-31 19:06
    Chris, try this little program.· Each degree of Celsius equals 1.8 degrees of Fahrenheit.· Wheb you run the program you will see that for each·· degree, F jumps 1.8.· That's why there is no 81, or a lot of other numbers.

    ' {$STAMP BS2p}
    ' {$PBASIC 2.5}

    c··· VAR byte··· 'Celsius
    f··· VAR word··· 'Fahrenheit
    x··· VAR byte

    FOR x = 0 TO 100
    f = (x*90)/5
    DEBUG "C = ", DEC x, "· ", "F = ", DEC f/10+32 , ".", DEC1 f, cr
    PAUSE 1000
    NEXT
    END

    yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    TWS/RWS RF Modules

    http://hometown.aol.com/newzed/index.html
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-08-31 19:28
    Yeah, I made the necessary changes to my code to compensate for the lack of linearity...It's for the Digital Thermostat I am working on...Before I was checking for a specific target temperature.· I am no longer doing that.· Instead I am checking for greater or less than the target temperature in both directions.




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 4/12/2005 2:01:49 AM GMT
  • Tracy AllenTracy Allen Posts: 6,656
    edited 2004-09-01 16:30
    Hi Chris,

    I have a web page on the DS1620, which we used for the Earth Measurements curriculum.
    owlogic.com/OL2d1620.htm

    The '1620 outputs at one bit per 0.5 degree Celsius. Assuming you also need to cover negative temperatures (read nine bits), use the formula:

      ' come here with 9 bit DS1620 value in word x
      x.byte1 = -x.bit8             ' extend the sign to 16 bits
      degC=x*5                      ' convert to 'C*10 (resolution 0.5 'C)
                                    ' & show the result on the PC screen:
      debug "degC=",rep "-"\degC.bit15,abs degC/10,".",dec1 abs degC,CR
      degF= degC+2732**11796-460      ' 'C*10 to 'F (first to Kelvin*10)
      debug ? sdec degF             ' show it as a whole number with sign
    
    



    It is the handling of the negative temperatures that makes it a bit convoluted. The factor 11796 is from Stamp math: (9/50 = 11796/65536).

    The web page shows how to read the high resolution registers. It is more fun to see the sensor perform at 0.01 degree resolution!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-09-01 21:27
    Thanks for the information Tracy...I will mull over it later.· Fortunately it's not a critical project.· A home thermostat that needs to handle from 40 degrees to 88 degrees, which is the range of the current Honeywell Thermostat that's on there.· Even though the DS1620 has Thermostat control built-in, I am setting the BS2 to be able to adjust things on a schedule, and so I am just controlling a Relay through an available port on the BS2.




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 4/12/2005 2:01:56 AM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2004-11-08 18:55
    Tracy,

    ·· Just wanted to get back to you and say "Thank You!"· Your code listed above was finally integrated into the Digital Thermostat, and now we appear to be getting tempF resolution of 1 degree, instead of 1.9, or whatever I was getting using the old code.· I also saved one variable, and since I will never be using negative temps or displaying in Celsius, several lines of code.

    I did have to refer to your website though to check the variable declarations, since there was a difference from mine.· Anyway, thanks again.




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com


    Post Edited (Chris Savage (Parallax)) : 4/12/2005 2:02:03 AM GMT
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2004-11-09 17:10
    Harry Stoner said... (trimmed)

    The worst part was converting from gallons to litres for fuel. Not only did they change the units, they also inverted the measure of fuel econpmy for cars. Used to be miles per gallon. Then some idiot decided litres per hundred kilometers was a better unit. I still think in miles per gallon, but also in kilometers per litre - but not litres per kilometer (or 100 kilometers).
    Hey,

    I'm living in Germany, and I'm pretty sure that the way to specify fuel consumption depends on how you think (optimistic, or pessimistic).

    Miles/Gallon means: Hey I can make so many miles with just one gallon, where Litres/100 Kilometers means: Arghhh - I need so many litres for 100 kilometers - this is similar to the "glass half-full", or "glass half-empty" way of thinking.

    Seems as if we Europeans (at least we Germans) tend to be more pessimistic.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,


    G
  • dbpagedbpage Posts: 217
    edited 2004-11-09 17:56
    Power boaters and·some pilots use gallons per hour.· Other pilots use pounds of fuel per hour.· As you've said, it's all in the way one thinks.
Sign In or Register to comment.