Week 3 - Advanced HID Control, Motor Optimization
🚀 Week 3 - Advanced HID & Motor Optimization
📅 Date: 2025-02-10 – 2025-02-16
🏷️ Tags: Year 2 Project, ESP32-S3, Smart Knob, HID Expansion, FOC, Force Feedback
🎯 This Week's Goals
- Expand Bluetooth HID functionalities to include more input methods (keyboard shortcuts, Surface Dial emulation).
- Optimize motor control using Field-Oriented Control (FOC) to improve force feedback.
- Improve real-time motor response to user interactions.
- Integrate Bluetooth HID with force feedback for dynamic resistance changes.
🔹 1️⃣ Enhancing HID Functionality
To make the Smart Knob more versatile, we expanded its HID (Human Interface Device) capabilities, allowing:
✅ Rotational input mapped to scrolling, zooming, and volume control.
✅ Clicking the knob to perform shortcut actions (e.g., Ctrl+Z, Enter, Tab switching).
✅ Long press and double-click for advanced functions.
✅ Integration with Surface Dial API for better Windows compatibility.
📌 Code Implementation - BLE HID Shortcuts
We modified the BLE HID functions to support custom keyboard shortcuts.
✅ What This Does:
- Expands HID functions to support keyboard shortcuts.
- Allows knob rotation to trigger scrolling or zooming actions.
- Maps button press to Ctrl+Z (undo action).
🔹 2️⃣ Improving Motor Control & Force Feedback
We refined FOC-based motor control to:✅ Provide a smoother force feedback experience.
✅ Adjust torque dynamically based on user input.
✅ Enhance stability at different speed levels.
📌 Code Implementation - Optimized FOC Motor Control
✅ What This Does:
- Uses FOC for precise motor control.
- Dynamically adjusts torque based on rotation feedback.
🔹 3️⃣ HID & Motor Integration for Dynamic Resistance
We integrated HID input with force feedback, so the knob’s resistance changes dynamically based on user actions.
📌 Code Implementation - Bluetooth HID & Motor Synchronization
🔥 Issues & Solutions
Issue Solution Implemented
HID latency in fast interactions Increased Bluetooth polling rate, optimized event handling
Motor resistance was inconsistent Tuned FOC parameters for smoother
HID shortcuts not recognized on some platforms Adjusted HID descriptor mappings Force feedback felt unnatural at low speeds Improved torque scaling for fine control
Issue | Solution Implemented | |
---|---|---|
HID latency in fast interactions | Increased Bluetooth polling rate, optimized event handling | |
Motor resistance was inconsistent | Tuned FOC parameters for smoother | |
HID shortcuts not recognized on some platforms | Adjusted HID descriptor mappings | |
Force feedback felt unnatural at low speeds | Improved torque scaling for fine control |
📌 Next Week's Plan
✅ Integrate Surface Dial support for Windows.✅ Optimize final force feedback adjustments.
✅ Perform complete system testing before final integration.
Comments
Post a Comment