Shop OBEX P1 Docs P2 Docs Learn Events
Wiring help for 28018 Sensirion to Propeller BOE — Parallax Forums

Wiring help for 28018 Sensirion to Propeller BOE

smithdavidpsmithdavidp Posts: 146
edited 2012-04-08 01:32 in Accessories
I can't seem to find an entry point for Data lines to Pin28 (SCL 12C Clock) or Pin 29 (SDA 12C Data). The spin code shows both of these lines being used as clock reference and data output. I know that there is clock access at socket X at the J5 header (Serial side 4th on the right) but it seems that the data side is not accessable. Would the data pins at the AD/DA header (Sockets 0 and 1)be connected to pin 29? Did I buy the wrong thing?

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-04-06 12:30
    I think the socket "XI" connects with the crystal. You don't want to use that.

    Pins 28 and 29 are accessible on the bottom the PropBOE (you didn't mention which board you're using, so I assumed the PropBOE since your other post mention it). The "Surface Mount Playground" has all the Prop pins except 20 and 21 broken out to it.

    You don't have to use pins 28 and 29 to communicate with the sensor. If you change the pins in the object and add pull-up resistors to those lines, you can use other Prop IO pins.

    I think the object in the OBEX for the Sensirion humidity sensor is a bit out of date (though it should work). I think I may have a modified version using F32 which is the faster, smaller floating point object than the floating point object used in the OBEX version.

    I'll see if I can find it and post it here.
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-04-06 12:43
    Yes...it is the Prop BOE. I thought about just using Pin 6 and put the clock line to ground. I am very grateful for your time and assistance. Thanks Duane.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-04-06 12:49
    Yes...it is the Prop BOE. I thought about just using Pin 6 and put the clock line to ground. I am very grateful for your time and assistance. Thanks Duane.

    The clock line is used to transfer data. The sensor will not work with the clock grounded.

    I'll walk you through this if you'd like.

    Are you using a serial LCD? If so what size?

    The code I have uses a 4 x 16 (4 x 20 I don't remember right now) LCD. I have other LCDs as well.

    If I can match your hardware, then we should be sure my software will work with your hardware.

    Once I know your LCD size, I'll modify my code to match your hardware.
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-04-06 13:01
    That is next on my shopping list. I am using is the Parallax Serial Terminal. I'm a disabled Vietnam Vet so I have to wait until the next check rolls in. That will be the 18th so I can wait until then. If necessary I will purchase a different temperature sensor then as well. For part of my project I will need temperature sensors that do not require a clock. They will be married to an XBee module. Thank you for all the help.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-04-06 13:11
    Actually using PST will make it easier for now.

    I'll use a different set of pins to communicate with the sensor than pins 28 and 29. Which two pins do you want to use?
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-04-06 13:17
    P0 and P1 are tied up by the XBee and P 14 - P18 are tied up by 3 servos, Ping, and PIR, and P7 is tied up with the GPS so can we use 5 & 6?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-04-06 14:34
    Here's a demo using F32 for floating point calculations.
    I used P5 for I2C clock line and P6 for I2C data.
    I used 10K pull-up resistors on both lines. (I'm not sure if they are needed or not.)

    Here's want the output looks like.
      Temp C =  22.5°C
      Temp F =  72.5°F
      Humidity =  33.4%
      Dew Point =   5.6°C,  42.1°F
    
    

    The values are checked once a second. If there is a change from the previous values the new values are written to the terminal window.

    This demo doesn't use the built in heater at all. I'm not sure if the object supports using the heat or not.

    I tried this out on my PropBOE so hopefully it will work with yours.
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-04-06 14:49
    I will build the circuit the same as you did. I am very grateful. Thank you for the hard work. I will let you know shortly ho it works
  • WBA ConsultingWBA Consulting Posts: 2,933
    edited 2012-04-06 15:03
    @Duane: Nice work on setting up the demo to answer the post!

    @smithdavidp: Don't bother with anything related to the heater unless you plan on using it in a very high humidity environment or near/below freezing. I have a lot of code examples scattered across the forums, just use a google site restricted search using "sensirion" or "SHT" or "SHT11" as keywords. So enter this in a google search box:

    sensirion sht site:forums.parallax.com

    Also, I have some information and links to several other sites related to using the Sensirion on my former SHT11 Module page and on the forum thread about it.
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-04-06 15:13
    Temp C = 29.9 C
    Temp F = 85.7 F
    Humidity = 15.8%
    Dew Point = 1-1 C, 34.0 F

    It works great!!!!! You sre the man Duane!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-04-06 15:23
    @Duane: Nice work on setting up the demo to answer the post!

    @smithdavidp: Don't bother with anything related to the heater unless you plan on using it in a very high humidity environment or near/below freezing. I have a lot of code examples scattered across the forums, just use a google site restricted search using "sensirion" or "SHT" or "SHT11" as keywords. So enter this in a google search box:

    sensirion sht site:forums.parallax.com

    Thank you for the information. I am pretty sure this will wind up helping more people then just me. Like I said before. Parallax is one of the last, few, companies that care about their customer base large or small. Just come to Detroit for a couple hours and you'll see what I mean. I have never been more happy with any product as I am with all of the Parallax products I have purchased in the past few months.

    Also, I have some information and links to several other sites related to using the Sensirion on my former SHT11 Module page and on the forum thread about it.
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-04-07 06:01
    Footnote: I decided to clean the wiring up on my breadboard. I decided to use the 3.3 voltage instead of the original 5 volts. The sensor quit working. After testing connections I replaced the 10k pull up resistors with jumper wires. The sensor started working again.
    Resistor Removed 001.jpg
    1024 x 768 - 84K
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-04-07 07:07
    David,

    I'm glad it's working.
    I'm not sure how much you know, so I don't know if you know what a "pull-up resistor" is.
    Normally you wouldn't "replace" a pull-up resistor with a jumper wire, you'd just remove the pull-up resistor since it is used in addition to a jumper wire.
    I should have explained the wiring I used better.

    I used 3.3V for Vdd as you have it now. Vss connected to "GND" header.

    The data lines were connected as you have them plus a 10K resistor running from the breadboard data and clock lines (one each) up to 3.3V.

    I2C usually has both lines (clock and data) pulled high with the devices communicating driving the lines low when needed. This lets multiple devices share the same clock and data lines. Each device has an address to know when the uC is trying to communicate with it and not some other device on the bus.

    You're welcome for the demo. I want to make it clear, I just wrote a little interface program to display the data to PST. The people who wrote the objects I used did, by far, most of the work.

    @Andrew, Thanks for you kind words. I've used several of your projects as starting points for my own projects. Thanks for posting your work.
  • smithdavidpsmithdavidp Posts: 146
    edited 2012-04-08 01:32
    Thanks for explaining this to me. I will be honest I have never been an expert at anything but I have been good ar figuring out a lot of things. I always thought that a pullup resistor was used to pull a signal high whrn the device was not capable of doing it by it self. And the pull down resistor was to cause a signal to be low to cause a normally on device to go into a wait state. Once the power was removed from the device then it would be normally low or off. The only formal electronics training I have had was a 8 week course through General Motors. The course was mandatory to work on the newer Cadillacs that were comming out. That was about the time that they started using body controll modules as well as engine controll modules in their cars. But that was 25 yeard ago. I am still grateful to you for the help. You still had to know what, and where, the resources were in order to help me. Thank you once again.
Sign In or Register to comment.