Shop OBEX P1 Docs P2 Docs Learn Events
DC-SS500 Temperature and Relative Humidity Sensor Module — Parallax Forums

DC-SS500 Temperature and Relative Humidity Sensor Module

mwpalmermwpalmer Posts: 2
edited 2010-04-18 10:29 in Accessories
Has anyone tried this sensor and or had any luck with it? If so how did you set it up and what did you do to code it? Thanks!
800 x 800 - 98K
800 x 800 - 100K

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-03-04 01:34
    From the datasheet (which it would have been nice to include) it seems to talk serial but I didn't go into depth with the sheet.
    www.sure-electronics.net/download/DC-SS500_Ver1.0_EN.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • mwpalmermwpalmer Posts: 2
    edited 2010-03-04 19:30
    Page 5 (adobe page 8) of the data sheet shows it to be 9600 8 n 1· with a sequence of "$sure COMMAD enter"·I know that pin 5 needs a high. Still no luck.

    I have attempted the serial connection and all it sends back is garbage. I have attempted the commands and settings in the data sheet as well all of the standard baud rates. Still no luck! Sorry about the data sheet, (slipped my mind)

    Thanks!

    Post Edited (mwpalmer) : 3/4/2010 7:36:18 PM GMT
  • FranklinFranklin Posts: 4,747
    edited 2010-03-05 02:18
    It might help if you attached your code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • RaKaRaKa Posts: 2
    edited 2010-04-16 15:16
    Does anybody has an idea who to connect to the DC-SS500 with an Arduino board via SPI interface? Please help me, here are my collecting informations about the sensor: www.kramer-home.de/humidity-sensor-dc-ss500.html

    Until now, I got no data from the sensor .... sad.gif


    Ralf Kramer
  • FranklinFranklin Posts: 4,747
    edited 2010-04-17 01:20
    Ralf, It looks like it talks regular SPI and arduino.cc has plenty of examples on how to talk to SPI. You connect /cs, sck, sdo and sdi to digital pins on the arduino and write code. Check out the arduino site.

    mwpalmer, It still might help if you attach your code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen

    Post Edited (Franklin) : 4/17/2010 1:28:04 AM GMT
  • RaKaRaKa Posts: 2
    edited 2010-04-18 10:29
    Thanks Stephen, here is my code, it is my first SPI project! (On my Homepage you can find the code and a picture from the ozsiloscope

    // Testscript SPI interface for humidity & temeratur sensor DC-SS500 from Sure Electronic
    // (c) 4-2010 by Ralf Kramer, feel free to copy the code !
    //
    // ******* does not work yet !!! why ?  *****************
    
    #include "Spi.h"
    
    //# already defined in Spi.h !
    //#define SCK_PIN   13        to sensor PIN 9  (SCK)
    //#define MISO_PIN  12          to sensor PIN 10 (SDO)
    //#define MOSI_PIN  11          to sensor PIN 11 (SDI)
    //#define SS_PIN    10          to sensor PIN 5  (/CS)
    
    byte humidity;                        //byte to store the humidity
    
    void setup()
    {
      digitalWrite(SS_PIN, HIGH);          // disable sensor SPI
        
      //    Configure SPI Control Register (SPCR) (All values initially 0)
      //     Bit  Description
      //       7  SPI Interrupt Enable    -- disable  (SPIE --> 0)
      //       6  SPI Enable              -- enable   (SPE  --> 1)
      //       5  Data Order              -- MSB 1st  (DORD --> 0) (Slave specific)
      //       4  Master/Slave Select     -- master   (MSTR --> 1)
      //       3  Clock Polarity          --          (CPOL --> 1) (Slave specific) ("Mode")  Should be 1
      //       2  Clock Phase             --          (CPHA --> 0) (Slave specific)
      //       1  SPI Clock Rate Select 1 -- }        (SPR1 --> 1) 
      //       0  SPI Clock Rate Select 0 -- } fOSC/4 (SPR0 --> 1) (125kHz)
      // SPCR = (1<<SPE)| (1<<MSTR) | (1<< SPR0);
      
      SPCR = B01011011;                    // ?????  125kHz
      
      delay(200);                          // wait
    
      Spi.mode(SPCR);                      // C
    
      delay(300);                          // not sure if necessary
    
      Serial.begin(9600);                  // send to serial port
      Serial.println("Start ....");
      
      Serial.print("SPCR Mode  :");
      Serial.println(SPCR, BIN);
    }
    
    
    void loop()
    {
       digitalWrite(SS_PIN, LOW);            // Enable sensor SPI
       delayMicroseconds(10);               // not sure if necessary
    
       Spi.transfer(0xa0);                  // send command: get humidity
       delayMicroseconds(7);                // (all together wait 12 msec and read a byte)
       humidity = Spi.transfer(0x00);       // get one byte (don't care about opcode)
       digitalWrite(SS_PIN, HIGH);          // disable sensor SPI
       
       Serial.print("Humidity      :");     // write to console   
       Serial.print( humidity,   HEX) ;     // Humidity in HEX
       Serial.print(" - ");
       Serial.println( humidity, BIN);
     
       delay(1000);                         // wait a little bit
     
    }
    
    



    Thanks for your help, rk
Sign In or Register to comment.