Shop OBEX P1 Docs P2 Docs Learn Events
Trying to use the SHT11 module — Parallax Forums

Trying to use the SHT11 module

DuckyDucky Posts: 6
edited 2006-04-12 07:23 in BASIC Stamp
Anyone
I don’t ask for help often. But this one has me stumped. I am trying to use the SHT11 module. No luck, just getting garbage.
·
Using the program files:
'·· File...... SHT1x.BS2
'·· Purpose... Interface to Sensirion SHT1x temperature/humidity sensor
'·· Author.... Jon Williams
'·· E-mail.... jwilliams@parallaxinc.com
'·· Started...
'·· Updated... 28 SEP 2002
'
'·· {$STAMP BS2}
'· ·{$PBASIC 2.5}
·
And
·
'{$STAMP BS2}
' {$PBASIC 2.5}
' SHT15.bs2 version C
' (c) 2002, 2004 Tracy Allen, http://www.emesystems.com
' access the Sensirion model sht11 or sht15
·
This is what DEBUG reads for each program:
·
SHT1x Demo (Jon)


soT...... 65535
tC....... 615.3º
tF....... 1139.5º
·
soRH..... 65535
rhLin.... 2623.1%
rhTrue... 471.8%.
·
And (Tracy)
·
······· -40.0·· 8191··· %RH=139.8······ %RHtc=96.5
······· -40.0·· 8191··· %RH=139.8······ %RHtc=96.5
······· -40.0·· 8191··· %RH=139.8······ %RHtc=96.5
······· -40.0·· 8191··· %RH=139.8······ %RHtc=96.5
······· -40.0·· 8191··· %RH=139.8······ %RHtc=96.5
······· -40.0·· 8191··· %RH=139.8······ %RHtc=96.5
······· -40.0·· 8191··· %RH=139.8······ %RHtc=96.5
······· -40.0·· 8191··· %RH=139.8······ %RHtc=96.5
·
·
A while back I smoked a Stamp so I figured maybe I did it again and smoked this module. Well I went to Parallax and got another one. It does the same, Even tried the resister on the clock lead, nothing different. Confirmed I have power to the module also with a volt meter.·jumpin.gif·
·
I plugged in my Parallax Logic Analyzer (just love that thing). It looks like the device is not talking. It also confirms there is power. I can send anyone·the SHL11.sla file if that would help, it is 4 MB. ·
·
Just to make sure the Stamp pins were OK, I loaded up a DS1620 file and the Stamp/pins (P0,P1,P2) work just fine. Temperature matches my thermometer.
·
No hints from the Parallax Forum either.
·
Any ideas ?? Am I that unique ??··This is my first post to the forum, hope I did it correctly.
·
Sacramento

Comments

  • NewzedNewzed Posts: 2,503
    edited 2006-04-08 23:18
    Do you have a pull down resistor on Pin 3?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Do you have a Stamp Tester yet?
    http://hometown.aol.com/newzed/index.html

    ·
  • DuckyDucky Posts: 6
    edited 2006-04-08 23:50
    Sid
    Thanks for the quick response and link to your web page. Interesting stuff!!

    I suspect my Stamp is OK. Right now I have the Parallax Logic Analyzer piggy-backed on to my Stamp. The Stamp is running a DS1620 temp sensor program and it seems to be working just fine. I can heat and cool the DS1620 sensor and the readings track. The activity on the pins looks normal on the analyzer display.

    This has got to be something simple !! One of those days.
  • NewzedNewzed Posts: 2,503
    edited 2006-04-08 23:59
    You didn't answer my question abou the pull down resistor.· Do you have Expresspcb?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Do you have a Stamp Tester yet?
    http://hometown.aol.com/newzed/index.html

    ·
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2006-04-09 01:54
    The result you are getting is all ones in the returned data for both humidity and temperature. Try the 4.7 resistor from the SCK line to ground, like Sid suggested. The symptom of it not being present is exactly what you are seeing, all ones in the returned data. Most SHT11s work most of the time correctly even without that pulldown resistor, but the resistor should always be included to be sure. Check again that you have the data and SCK pins connected as specified in the programs.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • DuckyDucky Posts: 6
    edited 2006-04-09 12:24
    Tracy/Sid
    Oh yes I tried the resister to ground on pin 3 and capacitor between the Vdd/Vss. Tried both places, at the board and at the module. Wires to the module are twisted pair approx 6" long. They are soldered to a socket.

    One thing that might be getting me is that the devlopment board I am using is the industrial one, the one with the ULN2803 on each port. I connected to the Stamp side, just before the 2803. Could it be that the 2803 is interfereing with the signals. Attached is a trace from my USB scope. Red is pin 1 (data rail), Blue is pin 3 (clock). I suspect that the data rail in nor suppoesed to be swinging 2 volts plus and minus.
  • DuckyDucky Posts: 6
    edited 2006-04-09 12:26
    duh, the picture
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2006-04-09 17:59
    It is a good bet that the ULN2803 will affect the result. It acts like a low impedance, a pull-down, that would contend with the pullup on the SHT11 data line. Can you find a pin that does not have a ULN2803, or cut the trace?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • DuckyDucky Posts: 6
    edited 2006-04-09 19:05
    Tracy
    I will go one step further and put a Radio Shack board together, then move my Stamp over to it. That should clear up the issue once and for all.
    BTW, assuming that solves the problem, what is your experience as to how far you can extend the SHT11 from a circuit board? I am hoping I can get about 5' to 6'. Is shielded cable recommended or can I get by with twisted pair such as in CAT6? Is the pull down resister best placed nearest the module or nearest the Stamp pin?
    I know lots of questions. But I sure would appreciate it.
    Thanks, Ducky
  • NewzedNewzed Posts: 2,503
    edited 2006-04-09 19:16
    Ducky, the board I designed with the SHT for a customer had the SHT about 50 inches from the Stamp and we had no problems.

    As for the pulldown, it really isn't too important where you put it, just so long as it is within 2 or 3 inches of the SHT

    .



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Do you have a Stamp Tester yet?
    http://hometown.aol.com/newzed/index.html

    ·
  • DuckyDucky Posts: 6
    edited 2006-04-12 07:23
    Tracy
    Well you were right. I moved the Stamp from the developement board to a breadboad and everything started working just fine, 77.9 deg and 41% RH. Obviously the 2801 was dragging me down. Guess it is tme to get a simple board.

    Thanks for the help. hop.gif
    Ducky
Sign In or Register to comment.