Shop OBEX P1 Docs P2 Docs Learn Events
BS2 and four SHT1X Sensirions or DS1620 temp sensor — Parallax Forums

BS2 and four SHT1X Sensirions or DS1620 temp sensor

WavemanWaveman Posts: 20
edited 2007-06-12 15:46 in BASIC Stamp
Hello!

Any good suggestions on interfacing four SHT11 Sensirion temp/humidity sensors to the BS2? Or four DS1620 Sensors?
I was told that the Sensirion's can all run off the same clock. I want to place in four locations about 20' feet apart.
I am currently using the sample code from the SHT11 and need to know some steps how to modify to add three more.

Thanks,

WaveMan

Comments

  • PaulPaul Posts: 263
    edited 2007-05-24 03:08
    www.emesystems.com

    The DS1822 has a internal serial number that can be sent to identify which sensor is reporting but I think it takes the faster BS2Px chips to get I2C interface.

    Post Edited (Paul) : 5/24/2007 3:23:08 AM GMT
  • WavemanWaveman Posts: 20
    edited 2007-05-24 03:57
    Hello Paul,

    I will look into the DS1822 sensor. I was actually·now thinking of interfacing four DS1620's and using the GPIO pins on my BS2 and my PBASIC program to identify the sensors. I am using the·STAMPDAQ.xls program and assume that I can identify the various sensors interfaced to the GPIO Pxx pins via DEBUG or SEROUT? Creat an Excel graph for the four temps. Just want to know any coding suggestions, if you have them, in doing this?

    thanks,

    Waveman
  • WavemanWaveman Posts: 20
    edited 2007-06-05 23:16
    Paul,

    Got my three DS1620's working well with BS2, but want to now add the SHT11, but can't due to SHT11 not having enable pin. DS1620's have the RST line for enable, where the SHT11 does not. So, can't have DS1620/SHT11 work off the same clock.

    Any source code for DS1822 with the BS2pe available?

    Thanks,

    WaveMan
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-06-05 23:34
    Just give each SHT11 its own data line. It is okay to run all 4 from the same clock line. So 5 BS2 pins for 4 SHT11s. You can probably use the same clock for both the DS1620s and the SHT11s, unless there is simply too much cable involved.

    There is some code for the DS18B20 here
    I'm not up on how that differs from the DS1822. The '18B20 has 12 bit resolution.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • WavemanWaveman Posts: 20
    edited 2007-06-07 22:54
    Tracy,

    I found out from Parallax that you can't run the SHT11 and DS1620 off the same clock. This is due to the SHT11 not having an enable (EN or RST as on the DS1620). They recommended going to the BS2p and use the 1-Wire feature available on the DS1820/22.

    Also, your code for the·SHT11, SHT11.BS2,·is this also for the BS2p? I am new to these things...

    Thanks!
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-06-08 16:27
    I don't agree about not being able to share the clock. Leave the SHT11 data line at a low level while addressing the DS1620s or the other SHT11s. That leaves it in a "stopped" state. It takes a special sequence to bring it into the "start" state (data line goes high to low while clock is high). Each SHT11 takes a different data pin on the Stamp.

    In general I do not recommend I2C devices with SPI devices, but the SHT11 is not a typical I2C device. Are you running out of pins on the Stamp?

    The SHT11.BS2 code should work fine on the BS2p.

    For what you want to do, the DS1820/22 should be fine. Be careful with the part numbers. Dallas Semi has a habit of making minor changes in part numbers that in fact require significant changes in code. The DS18B20 (12 bit resoltion) is different from the DS18S20 (9 bits).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • WavemanWaveman Posts: 20
    edited 2007-06-08 20:42
    Tracy,

    You are correct! Activate·the clock·for the DS1620's, then the SHT11 and data looks good.

    The heater on/off routines are they for evaporating any moisture·on the SHT11 humidity sensor?

    Are·they required for every measurement?

    Thanks
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-06-09 00:45
    The heater is not of much use.. Leave it off. I suppose it could bring the sensor a little bit above the dew point to drive off moisture in marginal situations, but I have never used it in a real application. I've only used it in the demo to illustrate its operation, because it's there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • WavemanWaveman Posts: 20
    edited 2007-06-12 15:46
    Thanks and will remove·the heater·part of the code. As for·running out of pins, yes I am! The DS1822 will help me·with·freeing up pins for other applications.·Any suggestions on·cabling for the DS1620 or DS1822 sensors? Do you guys use a shielded cable·to reduce potential RFI/EMI affects?·I was planning to use such a cable.

    Thanks...
Sign In or Register to comment.