To provide measurements for temperature and relative humidity, I chose the Honeywell HIH-6131. This SMT chip has a supply voltage range of 1.8v-5.5v, making it suitable for 3.3v operation. It also uses an I2C interface and the address can even be programmed, although I had no need for that feature. The chip has some alarm features, which I also did not need for this project.
Using the chip is relatively easy and there are Arduino libraries and code samples around for your use (example here). For my specific application, I did not need a library as you can get the humidity and temperature values with only a few lines of code.
Basically, after waking the chip up, you read 4 bytes of data. The first byte includes two status bits: 00 = normal, 01 = stale data (click here for the definition of "stale data"), 10 = in command mode, 11 = not used. All other bits in the four bytes are used to convey relative humidity and temperature data that can be easily converted to RH percentage and degrees Celsius (which I converted to Fahrenheit).
HIH-6131 humidity and temperature IC
The HIH-6131 is distinguished from the HIH-6130 by a condensation-resistant hydrophobic filter that is visible in the pictures.
HIH-6131 humidity and temperature IC on a carrier board
Because it is an SMT IC, I used a small carrier board. With some careful soldering, it is not too difficult to manage and will allow you to mount header pins for easy access to the IC pins.
First, while the LCD is 5v, the I2C I/O is 3.3v/5v compatible, making it easy to use with the Arduino 101 which has 3.3v I/O. Second, the backlight is configurable and I wanted to use that feature to communicate certain conditions. That is, green for normal and blue when a central device has connected over BLE.
The Arduino driver that I used and sample code are available here.
Grove RGB backlight LCD (2 x 16)
Arduino 101 board
I chose the Arduino 101 (USA) / Genuino 101 (outside of the USA) board for the microcomputer. This is a 3.3v board with the Intel Curie module, but also with a lot of Arduino familiarity and ease of use. Another feature is that it comes with BLE capabilities on the board and a CurieBLE library. In addition to the information links in the references section above, there is a dedicated forum for the board here.
Arduino 101 / Genuino 101
Circuit and Schematic
Schematic for the Indoor Air Quality Monitor. Click to enlarge.
The complete circuit schematic appears in the figure above. It is straightforward and uses relatively few parts. Both sensors are attached to the Arduino's I2C pins and I used 2.2K pull-up resistors on the I2C bus, which is powered by the 3.3v line that is available on the Arduino header. The 3.3v line also powers the sensors. The LCD I/O is also on the 3.3v I2C bus, but it is powered by the 5v line, which is also available on the Arduino header.
Add a few capacitors and the circuit is complete. Note that I used a 0.22 μF polarized capacitor for C1 because that's what I had on hand, but a (non-polarized) ceramic capacitor is the standard choice for power-supply decoupling.
|C1||0.22 μF polarized capacitor|
|C2||0.1 μF non-polarized capacitor|
|C3||0.01 μF non-polarized capacitor|
|U1||iAQ-Core-C sensor module|
|LCD1||RGB LCD 2 X 16 (see text)|
|Miscellaneous||circuit board, headers, sockets, jumpers|
The iAQ-Core-C sensor module is available through several online suppliers including Mouser. The HIH-6131 sensor is also available from online sources including Digi-Key. I used a convenient case to enclose the project, and I also used this extension for the case.
From the picture of the finished project (at the beginning of the article), you can see how I mounted the sensors so that they are exposed to circulating air. And to allow for easy removal, I connected the sensor pins using sockets instead of direct soldering. In retrospect, I probably should have placed the HIH-6131 in the front of the case as it runs a few degrees (F) high (as far as I can tell) likely because of heat generated from the Arduino 101 board that sits below.
Operation and BLE testing
Wh