Skip navigation

SEGGER Weather Station

The SEGGER Weather Station demonstrates how to create an IoT Node to communicate with an IoT Cloud Service.

  • Secured communication via MQTT
  • Secured communication via HTTPS
  • Device configuration and provisioning
  • Creating and parsing JSON data

 

The IoT Temperature Node registers with the service and publishes its sensor data. The data is analyzed in the cloud and made available on a website: http://weather.segger.com.

The core of the project is built with embOS as the operating system to handle the different tasks, and emWin for the graphical user interface and user input. To connect to the internet, the IoT Node uses emNet with optional WiFi support. The connection is secured with TLS, powered by emSSL. The registration is done with the HTTP Client and JSON Parser of the IoT Toolkit. Device signatures, certificates, and verification is done with the cryptography algorithms of emCrypt. The main communication of the IoT Node, publishing the sensor data, uses the MQTT Client, emMQTT, also secured by emSSL.

 

Setting up SEGGER Weather Station Hardware

Required Hardware

  • SEGGER emPower V2.0 board
  • SolderCore CoreTemp module
  • SolderCore CorePressure module
  • SolderCore Mount kit
  • Micro USB cable
  • Network cable

Preparation and soldering

The IoT Temperature Nodes use a SEGGER emPower board V2.0 Rev. D. Older revisions can be used, too, but do not support drag & drop programming of the firmware.

The temperature and pressure sensors are based on the SolderCore CoreTemp and CorePressure modules, which fit on the emPower board's ExpIF headers. The schematics of the modules are available for you to build your own modules. We also have some modules in stock.

The sensor modules require some soldering

  1. Solder the pins on the CoreTemp module to plug in to ExpIF 2 of the emPower board.
  2. Solder the pins on the smaller mount kit board to plug in to ExpIF 1 of the emPower board.
  3. Solder the CorePressure module on the larger mount kit board.
  4. Connect the mount kit boards.
  5. Plug in the USB cable to the emPower board and connect it with your computer.
  6. Plug in the network cable and connect it to your local network.

Installation

The J-Link OB on the emPower board (Rev. D or later) supports drag & drop programming of the target MCU.
When the emPower board is connected to your computer, it will show up as a mass storage device in the file explorer, just like a USB stick.

  1. Download the IoT Temperature Node Firmware.
  2. Extract the archive to your disk.
  3. Copy the .hex file to the emPower device.
  4. Reset the emPower.

Configuration

On the first run of the IoT Temperature Node, it is not configured, yet. You can set its properties, i.e. its location, and configure the settings, i.e. network configuration.
The properties can only be set once and are used to provision the device. The user settings can be changed later, for example if the network configuration changes.

  1. Connect the emPower board to your local network.
  2. Power-on the emPower board by connecting a cable to the USB connector labeled "J-Link".
  3. Follow the instructions on the screen to set the properties of the IoT Temperature Node.
    1. Select the country. (e.g. Germany)
    2. Enter the state code. (e.g. NW, Optional, can be left empty)
    3. Enter the city. (e.g. Monheim am Rhein)
    4. Enter a location name. (e.g. SEGGER Headquarter)
  4. Confirm that you want to save the properties.
  5. Follow the instructions on the screen to configure the settings of the IoT Temperature Node.
    1. Select to connect via WiFi or Ethernet (only if shown, otherwise Ethernet only).
    2. Select the IP Configuration.
      1. If you use a static IP, enter the IP, Subnet Mask, Gateway and DNS address.
  6. Confirm that you want to save the settings.

After the configuration is done, the IoT Temperature Node connects to your network and the internet.
On first start it will connect to the Weather Station endpoint to register itself and get its device certificate and credentials.

INFO:

If any step fails, reset the IoT Temperature Node to redo the steps.
If you need to change the user settings, hold down the USER Button while you power the board.

Usage

Weather_Station_screenshot_01.jpg
IoT node weather station sample using embOS, emMQTT, emNet, emSSL, IoT Toolkit