Wiznet makers

josephsr

Published July 05, 2026 ©

135 UCC

13 WCC

13 VAR

0 Contests

0 Followers

0 Following

Original Link

CMVC_B: STM32F407-Based ROV Control Firmware with W5500 UDP Communication

A+n underwater ROV control workspace combining STM32F407 actuator firmware, a PyQt operator station, YOLO-based barnacle vision, and a W5500 UDP FW path.

COMPONENTS
PROJECT DESCRIPTION

Project Overview

CMVC_B is a comprehensive engineering workspace for an underwater robot, or ROV, built around an STM32F407 control board. The repository is organized into three main lines: embedded firmware, a PC-side operator station, and a barnacle vision module. The embedded line progresses from module-level tests to integrated actuator firmware and a separate W5500 UDP communication firmware path. The PC-side line provides a PyQt operator interface, gamepad input, UDP command transmission, and safety arbitration through RobotBrain. The vision line covers underwater image preprocessing, YOLO barnacle detection, offline prediction, RTSP runtime vision, and robot linkage.

The integrated STM32F407 firmware targets an actuator-heavy ROV control board. It drives eight thrusters, an adsorption motor, two linear actuators, two lighting channels, a yaw stepper gimbal, and a solenoid valve relay. The main integrated firmware is based on STM32 Standard Peripheral Library and uses a Keil project entry under Final/F407主控/USER/Template.uvprojx.


Project Type

ItemAssessment
System typeUnderwater robot / ROV control workspace
MCU targetSTM32F407ZG / STM32F407VE, depending on project branch
Main embedded roleActuator output control, initialization state management, PWM/GPIO output, safety stop
PC-side rolePyQt HMI, gamepad control, UDP command transmission, vision linkage
Vision roleYOLO-based barnacle detection, RTSP runtime vision
Network roleW5500 UDP command path exists as a separate firmware branch; W5500 is only reserved in the integrated actuator firmware

System Architecture and Operation Flow

 
Operator / Vision Layer
    |
    |  PyQt HMI, gamepad input, RobotBrain safety arbitration
    |  YOLO barnacle detection, RTSP runtime vision
    v
PC-side command layer
    |
    |  UDP command output
    v
STM32F407 + W5500 UDP firmware path
    |
    |  PING / MOVE / STOP / ESTOP command parsing
    v
STM32F407 integrated actuator firmware
    |
    |  PWM / GPIO / timer-driven actuator control
    v
ROV actuators
    |
    |-- 8 thrusters, 50 Hz ESC PWM
    |-- adsorption motor, 50 Hz ESC PWM
    |-- 2 linear actuators, 10 kHz PWM + direction GPIO
    |-- 2 lights, 1 kHz PWM dimming
    |-- yaw stepper gimbal, 500 Hz pulse
    |-- PB12 solenoid valve relay
 

