Shop OBEX P1 Docs P2 Docs Learn Events
Sensirion SHT11 data transmission distance — Parallax Forums

Sensirion SHT11 data transmission distance

charlieknoxcharlieknox Posts: 27
edited 2009-05-17 08:48 in Accessories
The Sensirion SHT11 sensor ( http://www.parallax.com/dl/docs/prod/acc/SensirionDocs.pdf·) sends serial data on temp & humidity to the Basic Stamp.· Does anyone know how far away the sensor can be from the Stamp, without losing the message?· What suggestions do folks have regarding data transmission about 35 feet away?· I'm talking numerous sensors here, so wireless is probably not feasible.

Thanks !!

Charlie

Comments

  • Mike2545Mike2545 Posts: 433
    edited 2009-05-13 22:50
    Serial data can be transmitted with cables of about 15 feet or less. With a RS-232 driver/receiver pair, you would be able to transverse the distances you are talking about easily.

    Check out Maxim here:
    www.maxim-ic.com/quick_view2.cfm?qv_pk=1798

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike2545

    This message sent to you on 100% recycled electrons.

    Post Edited (Mike2545) : 5/13/2009 11:54:27 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-13 23:42
    I believe the SHT11 uses the SPI protocol. This is designed for high speed use with a nearby microcontroller. You could probably use it over a few feet. As you get beyond 2 or 3 feet, you'll need special cable and maybe buffers. Over 35 feet, you'll need to use a microcontroller like a Stamp to receive the data and reformat it, probably into asynchronous serial and use RS232 or RS485 to transmit/receive the signal over the longer distance.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2009-05-14 05:13
    Charlie, I wouldn't give up on it, for 35 feet. The enemies are 1) signal degradation due to cable capacitance, and 2) externally coupled noise 3) possible ESD (lightning or user shuffling on carpet). At 35 feet those should be manageable. At worst for (1), you would have to write a subroutine to "bit-bang" the SPI at a rate slower than the internal rate of the Stamp's SHIFTIN and SHIFTOUT commands.
    -- pullup resistor on the DTA line can be reduced to 2.2 kOhm or less in order keep good signal edges.
    -- filter capacitor on power supply line at each Sensirion
    -- shielded cable if necessary
    You can probably drive all of the clock lines from one Stamp pin, but be sure to include a pulldown on the clock line (~5k)


    Back of napkin calculation: 35 feet of cable, about 0.001 µF total capacitance, and with a 2 kΩ pullup, time constant = 2 microseconds, compared with ~65 microsecond clock period of BS2 SPI.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2009-05-14 18:12
    To see, because this question comes up from time to time, I hooked up an SHT75 to a 50 meter (164 foot) cable. It worked! And this was with a 10 kohm pullup resistor. The rise time from low to high on the data line was pretty slow, but the time to arrive at the 1.4 volt Stamp threshold was about 30 microseconds, which was evidently fast enough. Taking the dta pullup resistor down to 1 kohm did indeed speed up the low to high transition, to about 8 microseconds to threshold, and of course the data was still good.

    The cable was Belden 88723, 4 conductor shielded.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2009-05-17 08:48
    The Sensirion SHT1X sensors use a custom protocol similar to I2C. (When the SHT21 comes out in September, it will use actual I2C) Since it uses a custom protocol, every code example I have seen (BS2, SX, Cypress PSoC, and MSP430) bit-bangs the clock and data lines to execute the protocol. The clock speed does not have a minimum requirement, so you can run the clock slower if you have issues over long cable lengths. However, the sensors are very stable at large distances using the sample code from Parallax without any changes if your wiring is "clean". If you look at the following thread, you'll see a post from me on 12/16/07 where I explained how I used 208 feet of Cat 5 cable with one of my SHT11 designs and had no problems. http://forums.parallax.com/showthread.php?p=690671

    When using Cat 5, I use this pinout for the cable:
    Cat5
    SHT11
    Blue
    Vdd
    Blue/Wht
    Clock
    Green
    Gnd
    Green/Wht----Data

    Having the clock paired with Vdd and the data line paired with Gnd seems to work well. I have 6 of these sensors currently installed on various lengths of Cat5 in my house ranging from 12 to 84 feet. Eventually, I will have my "control panel" complete for my custom thermostat, so I can actually have all of them in use at the same time. Currently, they sit installed, but unpowered. (my almost non-existent free time currently goes to learning SXB/SX and the Cypress PSoC)

    My Sensirion SHT1X module design is slightly different than the one Parallax makes (see attached schematic/picture), but you can add the extra parts to your circuit if you are using the Parallax sensor and have issues at 35 feet. All of my programs using the SHT11 sensors are based on Parallax's sample code without any added pause statements to slow down the clock. Even my conformally coated module with the IP67 waterproof cap runs at "sample code speed" while submerged in icewater. See my polar bear plunge datalogger: http://forums.parallax.com/showthread.php?p=792332

    The Belden 8723 that Tracy mentions is excellent cable as well and if you are as lucky as me, your local Home Depot sells it (and Cat5) by the foot. I have also used "Silver Satin" (flat 4 conductor phone line), but only up to 20 feet.

    good luck.....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andrew Williams
    WBA Consulting
    IT / Web / PCB / Audio
    1476 x 983 - 524K
    1257 x 401 - 63K
Sign In or Register to comment.