Hello everybody,
I'm not so good in electronic (and in English !!).
After some issue with my SHT11 and Arduino Duemilanove, I finally found a way to be successfull.
First of all, with my oscilloscope I see that clock pin have less voltage than data pin ?
It seems that built-in AVR pull-up resistance was enabled on my clock pin and not on my data pin (probably due to previous testing).
So, I have change contructor to disable it on both :
Sensirion::Sensirion(uint8_t data, uint8_t clock)
{
// Pins for software SPI
_pinData = data;
_pinClock = clock;
pinMode(_pinData, INPUT); // set pin to input
digitalWrite(_pinData, LOW); // turn off pullup resistors
pinMode(_pinClock, INPUT); // set pin to input
digitalWrite(_pinClock, LOW); // turn off pullup resistors
// set DDR for software SPI pins
pinMode(_pinClock, OUTPUT);
pinMode(_pinData, OUTPUT);
softReset();
}
Is it make sense ?
After, I have see in this thread that we have to use 3.3v power instead of 5v. I have connected vdd on 3.3v pin. But in this case, the data pin
and clock pin continue to use 5v, no ?
Because, very often the measure function returned 1 (communication error), I have inserted a resistance (330 ohm) on clock and data pin to reduce voltage.
And now, all works fine (without pull-up resistance on data pin).
Result : 0
Temperature: 28.54 C, Humidity: 53.3 %, Dewpoint: 18.4 C
Result : 0
Temperature: 28.54 C, Humidity: 53.3 %, Dewpoint: 18.4 C
Result : 0
Temperature: 28.55 C, Humidity: 53.3 %, Dewpoint: 18.5 C
Result : 0
Temperature: 28.55 C, Humidity: 52.97 %, Dewpoint: 18.3 C
Result : 0
Temperature: 28.55 C, Humidity: 52.97 %, Dewpoint: 18.3 C
Result : 0
Temperature: 28.55 C, Humidity: 52.97 %, Dewpoint: 18.3 C
Result : 0
Temperature: 28.55 C, Humidity: 53.0 %, Dewpoint: 18.4 C
Result : 0
Temperature: 28.58 C, Humidity: 52.97 %, Dewpoint: 18.5 C
Is it make sense ?
Best regards,
Pascal