DZone
IoT Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > IoT Zone > Crowdsourced IoT Data: Accessing The Things Network With Eclipse Scout

Crowdsourced IoT Data: Accessing The Things Network With Eclipse Scout

A tutorial on using Eclipse Scout and The Things Network to measure noise levels.

Matthias Zimmermann user avatar by
Matthias Zimmermann
·
Mar. 07, 16 · IoT Zone · Opinion
Like (14)
Save
Tweet
7.26K Views

Join the DZone community and get the full member experience.

Join For Free

The Things Network (TTN) is an open source project that aims at a global crowdsourced Internet of Things data network. In this blog post we describe a complete TTN show case to create real-time noise maps using the TTN in Zurich using a backend application based on Eclipse Scout and the MQTT Paho library. 

TTN: A Brief Introduction

After a highly successful campaign on Kickstarter last year, the project is now implementing the necessary infrastructure, designing and producing the promised hardware and spreading the word, for example at Eclipsecon next week.

The major benefits of the project are its distributed open source approach, the low price of the components, the range of  several kilometers for gateways, and the low power consumption of the involved LoRa technology for the “fog” part of the system.

The diagram below provides an overview over the setup including the noise measuring nodes and the TTN Gateways (the “fog”) on the left side, the TTN Cloud in frastructure in the middle and the backend application on the right side.

Overview of the complete setup

The described setup is currently using the somewhat simpler TTN prototype infrastructure. This setup is available since last year as well as instructions on how to set up your own gateway and your own nodes.

For the goal of this post the relevant aspects are the nodes on the left side that connect to one or more TTN gateways and the application on the right side that connects to a TTN handler service.

Low Cost Nodes for Measuring Noise

The goal was to assemble 40 complete nodes for less than €40. As a basis of the component selection we were using Teensy TTN node described in TTN Wiki. Due to additional taxes and some minor “mishaps” during production we ended up at €44 per node instead.

As shown below, the final node contains a microphone (1), a Teensy LC (2), a RFM95 LoRa module (3), an antenna with a company flag (4) as well as a battery box (5) inlcuding 3 AA batteries.

Node including Teensy LC (Arduino compatible) and LoRa transmitter

After being switched on, the node starts to measure differences in air pressure levels over short time windows that roughly correspond to the current noise level. Every two minutes the node then transmits the largest measured noise level and the “amount” of noise accumulated over the two minute period.

When the node is located within the range of a receiving TTN gateway, the data package is then forwarded to the TTN prototype setup.

The source code of the noise measuring node is available on Github.

The Scout Backend Application and a MQTT Paho Client

As the TTN prototype setup also includes a MQTT interface it is straight forward to implement applications that can response near real time to incoming TTN packets.

To implement an end-to-end TTN showcase, a backend application was implemented to display the data packets sent by the TTN noise nodes. The implementation of the user interface is based on Eclipse Scout, and for the communication with the MQTT broker, the Paho Java Client Library is used.

The screenshot below shows the transmitted noise levels with its corresponding time stamps. Noise levels of 10 or more indicate a train

Noise level data as transmitted by nodes

By assigning coordinates to noise nodes, the Scout application can also show the noise levels on a real-time map. The picures below shows two situations with four noise nodes distributed at the outside of the BSI office in Zurich. During a time window with trains passing higher noise levels were measured by nodes that sit closer to the railway tracks (left image) than during a time window without any passing trains (right image).

Noise levels rendered on Open Streetmap

As in the case of the noise measuring nodes, the source code of the Scout TTN application is available on Github. In addition, the application is also available as a Docker image on Docker Hub and deployed as a live instance.

IoT Data (computing) application Eclipse Network Open source

Published at DZone with permission of Matthias Zimmermann. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Modernize Legacy Code in Production: Rebuild Your Airplane Midflight Without Crashing
  • Java: Why Core-to-Core Latency Matters
  • Refactoring Java Application: Object-Oriented And Functional Approaches
  • Top Soft Skills to Identify a Great Software Engineer

Comments

IoT Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo