Weather Monitoring Using Onion Omega and HIH7130

Introduction: Weather Monitoring Using Onion Omega and HIH7130

About: Hardware design engineer

Few days back we received Onion Omega. Its a wonderful small computer, it has ethernet, wifi, uart , I2C and lot of GPIO. it supports all the major languages so you can use your existing codes in it with a little modification. Since last few years i have been using Pi, Arduino and beaglebone but this small computer is just wonderful, its 1/4 in size in comparison to pi and almost equal to arduino nano.

Onion omega also supports cloud, so all your devices can be controlled and monitored from anywhere in the world.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Hardware Setup for Weather Monitoring

to make this project you will need these part.

1. Onion Omega

2. HIH7130

3. Connecting cables

4. I2C adapter

connecting the hardware is really simple, all you will need to do is plug your Onion omega into the I2C adapter and connect with a HIH7130 mini module. If you are not comfortable with soldring the wires then getting an adapter is the best solution.

Why I2C adapter:: lot of time people connect wrong wires and they kill there sensor as well as there onion omega. so with I2C adapter you can save your sensor as well as your onion omega.

Why Mini module:: wiring could be a long and difficult process, it takes lot of time but using mini module you can connect your sensor with onion omega in 5sec and you can start writing your own application.

Step 2: Sensor Specification

we are using HIH7130 sensor for measuring the humidity and temp. Honeywell HumidIcon Digital Humidity/Temperature Sensors are digital output-type relative humidity and temperature sensors combined in the same package. These sensors provide an accuracy level of ±3%RH. With industry-leading long-term stability, true temperature-compensated digital I2C, Industry-leading reliability, Energy efficiency and Ultra-small package size and options. Other accuracies which are available: ±1.7 %RH (HIH9000 Series), ±2.0 %RH (HIH8000 Series), ±3.0 %RH (HIH7000 Series), and ±4.0 %RH (HIH6100 Series).

Why I2C :: I2C protocol is so easy to use and we can chain lot of different different devices with it as long as address don't conflict with each other.

Step 3: Onion Omega Setup

Onion omega is so easy to setup. if you are new to onion omega you can follow this guide. Getting started with onion omega

make sure you install python I2C lib in you onion omega using these commands

opkg update
opkg install python-light pyOnionI2C

after installing these commands run i2cdetect -y 0

you will see I2C address of HIH7130.

Step 4: Python Code for HIH7130

HIH7130 is an I2C communication based sensor, so writing code is really easy.

HIH7130 Python code


from OmegaExpansion import onionI2C

import time

import sys

print 'Starting: onionI2C module testing...'

i2c = onionI2C.OnionI2C(0)

# set the verbosity


# HIH7130 address, 0x27(39)

# Read data back from 0x00(00), 4 bytes

# humidity MSB, humidity LSB, temp MSB, temp LSB

data = i2c.readBytes(0x27, 0x00, 4) # Convert the data to 14-bits

humidity = ((((data[0] & 0x3F) * 256) + data[1]) * 100.0) / 16383.0

temp = (((data[2] & 0xFF) * 256) + (data[3] & 0xFC)) / 4

cTemp = (temp / 16384.0) * 165.0 - 40.0

fTemp = cTemp * 1.8 + 32 # Output data to screen

print "Relative Humidity : %.2f %%" %humidity

print "Temperature in Celsius : %.2f C" %cTemp

print "Temperature in Fahrenheit : %.2f F" %fTemp

Step 5: Review

The code is pretty simple, still if you have any doubts please let me know.

Onion omega is a great computer, its really easy to use. Just in few minutes you can make your own IOT project(make sure you remove white protective layer off the sensor for accurate results).

2 People Made This Project!


  • Backyard Contest

    Backyard Contest
  • Silly Hats Speed Challenge

    Silly Hats Speed Challenge
  • Finish It Already Speed Challenge

    Finish It Already Speed Challenge

7 Discussions


3 years ago

Thanks for the project! Do you have a sample of it running? Would you expand it to monitor barometric pressure?


3 years ago

It looks cool project, congratulations..

How much does it cost?

Where do you supply the components?

Is there video to explain how it works with power supply and digital display?


Reply 3 years ago

it usages the usb supply. hte usb is connected to onion omega usb pins. so this usb does two things 1. provides power 2. provides usb access to onion omega
its real easy to use. you can follow this instructable to make it work.
You can get parts from here.