cactus.io logo

How to Hookup HIH6130 Temperature Sensor to Arduino Board

Overview

Connecting the Honeywell HumidIcon™ HIH6130 Digital Humidity - Temperature Sensor to the Arduino is pretty simple. It requires only 4 wires. This being for power and data. Once the sensor is connected up to the Arduino the next step is to download the HIH6130 library and sample sketch. We can then program the board and check out the results via the console.

Images

View Honeywell HIH6130 Humidity - Temperature Sensor Details
Note: Images shown on this page are not to scale.

Parts List

  • Arduino Board
  • HIH6130 Sensor on Breakout Board. We used the Sparkfun HIH6130 (SEN-11295) breakout board.
  • Breadboard hookup wires
  • USB Cable to suite Arduino

Data Sheets


Hookup Diagram

Connecting up the sensor requires 4 wires. We can source power from either the 5V or the 3.3V pin on the Arduino. We are using the 5V pin in the diagram. The data wire (SDA) is connected to pin A4. The clock wire (SCL) is connected to pin A5 on the Arduino. We are not using the alarm (AL_H and AL_L) outputs from the sensor. The alarm outputs require additional programming and software that is not included in the cactus.io HIH6130 library.

Connect Arduino to Honeywell HIH6130 Humidity - Temperature Sensor

Software

You will need to download the cactus.io HIH6130 library to use the sample sketch shown below.

Using the Arduino IDE we can run this sample sketch to read data from the sensor. Once you upload the compiled code to the Arduino board you can see the results displayed on the serial console.

The library only supports reading the humidity and temperature from the sensor. It does not support command and alarm programming.

In the sample sketch below we read the HIH6130 sensor and output the results to the console every three seconds.

Honeywell HIH6130 Sample Sketch
Download as (Arduino Sketch) (Text File)
1
#include <Wire.h>
2
#include "cactus_io_HIH6130.h"
3
4
//define the address used by the HIH6130 sensor (default is 0x27)
5
byte address = 0x27;
6
7
//Set up an instance of the sensor
8
HIH6130 hih6130(address);
9
10
void setup(){
11
Serial.begin(9600);
12
Serial.println("Honeywell HIH6130 Humidity - Temperature Sensor");
13
Serial.println("RH\tTemp (C)\tTemp (F)\tHeat Index (C)\tHeat Index (F)");
14
}
15
16
void loop(){
17
// Read the data -> stored to public variables
18
hih6130.readSensor();
19
20
// Access the variables and print to serial monitor
21
Serial.print(hih6130.humidity); Serial.print("\t");
22
Serial.print(hih6130.temperature_C); Serial.print("\t\t");
23
Serial.print(hih6130.temperature_F); Serial.print("\t\t");
24
Serial.print(hih6130.computeHeatIndex_C()); Serial.print("\t\t");
25
Serial.print(hih6130.computeHeatIndex_F());
26
27
// 3 second delay
28
delay(3000);
29
}

Sketch Output

Connect Arduino to Honeywell HIH6130 Humidity - Temperature Sensor

License