+ Reply to Thread
Page 1 of 4 1234 LastLast
Results 1 to 20 of 79

Thread: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

  1. #1

    Default Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    I was looking around the internet and found out that 2 wire is the same as I2C, but I2C is a trade mark from Philips.

    as mentioned in this forum link from AVR Freaks (correct me if i'm wrong)

    So with a PCF8574P IO expander , I'm going to hook up 2 of the sensors mentioned above. Ill add more later if it works.

    I'm using the basic stamp sx micro-controller module.

    I found this on parallax from the nuts & volts I2C example

    I
    f the are other examples can you direct me to them? or have any recommendations?

  2. #2

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    The sensor ion sensors are not I2C.protocall while they do have the same two type of connections they will not work with an I2C lib

  3. #3

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    So I can't use the I2C library because the sensor are not I2C, but can I still use the IO expander with the sensor?

  4. #4

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    From the Sensiron SHT11 datasheet, it's clear that the device is not I2C. It shares many of the low level signal characteristics, but is missing two components: a device address and an ACK/NACK after every eight bits.

    For the first point, you could probably still use the sensiron sensor in an unmodified I2C setup. You'd just have to pretend that it was 6x as many devices (one for each command).

    The second point is more of a problem. I2C assumes that each 8 bits comes with an ACK/NACK from the receiver. From page 7 of the datasheet, you can see that it transmits up to 16 bits without an ACK/NACK. I think this could be a problem in some hardware based I2C drivers.

    Of course, the best thing you could do would be to test and see what happens. Electrically, the signals are compatible so it should be safe for the chips.

    Edit: I should have been more careful: I see the ACK/NACK now. Yes, I think you can use it on an I2C bus. You'll have to do some experimentation to get command sequence working, and you'll have to make sure that you don't accidentally reset the device with the RESET command, but it looks like it (more or less) compatible.

  5. #5

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    Would I have an issue with the sensirion because it douse not have any address pins?

  6. #6

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    Quote Originally Posted by Cree View Post
    Would I have an issue with the sensirion because it douse not have any address pins?
    I2C does not use address pins. All I2C has is CLK and DATA.

  7. #7

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    Ok, well first I'm going to try to get the PCF8574 to work with the I2C example that's in the nuts and volts just to get the initial portion to work. (with out the sensor)

  8. #8

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    so far i'm getting an error

    (error: no ACK from PCF85754)

    This is just one PCF8574P conected to see if it would work properly.

  9. #9

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    You'll have to post some source code if you want more detailed help...

  10. #10

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    sry, found out it was a wiring issue.

  11. #11

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    k so I got the PCF85754 to work, but how do I go about connecting my sensirion.

    It has a 2 wire serial communication. is it possible to send and receive data through the pcf8574p?

  12. #12

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    The issue that I have is this that I found in the data sheet.

    2.2
    Serial Interface (Bidirectional 2-wire) The serial interface of the SHTxx is optimized for sensor
    readout and power consumption and is not compatible with
    I2C interfaces, see FAQ for details.

  13. #13

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    Quote Originally Posted by Cree View Post
    The issue that I have is this that I found in the data sheet.

    2.2
    Serial Interface (Bidirectional 2-wire) The serial interface of the SHTxx is optimized for sensor
    readout and power consumption and is not compatible with
    I2C interfaces, see FAQ for details.

    I don't know where you're getting that from. This is what I see in the datasheet:

    The serial interface of the SHT1x is optimized for sensor
    readout and effective power consumption. The sensor
    cannot be addressed by I2C protocol; however, the sensor
    can be connected to an I2C bus without interference with
    other devices connected to the bus. The controller must
    switch between the protocols.
    You'll need to make sure that what you send (from your microcontroller) falls within the specs given in the datasheet. If you use an I2C object/command, then you'll need to study up on the I2C protocol so you can figure out how to hack it to fit into the protocol required by the Sensiron sensor. I don't know if what you're using is amenable to that. At the very least you could bitbang the two signals (CLK and DATA) and have a slow but functional interface.

  14. #14

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    K, I think there may be confusion on what we are trying to talk about, let me rephrase myself in what I am trying to do. (I'm not using the PCF8574p anymore)


    I am trying to use multiple sensirion temp/humidity sensors (2 wire serial communication). But my issue is that they do no have addresses and is not I2C. I have gotten a single to work and now i am trying to use multiple. I'm sure if I had multiple sensors in an I2c set up I would be able to get data from them, but I wouldn't be able to tell which one is which.
    Last edited by Cree; 06-11-2013 at 04:33 PM. Reason: change in design

  15. #15

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    One possible solution would be to use a CD4051 (74HC4051) analog multiplexer with the common point connected to a Stamp pin, and each of the 8 mux points connected to the data pin of a sensirion and to its own pullup resistor. The clock line can be shared. The CD4051 also needs 3 address lines from the Stamp, to select one sensirion at a time. So that is 5 Stamp pins for 8 sensirions.

    Another way I've used 8 on one Stamp: each has its own data pin, the clock line is shared, so 9 pins for 8 sensirions.

    Sensirion also offers the SHT21 with true i2c, but it has only one address possibility, no solution to your problem.

  16. #16

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    Quote Originally Posted by Tracy Allen View Post
    One possible solution would be to use a CD4051 (74HC4051) analog multiplexer with the common point connected to a Stamp pin, and each of the 8 mux points connected to the data pin of a sensirion and to its own pullup resistor. The clock line can be shared. The CD4051 also needs 3 address lines from the Stamp, to select one sensirion at a time. So that is 5 Stamp pins for 8 sensirions.

    Another way I've used 8 on one Stamp: each has its own data pin, the clock line is shared, so 9 pins for 8 sensirions.

    Sensirion also offers the SHT21 with true i2c, but it has only one address possibility, no solution to your problem.
    Ya had looked at the SHT21, the only solution to my problem would be to get a temp sensor with addresses.

    I figured a way arround it to use switches, but that would end up having more wires, which is not what I wanted.

  17. #17

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    Quote Originally Posted by Cree View Post
    Ya had looked at the SHT21, the only solution to my problem would be to get a temp sensor with addresses.
    The SHT21 has both temperature and humidity in the same device: http://www.sensirion.com/en/products...-sensor-sht21/

  18. #18

    Default Re: Is I2C & 2 wire communication for sensirion temperature/humidity sensor

    Quote Originally Posted by SRLM View Post
    The SHT21 has both temperature and humidity in the same device: http://www.sensirion.com/en/products...-sensor-sht21/
    That is not the issue, its that I need to use multiple sensors and that they do not have addresses to tell which sensor is which.

    If these sensors had addresses it would solve my problem.

  19. #19

    Default Counting pushbutton

    Hi I'm trying to create a counter in order to change the pin in which I am sending my clock pulses to a different sensor every time I push a button.

    My issue is that I am getting an error that symbol is already defined and my first if function is highlighted.

    this what I have in a subroutine:

    Clockcounter:
    IF (senscnt > 5) THEN
    senscnt=0
    NEXT


    IF PIN 17 = HIGH THEN
    senscnt=snscnt+1
    NEXT ,


    IF (senscnt = 0) THEN
    clock PIN 2
    NEXT
    IF (senscnt = 1) THEN
    PIN 2 = 0,
    clock PIN 3
    NEXT
    IF (senscnt = 2) THEN
    PIN 3=0,
    clock PIN 4
    NEXT
    IF (senscnt = 3) THEN
    pin4=0 ,
    clock PIN 5
    NEXT
    IF (senscnt = 4) THEN
    pin5=0 ,
    clock PIN 6
    NEXT
    IF (senscnt = 5) THEN
    PIN 6=0,
    clock PIN 9
    RETURN

    I learned to make a counter in C, but it seems to have to be done differently in basic stamp.
    Last edited by Cree; 06-12-2013 at 09:25 PM.

  20. #20

    Default Re: Counting pushbutton

    Simply how do you count the number of presses on the push button.

+ Reply to Thread

Similar Threads

  1. Sensirion Temperature/Humidity Sensor on off
    By Dmagee in forum BASIC Stamp
    Replies: 3
    Last Post: 07-16-2013, 02:19 PM
  2. Sensirion Temperature/Humidity Sensor
    By RancheroMan in forum General Discussion
    Replies: 9
    Last Post: 08-13-2007, 11:50 PM
  3. Replies: 10
    Last Post: 08-25-2006, 01:09 AM
  4. Replies: 2
    Last Post: 10-02-2005, 07:32 AM
  5. Sensirion Temperature/Humidity Sensor
    By Archiver in forum BASIC Stamps Archive
    Replies: 5
    Last Post: 07-07-2004, 03:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts