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)
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
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.
Comments
www.sure-electronics.net/download/DC-SS500_Ver1.0_EN.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Until now, I got no data from the sensor ....
Ralf Kramer
mwpalmer, It still might help if you attach your code.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Post Edited (Franklin) : 4/17/2010 1:28:04 AM GMT
// 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