Shop OBEX P1 Docs P2 Docs Learn Events
One-wire demo trouble.. HELP!!! — Parallax Forums

One-wire demo trouble.. HELP!!!

C-64C-64 Posts: 1
edited 2008-11-24 05:27 in Propeller 1
I'm having trouble with the OW demo spin programs.

OW-SearchDemo works fine. All attached sensors serial numbers are reported.

OW-Demo1 reads the same temperature every time (10.6 degrees celsius)

I use the ds1820 sensor. The demo is for ds1822. Is that the problem?
The 1-wire documentation for those sensors looks the same.
Can it be fixed??

Comments

  • parts-man73parts-man73 Posts: 830
    edited 2007-09-19 13:49
    I know there is 3 different versions of the DS1820.
    • DS1820
    • DS18B20
    • DS18S20

    and although the parts numbers are similar, they are not interchangeable. I believe that the DS18S20 is actually labeled "DS1820" they omitted the "S" when labeling the parts. I may be wrong, but I believe I remember reading that on a forum for a different ucontroller. I did some searching before writing this reply, but couldn't find that reference.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Brian

    uController.com - home of SpinStudio
  • AndrewQAndrewQ Posts: 2
    edited 2008-11-13 09:13
    I am having the same issue as C-64. My DS18S20 is showing up properly in OW-SearchDemo, OW-Demo1 is showing 10.6C/51.1F and isn't changing if I heat the part.

    I just started playing with this part and I'm going to check the actual bytes it outputs now, although if anyone else has any further information on this, that would be great.

    AndrewQ
  • Jay KickliterJay Kickliter Posts: 446
    edited 2008-11-13 11:54
    I was having the same problem, and it turned out that using parasitic power wasn't working. I believe I fixed it by having both a pull-up resistor on the data line, and 3.3v on the power pin.
  • AndrewQAndrewQ Posts: 2
    edited 2008-11-22 12:54
    I am still not getting good data, I am using powered mode with a 4.7k pullup to 3.3V on data. OW-search shows the device.

    I modified the OW-demo routine to get all 8 bytes from the scratchpad - they are $AA,$00,$4B,$46,$FF,$ff,0C,$10

    The CRC is correct (byte 9) but the actual data is junk and doesn't change with temperature fluctuation.

    I found several references to the fact that the $aa means that the conversion hasn't completed so I did a hard-coded 1 second wait with the same results.

    I have tried multiple DS18S20s with the same results.


    Anyone have any ideas?

    Thanks - Andrew
  • ElectricAyeElectricAye Posts: 4,561
    edited 2008-11-24 05:18
    Parts-man might be correct that the various versions of DS1820 might not be interchangeable. With the one wire demo I found that the DS18B20s worked as advertised when I used them in non-parasitic mode, but the DS18B20 "parasitic" (PAR) version didn't work at all in parasitic mode, though I suppose I might have messed up its wiring or something else totally dumb. (Probably the PAR designation is just a Digikey thing and the two DS18B20's were actually the same part.) In any case, I can vouch that the DS18B20 seems to work with the one wire demo in non-parasitic mode. I've had up to 6 of them running on a single wire with no problems so far.

    Mark

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    It might be the Information Age but the Eon of Ignorance has yet to end.
  • BradCBradC Posts: 2,601
    edited 2008-11-24 05:27
    ElectricAye said...
    Parts-man might be correct that the various versions of DS1820 might not be interchangeable. With the one wire demo I found that the DS18B20s worked as advertised when I used them in non-parasitic mode, but the DS18B20 "parasitic" (PAR) version didn't work at all in parasitic mode, though I suppose I might have messed up its wiring or something else totally dumb. (Probably the PAR designation is just a Digikey thing and the two DS18B20's were actually the same part.) In any case, I can vouch that the DS18B20 seems to work with the one wire demo in non-parasitic mode. I've had up to 6 of them running on a single wire with no problems so far.

    Mark

    Parasitic mode can be fussy about the way you configure the power supply. You MUST have the hard pullup configured correctly and within the timing limits in the spec to ensure it works properly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cardinal Fang! Fetch the comfy chair.
Sign In or Register to comment.