An experimental high-performance four-channel DC motor controller based on Renesas RA8M1 microcontroller with advanced motion control algorithms and comprehensive filesystem support.
MC80_4DC is an experimental DC motor controller designed for precision motion control applications. The project demonstrates advanced embedded systems programming with real-time operating system integration, high-speed communication interfaces, and motor control with analog position feedback.
- Four Independent DC Motor Channels with individual control
- Analog Position Feedback: High-precision analog sensors for position monitoring
- High-Performance MCU: Renesas RA8M1 (ARM Cortex-M85, 480MHz)
- Real-Time Operating System: Azure RTOS ThreadX integration
- Storage Solutions:
- exFAT filesystem on SD card for data logging and configuration
- Custom OSPI driver for external flash memory (under development)
- Communication Interfaces: CAN 2.0 for industrial applications
- Development Environment: Visual Studio Code for code editing, IAR Embedded Workbench 9.70 for compilation
- Comprehensive Debug Support: RTT logging, VT100 terminal interface, SWD/JTAG debug interfaces, and hardware trace
The MC80_4DC motor controller is designed for a wide range of automation and motion control applications:
- Multi-leaf Automatic Doors: Precise control of synchronized door panels
- 3D Rotating Platforms: Solar panel tracking systems and antenna positioning
- Automated Blinds and Awnings: Smart building automation and shading systems
- Gate and Barrier Control: Access control systems and parking barriers
- Stair Lifts: Mobility assistance and accessibility solutions
- Industrial Automation: Various precision motion control applications
- MCU: Renesas RA8M1AH3GT (ARM Cortex-M85, 480MHz)
- Internal Flash: 2MB
- External Flash Memory: MX25UM25645GMI00 (256Mbit OSPI)
- RAM: 1MB internal SRAM
- Package: LQFP176
- Channels: 4 independent DC motor drivers
- Servo Sensors: 2 analog inputs for servo sensor feedback
- Quadrature Encoders: 2 interfaces for incremental position encoders
- Hall Sensors: 2 interfaces for 3-phase Hall sensor inputs
- Analog Inputs: Equipped with differentiator for low speed measurement
- Current Monitoring: Real-time current sensing capabilities
- PWM Generation: High-frequency PWM for motor control
- SD Card: exFAT filesystem for data storage
- CAN 2.0: Industrial communication protocol
- USB: Device and host support
- SWD: Serial Wire Debug interface for programming and debugging
- Trace: Hardware trace interface for real-time debugging
The MC80_4DC board supports multiple control interfaces for different operational scenarios:
- USB Control Software: Specialized control and monitoring software for PC-based testing and debugging
- Terminal Programs: Direct control via USB using standard terminal applications
- Debug Interface: Full development support through SWD and trace interfaces
- CAN Bus Control: Primary control interface for industrial applications
- Real-time Communication: Deterministic control through CAN 2.0 protocol
- Distributed Systems: Integration into larger automation networks
The project is built on Azure RTOS ThreadX, providing:
- Preemptive multitasking
- Real-time scheduling
- Inter-thread communication
- Memory management
- Timer services
DC motor control system featuring:
- Analog Sensor Interface: Multi-channel ADC for position feedback
- Current Monitoring: Real-time current sensing and monitoring
- PWM Control: Hardware-generated PWM signals for motor driving
Advanced storage solution using exFAT on SD card:
- FAT32-compatible filesystem
- Long filename support
- Efficient storage management
- Configuration file storage
- Data logging capabilities
High-performance OSPI flash driver featuring:
- Memory-mapped access capabilities
- DMA-based transfers for maximum throughput
- Protocol switching (SPI โ Octal DDR)
- Comprehensive error handling
- Note: Driver development is ongoing
- Motor Control Task: Real-time motor control operations
- Sensor Processing Task: ADC data acquisition and processing
- Communication Task: Handle CAN 2.0 communication
- Filesystem Task: Background file operations on SD card
- Monitor Task: System health monitoring and diagnostics
- Sensor Sampling: High-frequency ADC conversion
- Interrupt Response: <5ฮผs average interrupt latency
- Task Switching: <1ฮผs context switch time
- File Operations: SD card access with optimized buffering
This project is licensed under the MIT License - see the LICENSE file for details.
This release marks the successful completion of comprehensive filesystem testing and performance analysis for the MC80_4DC platform. The testing framework has been fully validated and provides detailed performance metrics for both supported filesystems.
- Complete Filesystem Testing Framework: Unified testing interface supporting both LittleFS and FileX filesystems
- Performance Analysis Tools: Comprehensive Python-based analysis suite with detailed performance graphs
- Unified Statistics Engine: Common performance measurement framework for both filesystems
- Bug Fixes: Resolved speed calculation issues and disk space reporting accuracy
- Configuration Optimization: FileX directory entry limits configured for optimal performance
The testing framework provides comprehensive analysis of:
- Read Performance: File open/close timing and throughput analysis
- Write Performance: Write speed analysis with first-file overhead measurements
- Delete Performance: Deletion speed analysis with performance degradation tracking
- Storage Efficiency: Accurate disk space utilization and percentage calculations
- Unified Test Functions: FileX read tests now include pattern validation and size verification
- Fixed Statistics Calculations: Corrected average and minimum speed calculations for delete operations
- Accurate Disk Usage: Fixed FileX media information display with proper used space calculations
- Python Analysis Suite: Created universal log parsers supporting both LittleFS and FileX log formats
The release includes Python scripts for detailed performance analysis:
Parse_FS_read_log.py- Read operation analysis with timing breakdownsParse_FS_write_log.py- Write operation analysis with speed metricsParse_FS_delete_log.py- Delete operation analysis with performance tracking
All analysis tools support both filesystem formats and generate comprehensive matplotlib-based visualizations.
MC80_4DC - Experimental DC motor control with precision analog feedback.