Wireless Stunts

Wireless Stunts © MIT

Make receiver for Oregon thermo-hygro sensor.

  • 3,562 views
  • 4 comments
  • 10 respects

Components and supplies

Apps and online services

About this project

Wireless communication is very a interesting yet challenging topic. You can buy inexpensive pair of transmitter/receiver working on 433 MHz, but the working range of this adapters is very short, less than one meter. It seems they are useless, but using 433 MHz superheterodyne RXB6 receiver you can significantly increase the working range of the inexpensive wireless equipment up to 30 meters. With this adapter you can receive the signal from remote Oregon weather sensor. This project is dealing with the signal receiving from such a sensor using the library that supports the Oregon protocol v2.1.

To receive the signal, interrupt is implemented. The callback routine is built into the library to simplify the user interface. This callback just saves the time in microseconds between two interruptions into the internal variable. The main library call, that receives the data, should be invoked in the main loop very often to check the received signal. In case the complete packet was received, the function returns the useful data to the program sketch: channel number, sensor id, temperature (degree of Celsius times 10), relative humidity and battery status. Here you can find a documentation of Oregon weather station protocol V2.1 in deep details. And Domonique Pierre has published own implementation library of this protocol. In this project renewed version of the library is used. Please, download the library from this repository. The good news is this library correctly decodes an oregon thermo-humidity sensor data.

Furthermore, you can build your own sensor based on arduino that send the data using this protocol. The library is proven to work in energy efficient variant of arduino controller running at 1 MHz.

Build and enjoy!

Code

Receiver SketchArduino
Arduino sketch
#include <WlessOregonV2.h>

#include <LiquidCrystal.h>

// The LCD 1602 parallel interface
const byte LCD_RS_PIN     = 12;
const byte LCD_E_PIN      = 11;
const byte LCD_DB4_PIN    = 5;
const byte LCD_DB5_PIN    = 4;
const byte LCD_DB6_PIN    = 3;
const byte LCD_DB7_PIN    = 13;

 
OregonDecoderV2 orscV2;
LiquidCrystal lcd(LCD_RS_PIN, LCD_E_PIN, LCD_DB4_PIN, LCD_DB5_PIN, LCD_DB6_PIN, LCD_DB7_PIN);

void setup () {
  Serial.begin(115200);
  lcd.begin(16, 2);
  lcd.clear();
  orscV2.begin(0);
  lcd.print(F("Please, wait..."));
}
 
void loop () {
  static char bOK[] = "batt OK  ";
  static char bNO[] = "batt NoOK";

  int  temp   = 0;
  byte humm   = 0;
  byte ch     = 0;
  byte id     = 0;
  bool battOK = false;
  if (orscV2.receiveData(ch, id, temp, humm, battOK, true)) {
      lcd.clear();
      char buff[16];
      char minus = ' ';
      if (temp < 0) {
        minus = '-';
        temp *= -1;
      }
      sprintf(buff, "T %c%d.%d %X %X", minus, temp/10, temp%10, ch, id);
      lcd.print(buff);
      lcd.setCursor(0, 1);
      char *p = bNO;
      if (battOK) p = bOK;
      sprintf(buff, "H %d%c %s", humm, '%', p);
      lcd.print(buff);
      Serial.print("Channel = ");   Serial.print(ch, HEX);
      Serial.print(", Sensor ID = "); Serial.print(id, HEX);
	    Serial.print("; Temp = ");     Serial.print(minus); Serial.print(temp/10); Serial.print("."); Serial.print(temp%10);
	    Serial.print(", Humm = ");    Serial.println(humm);
  }

}

Schematics

The receiver schematics
Apmvz7a9udsf8b0ovlgt

Comments

Similar projects you might like

Inexpensive Wireless Interactive Board

Project tutorial by Adellar Irankunda

  • 14,225 views
  • 4 comments
  • 19 respects

Displaying Sensor Values on LCD

by Wimpie van den Berg

  • 65,059 views
  • 6 comments
  • 46 respects

Wireless Magnetic Data Transfer

Project tutorial by Tomi Chen

  • 6,500 views
  • 4 comments
  • 22 respects
Add projectSign up / Login