Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

DS18B20 Readings

DS18B20 temperature ND2+

Best Answer awthorn, 29 April 2013 - 12:11 PM

Ziggurat29, I am sorry I just realized I posted this in two different places on the forum. I found a solution to the problem thanks to another forum member. There was a data type issue in the code I was using from http://www.tinyclr.c...hare/entry/438. They were using ushort instead of short during the conversion/casting. So I would get correct readings down to 32 deg F  or 0 deg C but then once it tried to read below that it would  show readings in the 7k range this is all because ushort only allows positive values. Thanks for the attempt in lending a hand, I appreciate it! 

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 awthorn

awthorn

    New Member

  • Members
  • Pip
  • 6 posts

Posted 21 April 2013 - 01:26 PM

Good day everyone! Netduino noob here and I am having an issue with a project I am working on. I have a ND2+ hooked up to a bread board with the proper connections going to the ND2+. I have two DS18B20 temperature sensors hooked up in parallel one on the board and the other through a CAT5 cable, about 15 ft long, that is soldered to another sensor. 

 

The issue I am having is when i put the sensors that i connected to the CAT5 in the freezer. I can watch my debug output of the temperatures drop and once it gets below 32 degrees Fahrenheit I start to get readings in the 7k range. Which if that is the case I don't think my ice cream is good anymore. If I bring the sensor out of the freezer and it starts to get warmer the readings start to normalize. If I stick the sensor in my fridge it will get down to 35 deg and read fine for hours. It appears to have something to do with temperatures under 32 degrees.

 

 

Has anyone had any similar experiences? Thank you all for your help!



#2 ziggurat29

ziggurat29

    Advanced Member

  • Members
  • PipPipPip
  • 244 posts

Posted 28 April 2013 - 04:09 PM

just a wag since I can't see any code, and this a 1-wire device so I assume you are using a lib of some sort; but 32 F = 0 C.  So...  are you perhaps interpreting the 2s complement as positive?



#3 awthorn

awthorn

    New Member

  • Members
  • Pip
  • 6 posts

Posted 29 April 2013 - 12:11 PM   Best Answer

Ziggurat29, I am sorry I just realized I posted this in two different places on the forum. I found a solution to the problem thanks to another forum member. There was a data type issue in the code I was using from http://www.tinyclr.c...hare/entry/438. They were using ushort instead of short during the conversion/casting. So I would get correct readings down to 32 deg F  or 0 deg C but then once it tried to read below that it would  show readings in the 7k range this is all because ushort only allows positive values. Thanks for the attempt in lending a hand, I appreciate it! 







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.