# BLDC Commutation Timing Calculator AI Agent Connect

> BLDC Commutation Timing Calculator MCP handles the heavy math for brushless DC motor engineering. Your AI client can now compute electrical frequencies, sector tables, and switching timestamps. It uses pole pairs, mechanical speed, and hall-sensor offsets to derive exact phase orders and timing intervals for your motor control logic.

## Overview
- **Category:** engineering
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_MQFyOeFp08GQ3ED2Yd6A6iSK0AeBApFu35GjYHHI/ai-agent-connect
- **Tags:** bldc, motor-control, electrical-engineering, commutation, robotics

## Description

You can stop manually calculating commutation parameters for your motor control loops. This MCP gives your AI client the ability to handle the complex math required for Brushless DC (BLDC) motor engineering. Instead of running manual scripts, you can ask your agent to derive the exact phase order and timing intervals needed for precise commutation. It takes your input for pole pairs, mechanical speed, and hall-sensor offsets to produce accurate results. You can also use it to verify that your PWM frequency provides enough resolution for your target electrical frequency. It's a direct way to bridge the gap between motor specifications and the actual timing logic used in your firmware or control hardware.

## Tools

### calculate_motor_timing
This tool performs the core math for all electrical timing and sequencing parameters. It calculates phase order and timing intervals based on your motor's specific configuration.

### get_sector_details
This tool retrieves the specific angle boundaries for a chosen commutation sector. It helps you identify exactly when specific phases should be active.

### validate_timing_resolution
This tool checks if your PWM frequency is high enough to maintain sufficient resolution for your target electrical frequency.

## Prompt Examples

**Prompt:** 
```
Calculate the motor timing for a motor with 4 pole pairs running at 3000 RPM, with a 5-degree hall sensor offset and 2-degree electrical advance, using a 20kHz PWM frequency and trapezoidal commutation.
```

**Response:** 
```
The electrical frequency is 200 Hz. The phase order is [A, B, C] and the switching intervals have been calculated based on the 4 pole pairs and specified offsets.
```

**Prompt:** 
```
What are the angle boundaries for sector 3 of a motor with 2 pole pairs?
```

**Response:** 
```
For sector 3 with 2 pole pairs, the start angle is 120.0 degrees and the end angle is 180.0 degrees, with phases B and C being active.
```

**Prompt:** 
```
Is a 15kHz PWM frequency sufficient for an electrical frequency of 400 Hz?
```

**Response:** 
```
Yes, the resolution is sufficient as the PWM frequency is significantly higher than the electrical frequency.
```

## Capabilities

### Timing Calculations
Your agent calculates electrical frequency and switching timestamps.

### Phase Sequencing
Your agent determines the exact phase order for motor commutation.

### Sector Analysis
Your client inspects specific angle boundaries for commutation sectors.

### Resolution Validation
The tool checks if PWM frequency meets the requirements for the electrical frequency.

## Use Cases

### Firmware Development
Generate the timing parameters needed to implement trapezoidal or sinusoidal commutation in code.

### Hardware Validation
Verify that your chosen PWM frequency provides enough resolution for high-speed motor operation.

### Motor Characterization
Calculate electrical frequency and phase sequences based on mechanical speed and pole pair counts.

### Control Loop Tuning
Use sector details to understand phase transitions during motor rotation.

## Benefits

- Reduces manual calculation errors in motor timing math.
- Provides instant phase order and timing interval data.
- Validates PWM frequency against electrical frequency requirements.
- Simplifies the derivation of sector boundaries.

## How It Works

Connect your client to Vinkius and start asking for motor math immediately.

1. Connect your MCP-compatible client like Claude or Cursor to Vinkius.
2. Provide motor specifications such as pole pairs, RPM, and offsets to your agent.
3. Your agent uses the tools to compute timing, sectors, or resolution.
4. Receive the calculated parameters directly in your chat interface.

## Frequently Asked Questions

**What kind of motors can I use this for?**
This MCP is specifically designed for Brushless DC (BLDC) motor control engineering.

**Which AI clients can use this MCP?**
You can use this with any MCP-compatible client, including Claude, Cursor, and Windsurf.

**Can it help with PWM frequency selection?**
Yes, the validate_timing_resolution tool checks if your PWM frequency is high enough for your target electrical frequency.

**Do I need to host the MCP myself?**
No, Vinkius hosts and manages the MCP for you. You connect and use it.

**What inputs are needed for motor timing?**
You typically provide pole pairs, mechanical speed, hall-sensor offsets, and electrical advance.

**What parameters are required for motor timing calculations?**
To use `calculate_motor_timing`, you need to provide the pole pairs, mechanical RPM, hall-sensor offset, electrical advance, PWM frequency, and the commutation convention.

**How can I check if my PWM frequency is sufficient?**
You can use the `validate_timing_resolution` tool to compare your target electrical frequency against your PWM carrier frequency to ensure timing precision.

**Can I retrieve specific sector information?**
Yes, the `get_sector_details` tool allows you to query the start angle, end angle, and active phases for any specific commutation sector.
