menu
techminis

A naukri.com initiative

google-web-stories
Home

>

IOT News

>

The MQTT P...
source image

Embedded

7d

read

145

img
dot

The MQTT Protocol with Arduino UNO R4 Wi-Fi

  • This article explains how to configure MQTT protocol and prepare a solution to remotely control any type of load.
  • MQTT protocol is suitable for IoT devices which requires a sensor to publish data on a central system, the broker.
  • MQTT broker receives and stores the sensor data, ready to send it to the subscribers via App on a smartphone that subscribes to the topic.
  • The MQTT broker used in the article is “test.mosquitto.org”, using port 1883. The electrical diagram is minimal, that can be adapted to own needs, a thermometer with embedded Arduino UNO R4 with LM35 analog temperature sensor.
  • The firmware for the solution reads the temperature from a sensor, calculates the average, and sends the message via an MQTT message to an online broker.
  • Once connected, the firmware sends the value published every second on the topic “temperature” and important function “client.poll()” is used to keep the connection with the broker alive.
  • Various smartphone applications could be used to receive the temperature data sent by Arduino, the example in the article uses the “IoT MQTT Panel” app. Since it is a public broker, the data can be consulted from anywhere in the world, having an Internet connection and knowing the topic.
  • MQTT is relatively simple to understand the philosophy behind and nowadays designers need to create complete and functional IoT systems. Most development boards have excellent libraries to fully manage this protocol.
  • This article demonstrates how it is possible to connect devices over large distances, using a reliable and versatile communication protocol such as MQTT for remote control.
  • It is important to highlight that not protecting the system with a password can represent a security risk, because anyone who knows the topic could access the system and activate commands without permission.

Read Full Article

like

8 Likes

For uninterrupted reading, download the app