Open Hive GSM and WiFi sensor nodes

Tip

You might want to read this document on our documentation space, all inline links will be working there.

Introduction

This hybrid firmware supports two different hardware devices. Telemetry data is transmitted using HTTP. Both HX711 and ADS1231 load cell sensor chips are supported. The most recent firmware version is available at node-gprs-http.ino.

Open Hive WiFi Node on workbench

Open Hive WiFi Node

Platform and supported peripherals

Board

Sensors

  • HX711 ADC weigh scale breakout board or
  • ADS1231 ADC weigh scale breakout board
  • DS18B20 digital thermometer
  • DHT33 (RHT04) digital humidity/temperature sensor

See also

Setup

Clone git repository

# Get hold of the source code repository including all dependencies
git clone --recursive https://github.com/hiveeyes/arduino

# Select this firmware
cd node-gprs-http

Configure firmware

Have a look at the source code node-gprs-http.ino and adapt feature flags and setting variables according to your environment:

When using a HX711 sensor:

#define isScaleHX711

When using an ADS1231 sensor:

#define isScaleADS1231

Enable AVR ATmega328 with GPRSbee GSM modem:

#define isGSM

#define APN "internet.eplus.de"

Enable ESP8266 with integrated WiFi:

#define isWifi

#define WLAN_SSID  "your-ssid"
#define WLAN_PW    "your-pw"

Configure load cell calibration settings:

// Use sketches "scale-adjust-hx711.ino" or "scale-adjust-ads1231.ino" for calibration

// The raw sensor value for "0 kg"
const long loadCellZeroOffset = 38623;

// The raw sensor value for a 1 kg weight load
const long loadCellKgDivider  = 11026;

Tip

Read about Firmwares for load cell adjustment to get these values.

Build

Build for AVR

The build system is based on Arduino-Makefile, a Makefile for Arduino projects.

# Select appropriate Makefile
ln -s Makefile-Linux.mk Makefile

# Build firmware
make

Note

You might want to adjust the appropriate Makefile to match your environment.

Upload to MCU

make upload

Build for ESP8266

The build system is based on makeESPArduino, a Makefile for ESP8286 Arduino projects.

Setup SDK:

mkdir ~/sdk; cd ~/sdk
git clone https://github.com/esp8266/Arduino esp8266-arduino

# Download appropriate Espressif SDK
cd esp8266-arduino/tools
./get.py

Announce path to SDK:

export ESP_ROOT=~/sdk/esp8266-arduino

Build firmware:

# Announce path to SDK
export ESP_ROOT=~/sdk/esp8266-arduino

# Run Makefile
make -f Makefile-ESP8266.mk

Enable more verbose output:

export VERBOSE=true

Upload to MCU

make -f Makefile-ESP8266.mk upload