kshypachov / f411_io_mod

This project is designed to run on the STM32F411CEUX microcontroller, handling input/output control, networking, and MQTT-based communication. The application interfaces with sensors and actuators, updates statuses in Home Assistant, and uses FreeRTOS to manage concurrent tasks.

Repository from Github https://github.comkshypachov/f411_io_modRepository from Github https://github.comkshypachov/f411_io_mod

F411 IO Mod Project

Build Status

F411 IO Mod is firmware for the STM32F411CEUX microcontroller, designed for digital input/output control, network functionality, and MQTT communication with Home Assistant integration. The device supports over-the-air firmware and web interface updates, runs FreeRTOS for multitasking, and provides a REST API for remote management. Web interface by Roman Lakhnov

Key Features

  • MQTT: Data publishing and command reception, compatible with Home Assistant.
  • REST API: Device control, configuration, updates, and log management.
  • FreeRTOS: Tasks for IO, networking, settings, and display.
  • File System: LittleFS for settings and web interface storage.

Device Setup

  1. Download from the Releases section:

    • f411_io_mod_bootloader.hex — bootloader.
    • f411_io_mod.hex — main firmware.
  2. Flash the bootloader:

    • Hold the Boot button and connect the board to USB.
    • Flash f411_io_mod_bootloader.hex using STM32CubeProgrammer.
  3. Flash the main firmware:

    • Flash f411_io_mod.hex using STM32CubeProgrammer.
  4. Reboot the device (Reset button):

    • The LED will blink 4 times, and the firmware version will be displayed on the OLED.
    • After connecting Ethernet, the device will acquire an IP address and display it.

Uploading the Web Interface

  1. Download:

    • web_interface.zip — web interface files.
    • web_interface_uploader_win.exe or web_interface_uploader_mac.app.zip depending on your OS.
  2. Extract web_interface.zip.

  3. Launch the uploader, enter the device IP (http://<ip>) and login as admin/admin.

  4. Select the extracted web interface folder and click Upload.

Device and Interface Gallery

Below are images showcasing the F411 IO Mod hardware and interface.

  • Assembled Device:
    Assembled Device

  • 3D Render of the Device:
    3D Render

  • PCB Layout Render:
    PCB Render

  • Web Interface Screenshots:
    Web UI - Overview
    Web UI - Settings

Quick Start

  • The project is built using STM32CubeIDE.
  • MQTT configuration is available via the web interface.
  • Connect the device to your network for access.

Web API

Full API documentation is available here: API.md


FreeRTOS Tasks

  • Ethernet Task: Manages network and MQTT.
  • IO Task: Monitors inputs, controls outputs.
  • Settings Task: Manages configuration.
  • Display Task: Displays data (optional).

License

MIT License — see LICENSE.

Contributions

PRs and suggestions are welcome. Feedback via Issues.

Acknowledgments

About

This project is designed to run on the STM32F411CEUX microcontroller, handling input/output control, networking, and MQTT-based communication. The application interfaces with sensors and actuators, updates statuses in Home Assistant, and uses FreeRTOS to manage concurrent tasks.

License:GNU General Public License v3.0


Languages

Language:C 92.6%Language:Makefile 6.6%Language:C++ 0.4%Language:Assembly 0.2%Language:Linker Script 0.1%