Simulating a DS18B20


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by CocaColaKid View Post
    Has anyone simulated a DS18B20 temperature sensor with a potentiometer before? I need to do this for a project that has 5 of them running, each with its own I/O and not running on a 1-wire bus though. All of them are running in 12-bit mode too. I'm going to use another PIC to be the fake sensors but I'm not sure how to even start to get this work properly. I know I have to load an array of 9 bytes with the first two being the temperature and the last one being the CRC.
    I would suggest that trying to fake the data that would be returned by the sensors would be a nightmare. You would have to get Pic#2 to behave EXACTLY the same as a DS18B20.

    I would use 5 of the real sensors as someone else suggested but strap each one to one of the aluminium clad power resistors. you could then vary the current through the resistor to adjust the temperature sensed by each individual sensor.

    Many times in the past I have tried to fake data but it isnt a true test for the real world. Using the method above is still faking, but faking the environment not the hardware/software so should be much closer to a real world scenareo
    Keith

    www.diyha.co.uk
    www.kat5.tv

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Keith,

    Thanks for the advise but i need to be able to run them down to -25C and up to 30C. Power resistors wont work well for this type of testing though. I heat pump might work but requires a lot of power though.

  3. #3
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by CocaColaKid View Post
    Keith,

    Thanks for the advise but i need to be able to run them down to -25C and up to 30C. Power resistors wont work well for this type of testing though. I heat pump might work but requires a lot of power though.
    Was worth a try

    How about using the power resistors and sticking the whole assembly in the deep freeze. LOL
    Keith

    www.diyha.co.uk
    www.kat5.tv

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Computer String

    wouldn't it be possible to use your PC to output the binary or hex code expected from a 3 wire device? The data sheet has a table of temp to code conversion, why can not you simply send it frrom the serial port?
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Please help with code for DS18B20
    By fratello in forum mel PIC BASIC Pro
    Replies: 109
    Last Post: - 28th April 2013, 22:12
  2. Help with DS18B20 program
    By presario1425 in forum mel PIC BASIC Pro
    Replies: 38
    Last Post: - 22nd August 2012, 01:50
  3. Ds18b20 + 16f628a
    By Max Power in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 16th July 2009, 12:29
  4. DS18B20 interfers with Timer 2 interrupts
    By John_Mac in forum General
    Replies: 7
    Last Post: - 24th February 2009, 00:52
  5. DS18B20 error reading
    By Gaetano in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 29th August 2007, 17:21

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts