Go Down

Topic: Honeywell HIH-6130 Humidity / Temperature Sensor (Read 3979 times) previous topic - next topic

pha555

I have completed an application note with sample Arduino code for the HIH-6130 at;

http://www.phanderson.com/arduino/hih6130.html

This sensor in an 8-pin SOIC package is relatively inexpensive, provides a standard I2C interface and High and Low RH alarms with hysterisis.

If you use it, please give credit.

Peter Anderson

robtillaart


Thanks for sharing,

some improvement ideas:

replace print_float(RH, 1);   ==> Serial.print(RH, 1);   The print class of the arduino can print floats, it uses a similar algorithm as you wrote


Furthermore I would proprose to wrap the code in a class similar to this lib I wrote - http://arduino.cc/playground/Main/DHTLib - The interfaces can be almost identical.
That would encapsulate all the math for calculating the temp & humidity inside the class, making it easier for users to use. 

FInally one question: is it possible to change the address of the HIH6130? SO I can use more than one on the I2C bus?






Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

avenue33

Thank you for sharing code and useful links :)

maldex

I actually did, and yes, the I2C address is changeable.

cheers
Josh


robtillaart

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

maldex

is that right, we're working on the same time on the very same chip?
And I've, to admit you did the better Job, went the extra mile to implement all features :)

Just skimming through it - how do you enter the command mode exactly (within that 3/10ms)? Reason why i have a function pointer is that we might want the HIH to be field-programmable. E.g. hook up to the output of a PCF8591 or similar to power-cycle the HIH while being installed.

followup readers: please check http://playground.arduino.cc//Main/HoneywellHumidIconTMDigitalHumidity-TemperatureSensors
and http://arduino.cc/forum/index.php/topic,150584.0.html

thanks for your work and cheers


sokopok

Quote
is that right, we're working on the same time on the very same chip?

Apparently so, if I'd have known what you were doing, I wouldn't have started on this....

Quote
And I've, to admit you did the better Job, went the extra mile to implement all features smiley

Thanks a lot!

Quote
how do you enter the command mode exactly (within that 3/10ms)?

I have been wrestling with command mode for a couple of weeks, because I didn't know the voltage on the 3.3V pin on the arduino isn't cut when you reset the arduino (or isn't cut long enough). But then finally it hit me... So I just put a 3.3V voltage regulator on a digital pin to supply the chip (the datasheet says it can handle 5V, but I didn't want to fry the chip, so...).
So: digitalWrite(powerPin, HIGH); enables the chip
And: digitalWrite(powerPin, LOW); disables it
If you want to cycle the power do something like this:
Code: [Select]
digitalWrite(powerPin, HIGH);
//  HIH is enabled now, so let's cycle the power:
digitalWrite(powerPin, LOW);
delay(1); // this is the important part: give the chip the time to notice the power has been cut
digitalWrite(powerPin, HIGH);

I hope this answers your question because I've got no idea what a PCF8591 is or what role an A/D convertor could play here.

If you have any improvements to the code or anything... you're always welcome.

Go Up