Wiznet makers

scarlet

Published November 30, 2023 ©

100 UCC

12 WCC

22 VAR

0 Contests

0 Followers

0 Following

Original Link

mbed-os6-stm32-w5500-mqtt

Home MQTT ethernet controller using mbed os

COMPONENTS
PROJECT DESCRIPTION

IoT Controller Project (Based on Wiznet W5500, Updated with Role Inclusions)


Project Overview

  • Objective: To enable input/output control and network communication using an IoT controller.
  • Technical Base: Utilizing BluePill (STM32F103C8) and Mbed OS.

Key Components and Functions

Input/Output Management

  • Digital Input/Output: Managing 9 digital inputs and 11 digital outputs.
  • LED Output: Using PC_13 to indicate network status.

Sensors and Interfaces

  • DS18B20 Temperature Sensor: Measuring and transmitting temperature data.
  • I2C Communication: Communicating with OLED display and other I2C-based devices.

Network and MQTT Protocol

  • W5500 Ethernet Interface: Providing stable network connectivity.
  • MQTT Client: Using MQTT protocol for data publishing and subscription.
  • Client and Server Roles
    • Client Role:
      • Reacts to external MQTT commands to control outputs and process sensor data.
      • Connects to the MQTT broker to receive and execute messages.
    • Server-like Functions:
      • Periodically publishes sensor data and controller status information to the MQTT broker.
      • Supports monitoring and control functions of other systems.

System Configuration and Program Logic

  • MQTT Broker Setup: Connecting to an MQTT broker via specified IP and port.
  • Message Handling: Using MQTT to transmit controller status, inputs/outputs, and sensor data.
  • Timer-based Tasks: Periodically updating status and transmitting data.
  • OLED Display Management: Displaying system status and information.

Conclusion and Application Areas

  • This project offers network-based remote monitoring and control capabilities in IoT environments.
  • It allows for the integration of various inputs/outputs and sensors, managing data through network connections.
  • Efficient data communication using the MQTT protocol extends the scope of IoT applications.
Documents
Comments Write