element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Calibration of TMP36 sensors on Arduino?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 8 replies
  • Answers 2 answers
  • Subscribers 401 subscribers
  • Views 2184 views
  • Users 0 members are here
  • accuracy
  • temperature
  • tmp36
  • adjust
  • arduino
  • sensor
  • calibration
Related

Calibration of TMP36 sensors on Arduino?

ntewinkel
ntewinkel over 12 years ago

So I had a chance to try this out:

 

I put 3x TMP36 sensors side by side on a breadboard, hooked it up to use the 3.3v reference for better accuracy, set up the code to discard the first reading (to settle the ADC) and then take the average of 8 analogRead's with 20 ms delays between, and this is the result:

Temperatures = 25.04, 24.72, 24.40

Temperatures = 25.37, 24.40, 24.08

Temperatures = 25.04, 24.40, 24.08

 

The list is much more steady than that, but I copied the part that shows the bit of fluctuation that happens every so often - it steps up/down in increments of (reference voltage / 1024), which for my 3.3v reference is about 0.32 degrees. In other words, one point difference in the analogRead result equals 0.3 degrees. Using a 5 volt reference therefore would make that about a 0.5 degree increment.

 

Now, my handheld laser-guided temperature reading doohickey says it's about 24 degrees C in here - I know! it's a warm day today!! (I live on the very temperate West Coast of Canada)

 

So obviously there is a difference between sensors, as the first one is nearly a degree higher than the last one.

 

How would you normally adjust for specific sensors? Or would you adjust?

 

For example, if I trust my handheld reader, I would say that (based on the values of the last line) sensor 3 is perfect, and for sensor 1 I would (in the code) always subtract a degree, and for sensor 2 I'd subtract 0.3 of a degree.

But I'm a software guy and I'm betting there's a very clever hardware solution people would use for this.

 

This is for a one-off project, not sure if that would change the approach.

 

Also, the plan is to use 2 of these sensors to track temperatures inside and outside of my greenhouse. In my area I would not expect temperatures to exceed the -20 to +50 C range. Doing the math, +50 comes to 1 volt. Is there a way (an easy way?) to set the reference voltage to 1 volt so I can get accuracy of 0.1?

 

Thanks!

-Nico

  • Sign in to reply
  • Cancel

Top Replies

  • mcb1
    mcb1 over 12 years ago in reply to ntewinkel +1 suggested
    Nico My calculation is that you are somewhere in the (750mV) A0=232 at 25degC, which is less than quarter of the fullscale (assuming 3v3 supply) Using a 3v3 supply I calculate each step is 0.0032258mV…
  • neilk
    neilk over 12 years ago +1 verified
    Hi Nico Yes I have been quiet for a long time and no, sadly, I haven't completed my Greenhouse temperature control project yet. Most aspects of it are designed and in most case tested and proven. I haven…
  • mcb1
    mcb1 over 12 years ago in reply to neilk +1 suggested
    Neil/Nico I did something you describe for 'The Shed' magazine as part of our 101 series. The article and software is here (part 4 included the LCD in both normal and I2C version) http://www.theshedmag…
Parents
  • ntewinkel
    0 ntewinkel over 12 years ago

    Ok, I knew this already and just realized it - to get near one volt, all I have to do set up a voltage divider off the 3.3v with a 1meg and a 470k resistor. :)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 12 years ago in reply to ntewinkel

    Nico

     

    My calculation is that you are somewhere in the (750mV) A0=232 at 25degC, which is less than quarter of the fullscale (assuming 3v3 supply)

    Using a 3v3 supply I calculate each step is 0.0032258mV

     

    Another method is to change the analogue reference to 1.1v

    http://arduino.cc/en/Reference/AnalogReference

     

     

    My calculations are that you could read up to 60deg C using the 1.1v internal reference available on a 328 and the adafruit formula.

    Temp in °C = [(Vout in mV) - 500] / 10

     

    Mark

     

    I also answered your other post.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Reply
  • mcb1
    0 mcb1 over 12 years ago in reply to ntewinkel

    Nico

     

    My calculation is that you are somewhere in the (750mV) A0=232 at 25degC, which is less than quarter of the fullscale (assuming 3v3 supply)

    Using a 3v3 supply I calculate each step is 0.0032258mV

     

    Another method is to change the analogue reference to 1.1v

    http://arduino.cc/en/Reference/AnalogReference

     

     

    My calculations are that you could read up to 60deg C using the 1.1v internal reference available on a 328 and the adafruit formula.

    Temp in °C = [(Vout in mV) - 500] / 10

     

    Mark

     

    I also answered your other post.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube