Pages: 1 [2]   Go Down
Author Topic: 1 Wire DS18B20  (Read 3444 times)
0 Members and 1 Guest are viewing this topic.
Dee Why NSW
Offline Offline
Full Member
***
Karma: 5
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Stoopkid, I was thinking about this under the shower last night and realised I forgot to mention the local wiring.

I have all connections from the DS18B20 on the board, all to 3pin terminals.  Thus the common rail is there too. There is only one pull-up resistor, a 4k7.  That is all that is needed. I'm not sure this is critical but, if you had individual pull-ups, I imagine they would need to be of a different value. Further, your problem could be a pull-up of the wrong value, or missing altogether. That would at least be consistent to all your probes and therefore might explain your consistent errors.

Logged

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 433
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

el_supremo, I wired it like you said and got this:
Code:
ROM = 28 18 9E CF  0  0  0 52
ROM = 28 6F 73 D1  0  0  0 54

  Chip = DS18B20 ROM = 28 18 9E CF  0  0  0 52
present=1 prec=2 Data = B0 FD 0 0 1F FF 10 10 13  CRC=13
  Temperature = -37.0000 Celsius

  Chip = DS18B20 ROM = 28 6F 73 D1  0  0  0 54
present=1 prec=2 Data = B0 FD 0 0 1F FF 10 10 13  CRC=13
  Temperature = -37.0000 Celsius

or with just one chip:
Code:
ROM = 28 18 9E CF  0  0  0 52

  Chip = DS18B20 ROM = 28 18 9E CF  0  0  0 52
present=1 prec=2 Data = B0 FD 0 0 1F FF 10 10 13  CRC=13
  Temperature = -37.0000 Celsius

Nick, I am using just one pullup resistor with both chips in parallel with one another. I am using two 2.2k and a 330 in series, multimeter reads 4.66kohms. I don't believe that is the problem because I used several different values and got the same results and other functions, like identifying the chip, still works.

I have rewired it to be sure I am not having a brain fart. It's a pretty simple circuit so I am fairly sure I have not messed it up. The chips do not get hot.
Logged

Offline Offline
Edison Member
*
Karma: 43
Posts: 1557
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, the code is seeing both chips because otherwise it would not print "Chip = DS18B20" for each of them and the CRC code is correct so nothing is getting corrupted. It is definitely sending -37C but I have no idea why - unless they are in a deep freeze.

Pete
Logged

Where are the Nick Gammons of yesteryear?

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 433
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is that enough to confirm that they are defective? Or could they be counterfeit? I got them on ebay, can I be sure enough to ask for a refund?
Logged

Offline Offline
Edison Member
*
Karma: 43
Posts: 1557
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I got them on ebay
Aha. There's your problem.

Quote
can I be sure enough to ask for a refund?
Give it a try.

Pete
Logged

Where are the Nick Gammons of yesteryear?

Dee Why NSW
Offline Offline
Full Member
***
Karma: 5
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

multimeter reads 4.66kohms. I don't believe that is the problem because I used several different values and got the same results and other functions, like identifying the chip, still works.

I have rewired it to be sure I am not having a brain fart. It's a pretty simple circuit so I am fairly sure I have not messed it up. The chips do not get hot.

What you are doing sounds reasonable and, despite my comment about coincidences, the chips are looking suss.  Maybe it was a bad batch and the consistency lies there..

Still, where else would you get them but eBay? I got mine from 370589267459, they are fine and I am ordering five more. At $AU5.99. it's hardly worth fighting for a refund but if you get another from here and it does work,  you surely have a case! Besides, you might not be the only one complaining...

« Last Edit: November 11, 2012, 07:12:21 am by NickPyner » Logged

California
Offline Offline
Sr. Member
****
Karma: 3
Posts: 433
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The ones that aren't working are just the bare chips... I'm also waiting for a couple of ones similar to your with the probe, hopefully they will work better. Thanks.
Logged

Pages: 1 [2]   Go Up
Jump to: