STM32F446ZE & FT800

STM32F446ZE & FT800 Advanced Datalogger and HMI System

This project was developed as a Microprocessors course final project. It is an advanced embedded system application that monitors temperature and humidity data, visualizes them on a graphical HMI screen, indicates system status through an RGB LED ring, and transfers data to external systems via UART.

The system is built around the STM32F446ZE microcontroller, FT800 EVE graphics engine, DHT11 temperature-humidity sensor, WS2812 RGB LED ring, and KY-040 rotary encoder components.

STM32 HAL FT800 EVE SPI UART DHT11 WS2812 Fusion 360

Project Demonstration Video

The video below presents a general demonstration of the project, including FT800 EVE display and touch panel integration, system operation, menu and submenu navigation, rotary encoder control, and RGB ring LED system integration.

STM32F446ZE ADVANCED DATALOGGER AND HMI SYSTEM

1. Project Overview and Main Objectives

The project was designed to monitor temperature and humidity data in industrial environments with high precision in real time, visualize them on an HMI screen, dynamically indicate system status through an RGB LED ring, and transfer collected data to external systems via UART.

User interaction is provided through the touch screen and KY-040 rotary encoder. The system presents measurement data both as real-time values and as historical data graphs.

STM32F446ZE FT800 Datalogger General View

2. System Hardware Components

Component Model / Type Role in the System
Main Processor Board STM32 Nucleo-F446ZE ARM Cortex-M4 based main control unit. It manages sensor reading, data processing, display commands, timing, and LED control.
HMI Graphics Engine FT800 EVE Board 4.3" SPI-interface resistive touch display with 480x272 resolution and an integrated graphics engine.
Environmental Sensor DHT11 Measures temperature and relative humidity via a single-wire digital protocol.
Status Indicator WS2812 5050 RGB Ring Indicates normal operation, data transfer, and alarm states using colored LED feedback.
User Input KY-040 Rotary Encoder Used for menu navigation, parameter selection, and confirmation.

3. Hardware Architecture and Pin Configuration

Component Signal STM32 Pin Description
FT800 Display SPI_MOSI PA7 SPI1 data output
SPI_MISOPA6SPI1 data input
SPI_SCKPA5SPI clock line
FT800_CSPA4Active-low Chip Select control line
FT800_PDNPB2Power-down / hardware reset line
DHT11 Sensor DATA_LINE PC0 Input/output line requiring precise software timing
WS2812 LED Ring DI PB14 / PD1 Dynamically timed single-wire LED control signal
PC Connection TX / RX PD5 / PD6 USART2, debugging and data transfer, 115200 baud

4. Software Architecture and Code Analysis

The software is built on the STM32 HAL architecture. A non-blocking timing approach is used in the main loop. Sensor data is read approximately every 2000 ms, while display refresh operations are performed approximately every 30 ms.

FT800 Display List Structure

The FT800 EVE engine creates graphical objects using Display List commands. Buttons, indicators, dials, text, and graphical areas are sent by the STM32 to the FT800 command queue over SPI.

void Display_Goster(void) {
  FT800_DisplayStart();
  cmd_clearcolor(0x001B2E3C);
  cmd_clear(1, 1, 1);

  if(aktif_sayfa == 0) {
    cmd_text(240, 20, 29, OPT_CENTER, "ANLIK VERI TAKIP PANELI");
    cmd_dial(120, 130, 60, 0, (sicaklik * 65535) / 50);
    cmd_gauge(360, 130, 60, 0, 4, 10, nem, 100);
    cmd_button(20, 240, 130, 30, 26, 0, "Disa Aktar (TXT)");
  }

  FT800_DisplayEnd();
}

As a critical performance point, the REG_CMD_WRITE and REG_CMD_READ pointers are synchronized to prevent overflow of the FT800 internal SPI FIFO area.

5. Advanced Data Export Functions

The system is designed to support different data formats so that measured data can be transferred to host computer software or industrial systems:

  • TXT Format: Readable line-based raw data stream.
  • XML Format: Tag-based structured data transfer.
  • PDF Data Stream: Raw data channel that can be converted into a report by host computer software.
  • CSV Logic: Allows measurement data to be analyzed in spreadsheet and graphing applications.

Data Export Panel

6. Mechanical Design and Fusion 360 Integration

A protective mechanical enclosure was designed in Fusion 360 to ensure stable operation under field conditions. The enclosure was modeled by considering the display, encoder, board placement, cabling, and ventilation requirements.

  • Form Factor: Hybrid design suitable for portable use and panel mounting.
  • Ergonomics: Access area on the right side for the KY-040 rotary encoder.
  • Knurled Texture: Knurled surface that reduces slipping for the encoder knob.
  • Sensor Thermal Management: Ventilation channels to prevent the DHT11 sensor from being affected by internal enclosure heat.
  • Assembly: M3 screw connections and brass insert slots.

Mechanical Integration Drawing

7. System Results and Performance Analysis

  • Graphical Interface Speed: The FT800 SPI clock frequency was configured at 21 MHz, and no delay was observed during screen transitions.
  • Sensor Stability: DHT11 single-wire timing was managed with microsecond precision.
  • Status Indication: The WS2812 LED ring indicated normal operation, data transfer, and alarm states using colors.
  • State Machine: A 3-second green data transfer feedback was provided using the USB recording LED mode.
  • Interface Optimization: Button widths and page transitions were optimized for the 480x272 screen resolution.
Tufan DAĞ

Tufan DAĞ

A technical project developer working in biomedical device technology, embedded system design, technical service, calibration, and mechanical integration, combining hardware and software together.