Humidity sensor command mode - Page 1
Forum section: electronics / beginners

author: Legion
author_rank: Frequent Contributor
timestamp: April 04, 2014, 09:53:17 pm
content: I picked up a couple Honeywell HIH-8120 SIP humidity sensors to use with an Arduino Uno. The sensors communicate via I2C. All sensors ship with a default I2C address of 0x27. So I need to modify the address of one of the sensors so I can differentiate between the two over I2C.The problem is that in order to change any settings on the sensor you have to put it into command mode first. From the time the sensor is first powered on you have a 3ms window to send the command mode instruction to the sensor, otherwise you can't get in and the sensor remains in "normal" mode.I've tried to get into command mode but I don't believe I've been successful. The data I get back is all random garbage. My hypothesis is that I'm missing the 3ms window and then sending command mode instructions while the sensor is in normal mode causing it to return garbage data.When the arduino is powered, it supplies power to it's rails almost immediately, before the boot sequence is complete. So I'm wondering if the sensor is being powered concurrently with the arduino but by the time the command entry code is sent to the sensor more than 3ms has elapsed since power on.Anybody run into anything like this before?Datasheet:https://dl.dropboxusercontent.com/u/91808950/Honeywell%20HIH8000%20HumidIcon%20Sensor%20Datasheet.pdfI2C Communications Technical Note:https://dl.dropboxusercontent.com/u/91808950/Honeywell%20HumidIcon%20I2C%20Comms.pdfCommand Mode Technical Note:https://dl.dropboxusercontent.com/u/91808950/Honeywell%20HumidIcon%20Command%20Mode.pdf

author: Rerouter
author_rank: Super Contributor
timestamp: April 04, 2014, 10:53:25 pm
content: Care to point to the actual datasheet your using, (better to attach it) I've tried opening it from various suppliers but every time it fails to load,

author: Legion
author_rank: Frequent Contributor
timestamp: April 04, 2014, 10:59:09 pm
content: Quote from: Rerouter on April 04, 2014, 10:53:25 pmMy bad, meant to link those in. Too big for attachments. I put them in my public dropbox folder. Links are in the original post.

author: Legion
author_rank: Frequent Contributor
timestamp: April 04, 2014, 11:05:30 pm
content: I think I solved it. My instincts were right, it was a timing problem. I wasn't sending the command mode instruction within the 3ms. The problem is the arduino takes too long to boot up. I was able to get around that problem by powering the sensor off of one of the PWM digital output pins. I set the pin to a 100% duty cycle so it outputs a flat 5V. Unlike the 5V rail I can "turn on" the output pin at the program start. This way the sensor isn't turned on until the arduino has already started running the program. My com window now displays good data from the sensor EEPROM.

author: Rerouter
author_rank: Super Contributor
timestamp: April 04, 2014, 11:09:59 pm
content: Equally you should only need to program them once if Ive read the datasheet, so good luck

author: Legion
author_rank: Frequent Contributor
timestamp: April 05, 2014, 02:53:24 am
content: Yeah. Just changed the address for one of them. I was able to get them both hooked up to the microcontroller and poll them for data. Everything seems to be working.