The repository-level architecture defines the PC operator station and barnacle vision module as command-generation layers, while STM32F407 firmware handles low-level actuator execution. The documented flow links Test/* module experiments to the integrated Final/F407主控 firmware and then to firmware/stm32-w5500-udp; robot-station and barnacle-vision connect to the UDP firmware path.

The integrated firmware keeps high-level mixing, automation, and linkage on the host side. The STM32 firmware is responsible for limiting, PWM/GPIO output, initialization state machines, and safe stopping.


Hardware and Firmware Characteristics

ModuleConfirmed Implementation
Thrusters T1–T8TIM3/TIM4, 50 Hz ESC PWM, 1000–2000 μs pulse range, 1500 μs neutral
Adsorption motorTIM8 CH4, 50 Hz ESC PWM
Linear actuators A/BTIM9 CH1/CH2, 10 kHz PWM with direction GPIO
Lights A/BTIM1 CH1/CH4, 1 kHz PWM dimming
Yaw stepper gimbalTIM5 CH1, 500 Hz pulse, direction and enable GPIO
Solenoid valve relayPB12 GPIO, high level active
System tickTIM2, 50 Hz control tick
Main communicationUSART1 + DMA reserved but not implemented in the integrated firmware
Debug communicationUSART3 + DMA planned / reserved
W5500 EthernetSPI1 pins reserved in integrated firmware; separate W5500 UDP firmware exists

The integrated firmware documents concrete pin assignments and timer usage for the actuator set. W5500 Ethernet is reserved on SPI1 with CS PA4, SCK PA5, MISO PA6, MOSI PA7, and RST PB0, but the integrated firmware explicitly states that SPI1 is not initialized at the current stage.

The initialization sequence starts delay setup, thruster PWM/control initialization, adsorption motor initialization, actuator PWM/control/timer initialization, light control, valve control, stepper control, and then TIM2 control tick initialization. Thruster and adsorption ESC outputs are held through an initialization window before normal command acceptance.


WIZnet Product Usage and System Role

WIZnet Product Role: W5500 Ethernet Controller

The repository contains two different W5500 contexts:

ContextW5500 StatusRole
Final/F407主控 integrated actuator firmwareReserved, not initializedPlanned SPI-based Ethernet interface for future network communication
firmware/stm32-w5500-udpImplemented as a separate firmware pathUDP command receiver using W5500 socket registers

In the integrated actuator firmware, W5500 is documented as a reserved Ethernet module on SPI1. The pins are assigned and protected for W5500 use, but the firmware does not initialize SPI1 for W5500 in that stage.

In the standalone W5500 UDP firmware, the code maps W5500 pins to PA5/PA6/PA7/PA4/PB0, defines W5500 register blocks and socket registers, configures IP 192.168.1.200, and opens UDP port 1112. It supports PING, MOVE vx vy wz, STOP, and ESTOP command strings.

The firmware/stm32-w5500-udp README states that legacy-root-main.c is an independent firmware file found before repository organization and is retained for comparison; it does not automatically participate in the Keil build. This means W5500 UDP behavior is present in the repository but should not be treated as fully merged into the integrated actuator firmware.


TOE Usage

TOE Usage: Partially confirmed, separate W5500 UDP firmware only.

The standalone W5500 UDP firmware directly controls W5500 socket registers rather than using Arduino Ethernet, ESP-IDF esp_eth, esp_netif, lwIP sockets, or another high-level network stack. The code writes socket mode register S0_MR with UDP mode, configures S0_PORT, RX/TX buffer sizes, issues SOCK_OPEN, reads S0_RX_RSR and S0_RX_RD, copies W5500 RX buffer content, sends responses through TX buffer writes, and issues W5500 socket commands.

LayerAssessment
WIZnet socket register direct controlConfirmed in legacy-root-main.c
Arduino Ethernet libraryNot confirmed
ESP-IDF esp_eth / esp_netif / lwIP socket pathNot confirmed
Integrated Final/F407主控 TOE activationNot active; W5500 is reserved but not initialized
Final TOE judgmentW5500 TOE use is confirmed only in the standalone UDP firmware path, not in the integrated actuator firmware

Hybrid Network Assessment

Hybrid Network: 저장소 내 명시 없음

The repository confirms UDP communication and RTSP vision runtime, but it does not clearly document a combined wired-plus-wireless network design inside one deployed system. The presence of W5500 Ethernet and RTSP-related vision tooling is not enough to classify the system as a hybrid wired/wireless network.


Strengths

StrengthTechnical Meaning
Clear actuator decompositionThrusters, adsorption motor, actuators, lights, stepper, and valve are separated into specific control modules.
Concrete pin and timer planningGPIO, timer channel, frequency, and actuator semantics are documented in detail.
Safety-oriented initializationThruster and adsorption outputs include initialization gating before accepting normal commands.
PC-to-MCU architecturePyQt HMI, gamepad input, vision linkage, and UDP command transport are separated from low-level MCU actuator output.
W5500 low-level UDP exampleThe standalone firmware provides direct W5500 register and socket-level UDP handling useful for bring-up and validation.

Limitations

LimitationTechnical Impact
W5500 not integrated into the main actuator firmwareThe integrated Final/F407主控 firmware reserves W5500 pins but does not initialize SPI1 or run Ethernet communication.
legacy-root-main.c is not automatically builtThe available W5500 UDP implementation is retained for comparison and is not automatically part of the Keil build.
Main USART/DMA communication is reserved but not implementedThe documented main communication path still requires protocol integration work.
Vision dataset asset is incompleteThe barnacle vision README states that the expected dataset YAML is not currently in the workspace.
Hardware validation scope is unclearRepository documentation gives strong pin/control planning, but full integrated hardware test evidence is not clearly confirmed.

Application Value

CMVC_B has value as a structured ROV control reference combining actuator firmware, PC-side command control, and computer vision linkage. Its strongest practical value is not a finished commercial control stack but a traceable engineering workspace for ROV actuator bring-up, PWM mapping, safety gating, W5500 UDP command validation, and PC-to-MCU command integration.

The W5500 portion is especially useful as a low-level STM32F4 bring-up reference because it demonstrates direct SPI register access, W5500 network configuration, UDP socket opening, RX polling, command parsing, and response transmission without relying on a high-level TCP/IP software stack.


Final Summary

CMVC_B is an ROV-oriented engineering workspace built around STM32F407 actuator control, PyQt-based operator control, and YOLO-based underwater vision. The integrated firmware is well documented for PWM/GPIO actuator control and initialization safety, while W5500 is reserved but not active there. A separate W5500 UDP firmware path confirms direct WIZnet socket-register control and UDP command handling, but repository documentation indicates that this file is retained for comparison and is not automatically included in the Keil build. The project is best understood as an evolving ROV control integration workspace with a validated-looking W5500 UDP bring-up path and a still-separate actuator integration layer.

Author Information

The repository owner is kevinEDWARDS7. The GitHub page lists the repository as public, with no description, website, or topics provided, and the visible language breakdown is mainly C and Python.


CMVC_B: STM32F407 기반 ROV 제어 펌웨어와 W5500 UDP 통신 경로


프로젝트 개요

CMVC_B는 STM32F407 제어 보드를 중심으로 구성된 수중 로봇, 즉 ROV용 종합 엔지니어링 저장소다. 저장소는 크게 세 흐름으로 구성된다. 첫째는 Test, Final, firmware로 이어지는 임베디드 펌웨어 흐름이고, 둘째는 PyQt 기반 상위 제어기인 robot-station, 셋째는 YOLO 기반 따개비 인식과 RTSP 실시간 비전 런타임을 다루는 barnacle-vision이다.

통합 펌웨어인 Final/F407主控는 STM32F407VE 기반의 전 실행기 제어 펌웨어로 문서화되어 있으며, 8개 추진기, 흡착 모터, 전동 푸시로드 2개, 조명 2채널, Yaw 스테퍼 짐벌, PB12 전자밸브 릴레이를 제어 대상으로 둔다. Keil 프로젝트 진입점은 Final/F407主控/USER/Template.uvprojx로 제시되어 있다.


프로젝트 유형

항목판단
시스템 유형수중 로봇 / ROV 제어 작업 공간
대상 MCUSTM32F407ZG / STM32F407VE
임베디드 역할PWM/GPIO 출력, 실행기 제한, 초기화 상태 관리, 안전 정지
상위 제어 역할PyQt HMI, 게임패드 입력, UDP 명령 전송, RobotBrain 안전 중재
비전 역할YOLO 기반 따개비 검출, RTSP 실시간 비전 처리
네트워크 역할별도 W5500 UDP 펌웨어 경로 존재, 통합 실행기 펌웨어에서는 W5500 예약 상태

시스템 구조와 동작 흐름

 
상위 제어 / 비전 계층
    |
    |  PyQt HMI, 게임패드 입력, RobotBrain 안전 중재
    |  YOLO 따개비 검출, RTSP 실시간 비전
    v
PC 명령 계층
    |
    |  UDP 명령 송신
    v
STM32F407 + W5500 UDP 펌웨어 경로
    |
    |  PING / MOVE / STOP / ESTOP 명령 해석
    v
STM32F407 통합 실행기 펌웨어
    |
    |  PWM / GPIO / 타이머 기반 실행기 제어
    v
ROV 실행기
    |
    |-- 8개 추진기, 50 Hz ESC PWM
    |-- 흡착 모터, 50 Hz ESC PWM
    |-- 전동 푸시로드 2개, 10 kHz PWM + 방향 GPIO
    |-- 조명 2채널, 1 kHz PWM 디밍
    |-- Yaw 스테퍼 짐벌, 500 Hz 펄스
    |-- PB12 전자밸브 릴레이
 

저장소의 구조 문서는 Test/* 단위 실험, Final/F407主控 통합 실행기 펌웨어, firmware/stm32-w5500-udp 이더넷 UDP 통신 흐름을 하나의 개발 흐름으로 정리한다. PC 측 robot-station은 UDP 명령을 송신하고, barnacle-vision은 비전 결과를 로봇 제어 흐름에 연계하는 구조로 설명된다.

통합 펌웨어에서 혼합 제어, 자동화, 연동은 상위 컴퓨터가 담당하고, STM32F407 펌웨어는 제한값 처리, PWM/GPIO 출력, 초기화 상태기계, 안전 정지를 담당한다.


하드웨어 및 펌웨어 구성

모듈확인된 구현
추진기 T1–T8TIM3/TIM4, 50 Hz ESC PWM, 1000–2000 μs, 1500 μs 중립
흡착 모터TIM8 CH4, 50 Hz ESC PWM
전동 푸시로드 A/BTIM9 CH1/CH2, 10 kHz PWM + 방향 GPIO
조명 A/BTIM1 CH1/CH4, 1 kHz PWM 디밍
Yaw 스테퍼 짐벌TIM5 CH1, 500 Hz 펄스, 방향/활성 GPIO
전자밸브 릴레이PB12 GPIO, High 레벨 흡합
시스템 제어 주기TIM2, 50 Hz
주 통신USART1 + DMA 예약, 현재 미구현
디버그 통신USART3 + DMA 예약
W5500 Ethernet통합 펌웨어에서는 SPI1 핀 예약, 별도 UDP 펌웨어에는 구현 존재

통합 펌웨어 문서는 실행기별 핀, 타이머 채널, PWM 주파수를 구체적으로 제시한다. W5500은 SPI1 기반 이더넷 모듈로 예약되어 있으며 CS PA4, SCK PA5, MISO PA6, MOSI PA7, RST PB0를 사용하도록 정리되어 있다. 다만 통합 펌웨어 문서에는 현재 SPI1을 초기화하지 않는다고 명시되어 있다.

전원 인가 후 초기화 흐름은 지연 초기화, 추진기 PWM/제어 초기화, 흡착 모터 초기화, 전동 푸시로드 PWM/제어/타이머 초기화, 조명 제어, 전자밸브 제어, 스테퍼 제어, TIM2 제어 주기 초기화 순서로 정리되어 있다. 추진기와 흡착 모터는 초기화 완료 전 일반 명령을 받지 않는 구조다.


WIZnet 제품 사용 여부와 시스템 내 역할

WIZnet Product Role: W5500 Ethernet Controller

이 저장소의 W5500 사용은 두 층위로 나누어 판단해야 한다.

구분W5500 상태시스템 내 역할
Final/F407主控 통합 실행기 펌웨어예약됨, 현재 초기화 없음향후 네트워크 통신을 위한 SPI 기반 Ethernet 인터페이스
firmware/stm32-w5500-udp별도 펌웨어 경로로 구현됨UDP 명령 수신 및 응답 송신용 W5500 socket register 기반 통신

통합 실행기 펌웨어에서는 W5500이 SPI1 기반 이더넷 모듈로 예약되어 있으나, 현재 단계에서는 SPI1 초기화가 수행되지 않는다. 따라서 해당 통합 펌웨어만 기준으로 보면 W5500은 “활성 사용”이 아니라 “하드웨어 및 매크로 예약” 상태다.

반면 firmware/stm32-w5500-udp의 별도 펌웨어에는 W5500 핀 매핑, W5500 공통 레지스터와 Socket0 레지스터 정의, IP 192.168.1.200, UDP 포트 1112, PING, MOVE vx vy wz, STOP, ESTOP 명령 처리가 포함되어 있다.

단, firmware/stm32-w5500-udp의 README는 legacy-root-main.c가 정리 전 발견된 독립 펌웨어 파일이며 Keil 빌드에 자동 참여하지 않는다고 설명한다. 따라서 W5500 UDP 구현은 저장소 안에 존재하지만, 통합 실행기 펌웨어에 완전히 병합된 상태로 단정할 수 없다.


TOE 사용 여부

TOE 사용 여부: 별도 W5500 UDP 펌웨어에서 부분 확인

legacy-root-main.c는 W5500 socket register를 직접 제어하는 구조다. Arduino Ethernet 라이브러리, ESP-IDF esp_eth, esp_netif, lwIP socket 계층을 사용하는 흔적은 확인되지 않는다. 코드에서는 S0_MR에 UDP 모드를 설정하고, S0_PORT, RX/TX 버퍼 크기, SOCK_OPEN, S0_RX_RSR, S0_RX_RD, RX 버퍼 읽기, TX 버퍼 쓰기, SOCK_SEND, SOCK_RECV 흐름을 직접 처리한다.

판단 항목결과
WIZnet chip socket register 직접 제어legacy-root-main.c에서 확인됨
Arduino Ethernet library 경유코드상 확인되지 않음
ESP-IDF esp_eth / esp_netif / lwIP socket 계층 경유코드상 확인되지 않음
Final/F407主控 통합 펌웨어 내 TOE 활성화확인되지 않음, W5500은 예약 상태
최종 판단W5500 TOE 기반 UDP 경로는 별도 펌웨어에서 확인되며, 통합 실행기 펌웨어에서는 활성화되지 않음

Hybrid Network 여부

Hybrid Network: 저장소 내 명시 없음

저장소에는 UDP 통신, W5500 Ethernet, RTSP 비전 런타임이 등장하지만, 하나의 배포 시스템 안에서 유선 네트워크와 무선 네트워크를 동시에 사용하는 구조는 명확히 문서화되어 있지 않다. 단순히 Ethernet 경로와 RTSP 비전 기능이 함께 존재한다는 이유만으로 Hybrid Network로 판단하기는 어렵다.


장점

장점기술적 의미
실행기 분해가 명확함추진기, 흡착 모터, 푸시로드, 조명, 스테퍼, 전자밸브가 모듈별로 분리되어 있다.
핀/타이머 계획이 구체적임GPIO, 타이머 채널, 주파수, 제어 의미가 문서에 상세히 정리되어 있다.
초기화 안전 구조가 있음추진기와 흡착 모터는 초기화 완료 전 명령을 무시하는 구조를 갖는다.
PC-MCU 역할 분리가 있음상위 제어, 비전, 입력 처리는 PC 측에 두고, MCU는 실행기 출력에 집중한다.
W5500 저수준 UDP 예제가 있음W5500 socket register 직접 제어 기반 UDP 수신/응답 흐름을 확인할 수 있다.

한계

한계영향
W5500이 통합 펌웨어에 아직 활성 통합되지 않음Final/F407主控 기준으로는 Ethernet 통신이 예약 상태에 머문다.
legacy-root-main.c가 자동 빌드 대상이 아님W5500 UDP 구현을 실제 통합 펌웨어 기능으로 단정할 수 없다.
주 통신 USART/DMA가 미구현 상태향후 프레임 프로토콜 및 통신 루프 연결 작업이 필요하다.
비전 데이터셋 자산이 저장소에 완비되지 않음barnacle-vision README는 기대하는 dataset YAML이 현재 작업 공간에 없다고 설명한다.
통합 실기 검증 범위가 불명확함핀맵과 제어 규칙은 상세하지만, 전체 ROV 하드웨어 통합 검증 결과는 저장소 내 명시 없음.

적용 가치

CMVC_B의 적용 가치는 완성형 상용 제어 스택보다는 ROV 제어 시스템을 단계적으로 구성하는 엔지니어링 참조에 있다. 실행기 PWM 매핑, ESC 초기화, 안전 정지, 전동 푸시로드 타임아웃, 조명 PWM 디밍, 스테퍼 짐벌 제어, 전자밸브 릴레이 제어가 하나의 STM32F407 기반 작업 공간에 정리되어 있다.

W5500 관련 부분은 STM32F4에서 W5500을 저수준으로 bring-up하는 참고 자료로 가치가 있다. SPI를 통한 W5500 레지스터 접근, 네트워크 설정, UDP Socket0 오픈, RX 폴링, 명령 문자열 파싱, 응답 송신 흐름을 고수준 TCP/IP 소프트웨어 스택 없이 확인할 수 있다.


최종 요약

CMVC_B는 STM32F407 기반 ROV 실행기 제어, PyQt 상위 제어, YOLO 기반 수중 비전을 함께 담은 통합 작업 공간이다. 통합 실행기 펌웨어는 PWM/GPIO 출력과 초기화 안전 구조가 비교적 상세히 문서화되어 있으며, W5500은 해당 통합 펌웨어 안에서 예약 상태로 남아 있다. 별도 firmware/stm32-w5500-udp 경로에는 W5500 socket register 직접 제어 기반 UDP 명령 처리 코드가 존재하지만, 저장소 문서상 이 파일은 Keil 빌드에 자동 포함되지 않는 비교용 독립 펌웨어로 설명된다. 따라서 이 프로젝트는 W5500 UDP bring-up 경로와 ROV 실행기 통합 펌웨어가 공존하지만, 두 흐름의 완전한 통합은 저장소 내에서 확인되지 않는다.

저자 정보

저장소 소유자는 kevinEDWARDS7이다. GitHub 페이지 기준 저장소는 public으로 표시되며, 별도 description, website, topics는 제공되지 않는다. 언어 구성은 C와 Python이 중심으로 표시된다.

Documents
  • CMVC_B

Comments Write