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
- 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
- Solder the pins on the CoreTemp module to plug in to ExpIF 2 of the emPower board.
- Solder the pins on the smaller mount kit board to plug in to ExpIF 1 of the emPower board.
- Solder the CorePressure module on the larger mount kit board.
- Connect the mount kit boards.
- Plug in the USB cable to the emPower board and connect it with your computer.
- Plug in the network cable and connect it to your local network.
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.
- Download the IoT Temperature Node Firmware.
- Extract the archive to your disk.
- Copy the .hex file to the emPower device.
- Reset the emPower.
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.
- Connect the emPower board to your local network.
- Power-on the emPower board by connecting a cable to the USB connector labeled "J-Link".
- Follow the instructions on the screen to set the properties of the IoT Temperature Node.
- Select the country. (e.g. Germany)
- Enter the state code. (e.g. NW, Optional, can be left empty)
- Enter the city. (e.g. Monheim am Rhein)
- Enter a location name. (e.g. SEGGER Headquarter)
- Confirm that you want to save the properties.
- Follow the instructions on the screen to configure the settings of the IoT Temperature Node.
- Select to connect via WiFi or Ethernet (only if shown, otherwise Ethernet only).
- Select the IP Configuration.
- If you use a static IP, enter the IP, Subnet Mask, Gateway and DNS address.
- 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.
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.