Return to IEEE Internet of Things Weather Station

IEEE IoT October 2016

The IEEE Northern Virginia Section

Hands-On Technical Workshop Series
Presents: 
Build an Internet of Things Weather Station

By the end of this course you will:

  •         Learn what is meant by “The Internet of Things”.
  •         Experience breadboard prototyping techniques – no soldering needed.
  •         Program the ESP8266 System on Chip (SoC) using Arduino sketches.
  •         Interface environmental sensors using the I2C bus.
  •         Create an account on and upload data to a free IoT service.
  •         View your data graphs on a standard web browser.

This version of the IEEE IoT Weather Station uses a BME280 environmental sensor with a BH1750 light intensity sensor.

Course Files

These are the course presentation slides in pdf format. The first set is the for construction of the weather station and is followed by the instructional slides. There is a zipped file for each set.

  • There are typographical errors in these files. They are being fixed.

Construction Slides

FILEDESCRIPTIONCOMMENT
ieee-iot-handout-october-2016-linksAgenda, parts list, schematic, Fritzing diagram, LCD chart, NodeMCU pinouts, resource links.Handout for the IEEE Northern Virginia October 2016 course
ieee-iot-construction-slidesContains all the following construction slides in a zip file.You do not need to download the individual files if you download this zip file.
ieee-iot-sketch01-blinkProject Map, description of parts, load Arduino IDE and ESP8266 core. Run the classic LED blink sketch.Become familiar with breadboard prototyping. Install the development software and demonstrate the persistence of firmware.
ieee-iot-sketch02-hello-worldIntroduce the I2C bus. Connect the level shifter and LCD display. Load the LCD library and run "Hello World".Introduction to general purpose input/output and the I2C bus.
ieee-iot-sketch03-standaloneConnect sensors and load the corresponding libraries. Run a standalone weather station.The hardware construction is completed in this lesson. Sensor data is displayed on a local basis.
ieee-iot-sketch04-thingspeakInstall the WiFi library and open a ThingSpeak account. Connect the weather station to the Internet and explore data visualization.This is the final lesson. Sketch 04 and the supporting libraries are all that are needed to make the complete project.
ieee-iot-sketch05-smartphoneThis is a self directed project to create a smartphone app and remotely monitor and control the weather station.Bonus sketch using the free smartphone Blynk app. See www.blynk.cc

Instruction Slides

FILEDESCRIPTIONCOMMENT
Instructional SlidesContains all the following course Instructional Slides in one ZIP file.You do not need to download the following individual files if you download this zip file.
02_IoTIntroduction to the Internet of Things.
03_swdev_v0203 SWDEVThe Software Development process.
04 MCUChoosing a Microprocessor.
05 ProtocolsInternet of Things Protocols: IP, TCP, & HTTP.
06 ArchitectureIoT Remote Sensing Architecture.
07 ConclusionCourse Summary and Conclusion.

Arduino Sketch Files

These zip files contain an Arduino sketch within a folder of the same name. Extract the contents of the zip file and copy the folder to your sketch folder. The sketch folder is usually \Documents\Arduino\. You can download the complete set in the first zip file.

  • Updated 31 October 2016
FileDescriptionComment
ieee_iot_sketches_all_v02Contains ALL the following Arduino Sketches. Extract all contents to your Arduino folder. You do not need to download the following individual files if you download this zip file.
ieee_iot_sketch01_blink_v02Blinks an onboard LED.This is a classic "first program" on Arduinos. It tests the proper installation of the IDE and the ESP8266 core.
ieee_iot_sketch02_hello_world_v02Displays a splash screen on the LCD display.Requires download and installation of the Liquidcrystal-I2C library to drive the LCD display.
ieee_iot_sketch03_standalone_v02Runs a simple weather station that is not connected to the Internet.Requires installation of BME280 and BH1750 libraries.
ieee_iot_sketch04_thingspeak_v02Connect the weather station to the ThingSpeak IoT service. You must open a free account at www.thingspeak.com. Uses a simple Real Time Operating System to schedule tasks. Averages sensor data to smooth readings. Displays barometric trend as a graphic arrow.
Libraries used:
Liquidcrystal-I2C
RunningAverage
ArduinoThread
BME280
BH1750
ieee_iot_sketch05_smartphone_v02Build a smartphone app using BlynkYou must open a free account at www.blynk.cc and download the app to your smartphone.
ieee_iot_i2c_scanner_v02Scans I2C addresses and prints results to the serial port.Used to find what is connected. LCDs often have different I2C addresses.

Arduino Library Files

You can download the combined libraries zip file and extract the files to your \documents\Arduino\libraries folder. No further installation is required if you use this method.

To install individual libraries, see instructions for installing library files at https://www.arduino.cc/en/Guide/Libraries

Some of the libraries may be installed using the Arduino IDE Library Manager. Others must be downloaded as zip files and installed using IDE menu item Sketch | Include Library | Add .ZIP Library…

If you choose to install individual libraries we recommend using the source file in the left column of the table. The project sketches have been tested with these source files. The alternate source in the right column may be more up-to-date, however, be sure to read the developer’s installation instructions as some files must be renamed after download.

Special instructions for installing the Blynk application are given in the construction slides for ieee-iot-sketch05-smartphone.

FileDescriptionAlternate Source (read installation instructions in source)
Arduino IDEhttps://www.arduino.cc/en/Main/Software
ESP8266 Core - follow installation instructions provided for Library Manager.https://github.com/esp8266/Arduino
Insert json string in IDE menu Files | Preferences | Additional Boards Manager URLs:
http://arduino.esp8266.com/stable/package_esp8266com_index.json
ieee_iot_libraries_v02This zip file contains ALL the following libraries. Extract the folders within this zip file to your \documents\Arduino\libraries folder.You do not need to download or install the following individual libraries if you download this zip file.
liquidcrystal-i2cLiquidCrystal_I2C for LCD displays using I2C by Frank de Brabander.https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library
bme280BME280 barometric pressure, temperature, and humidity sensor by Tyler Glenn. Available in Library Manager.https://github.com/finitespace/BME280
bh1750BH1750 light intensity sensor.https://github.com/claws/BH1750
runningaverageRunningAverage smooths sensor data by Rob Tillaart.https://github.com/RobTillaart/Arduino/tree/master/libraries/RunningAverage
arduinothreadSimple RTOS by Ivan Seidel. Includes Thread and ThreadController. Available in Library Manager.https://github.com/ivanseidel/ArduinoThread

ThingSpeak Visualization Scripts

FileDescriptionComment
dewpoint_in_fahrenheitReads temperature in Celsius and humidity. Displays temperature and dew point in Fahrenheit on a MATLAB chart.You must enter your ThingSpeak Channel ID and api Read Key.
google_gauge_javascriptReads temperature in Celsius and displays temperature in Fahrenheit on a Google Gauge.Sign in to your ThingSpeak account. Click menu Apps and then Plugins. Create new Google Gauge. Cut and paste this code into the JavaScript area. Enter your Channel ID and api Read Key.
display_multiple_channelsReads temperature from four IEEE weather stations and displays them on a MATLAB chart.You must enter channel IDs and sensor fields.

Permanent link to this article: https://w4krl.com/projects/ieee-iot/2016october/