element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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 Temperature Sensor with 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
  • Replies 2 replies
  • Subscribers 392 subscribers
  • Views 349 views
  • Users 0 members are here
  • arduino
  • sensor
Related

Temperature Sensor with Arduino

Former Member
Former Member over 10 years ago

I am following this link "Arduino - One Wire Digital Temperature Sensor - DS18B20" for my project in Arduino.I have a query in using the Temperature sensor.

 

As per the link,we should use Dallas temperature sensor DS18B20.They have also used Dallas and Onewire libraries.

 

However,I have bought LM35 temperature sensor.When I bought the component,I didnt check that.So,I am not sure whether I can still use LM35 as the sensor.

If I can use LM35 instead of DS18B20,what are the libraries I should use?Should I still continue using DallasTemperature.h and Onewire.h libraries?

 

Should I still use any resistor in the circuit while using LM35?Because,Arduino Temperature Sensor Interfacing (LM35) .THE EASIEST WAY does not show any resistor whereas with Dallas Temperature Sensor explained in the link "Arduino - One Wire Digital Temperature Sensor - DS18B20" shows 4.7K ohm resistor.

 

  • Sign in to reply
  • Cancel

Top Replies

  • bobcroft
    bobcroft over 10 years ago +2
    Radhamani, you do not need either of those libraries or the 4.7K resistor for the LM35. The LM35 is a totally different device to the 18B20 because the 18B20 is a one wire serial bus device. The 18B20…
  • bobcroft
    bobcroft over 10 years ago

    Radhamani, you do not need either of those libraries or the 4.7K resistor for the LM35.  The LM35 is a totally different device to the 18B20 because the 18B20 is a one wire serial bus device. The 18B20 is accessed using the proprietary one wire serial communication protocol, for example you send it a command to read the temperature it is measuring.  The 18B20 is a very versatile device and you can put multiple sensors on the one wire.  The two libraries take much of the coding work away and there are dozens of examples of its use on the internet.

     

    The LM35 is a voltage output device.  It outputs a voltage proportional to the temperature being measured.  You would read this voltage using the Arduino analog inputs.  Again there are dozens of sketches using this device on the internet.  I like the 18B20 and prefer it over the LM35.  You can obtain the 18B20 in a waterproof metallic case with a 1 metre cable which makes it ideal for real world sensing.

     

    Hope that helps

     

    Bob

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 10 years ago in reply to bobcroft

    Thanks bob...I am planning to swtich to 18B20 and continue with my project...Thanks muchimage

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
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