MQTT-SN 802.15.4 Network

The Network @ MQTT-SN 802.15.4 Net

Introduction

MQTT-SN 802.15.4 Network connects number of end devices (MQTT-SN Clients) capable to measure and control various parameters and appliances. Each End device connects to the MQTT-SN Gateway and exchange information over it with the MQTT Server. This server can either just pass the information or - if programmed - make decisions how to manage the sensor network by itself.

The network

The network lets you monitor and manage various sensors and appliances over 802.15.4 links to the Gateway (GW). It concentrates the data and translate the MQTT-SN messages into MQTT in both directions to and from MQTT Broker.

All the data is then available to see and manipulate by any MQTT Client end device - smartphone or computer.

Elements


  • Sensors and Actuators - End devices based on Arduino with 802.15.4 transceiver, MQTT-SN Client software and set up
  • MQTT-SN Gateway (GW) - Arduino with 802.15.4 transceiver, MQTT-SN GW software and set up
  • MQTT Broker - Most likely Raspberry Pi
  • MQTT Client - Any smartphone or computer

Sensors and Actuators - End devices


End devices can be various types and constructions. They are able to collect and send information to the Gateway or do some action if a command is received. from the Gateway. The system operates according the MQTT-SN Specifications.

Upon start any client sends CONNECT message to the Gateway. After acknowledged by CONNACK the End device has to periodically send PINGREQ and waits for PINGRESP from the Gateway. In case of timeout the whole procedure starts from the beginning.

Any End device can publish a message to the Gateway. Publishing is made via so called Topics. If the Gateway knows about such topic it will process it. Otherwise the information will be discarded.

To receive a message the End device must first subscribe for such Topic by sending SUBREQ command to the Gateway. The SUBACK is sent back from the Gateway. From now on when the Gateway receives a message under that Topic, it will be send to all subscribed End devices.

Following are some sample diagrams of End devices and Gateways together with the available software sources and descriptions.

The Gateway @ MQTT-SN 802.15.4 Net

The Gateway

The Gateway is built on the ESP12 NodeMCU module. It has a hardware WiFi integrated memory and pins enough. It is connected to the MRF24J40MA transceiver module to connect to the End devices. At the other side messages are translated into MQTT protocol and exchange over a WiFi network.

Gateway firmware on GitHub:

MQTT-SN_GW_802154_V1

End devices @ MQTT-SN 802.15.4 Net

End device Type 1 THR XLP (Low power)

Sleep mode Current consumption down to 4 uA

This is the End device Type 1 THR Extra Low power shcematic. When sleeps it only consumes 4 uA from the power source (measured at VCC = 3.3V). Both DHT11 and MRF24J40MA are powered by Arduino I/Os and are being switched on only when needed.

The 3.3V regulator has to be removed or disconnected as shown.

Charts below show the current consumption reduction down to 4 uA together with the consumption profile.

Source code is available on GitHub.

End device Type 1 THR

This is the client circuit schematic using Arduino ProMini working on 3.3V, MRF24J40MA transceiver module, DHT11 and a reed sensor. The overall schematic combines the Temprature and Reed sensors shown below within one single device: Type 1 THR

More information will be available on GitHub soon.

End device - temperature sensor

This is the client circuit schematic using Arduino ProMini working on 3.3V, MRF24J40MA transceiver module and a DHT11 sensor. The End device publishes periodically the temperature value read from the sensor on specific topic. No level shifter is required when using Arduino ProMini.

Powering can be via Arduino board's RAW input by using 9V battery.

Coin cell example with extreme low power is just being baked!

More information will be available on GitHub soon.

End device - reed sensor for door/window

This is the client circuit schematic using Arduino ProMini working on 3.3V, MRF24J40MA transceiver module and a reed sensor for door or window control. The End device publishes events of door/window open or close once occured. No level shifter is required when using Arduino ProMini.

Powering can be via Arduino board's RAW input by using 9V battery.

End device - LED (any kind of actuator)

This is the End device circuit schematic using Arduino NANO/Iteaduino NANO, MRF24J40MA transceiver module and a LED. The End device subscribes for a specific topic and then waits for a command on the same topic to power the LED ON and OFF. You will also need a level shifter block and a capacitor for the transceiver power rail.


Actuator End device firmware on GitHub: MQTT-SN_802.15.4_Client

MQTT-SN_LED_Video_1.mp4

End device - general circuit


This is the general End device circuit schematic using Arduino/Iteaduino NANO and MRF24J40MA transceiver module. You will also need a level shifter block and a capacitor for the transceiver power rail.



End device - temperature sensor

This is an early beta version of a client device PCB. It combines the Arduino ProMini and MRF24J40MA on one board together with the temperature sensor.

Powering can be by using coin cell, 3.6V Litium battery or the Arduino RAW input.

The board is named Bamboo. It is designed within CircuitMaker as an open source project and can be found on the link below:

https://circuitmaker.com/Projects/Details/Simeon-Ivanov-2/Panda

The Hobby IoT Platform

The OpenHAB Platform @ Raspberry Pi

Coming soon...

MQTT Server


MQTT Server can be built on any suitable device like Raspberry Pi or any other computer. More information of how to install and set up the MQTT Server on Raspberry Pi can be found here.


MQTT Server and Gateway have to see each other over IP network.

MQTT Client


Coming soon...

MQTT-SN 802.15.4 Net Tasks and issues

MQTT-SN 802.15.4 Net Software tasks and issues
MQTT-SN 802.15.4 Net Hardware tasks and issues

Copyright © 2017 - 2018 Hobby IoT