OpenESC is an open-source Electronic Speed Controller (ESC) project for controlling Brushless DC (BLDC) motors. The goal is to provide a versatile and customizable ESC solution that is free for anyone to use and modify, making it a great alternative to proprietary ESC systems. This project will evolve from a basic open-loop controller to a more advanced closed-loop controller with Back-EMF (BEMF) feedback for improved performance.
We've created an extensive Wiki with detailed guides on:
- Setting up the hardware and firmware
- Testing and troubleshooting
- How to contribute to the project
- Open-loop ESC: Initial version based on open-loop control for BLDC motors.
- Back-EMF Feedback: Planned feature for future versions to implement closed-loop control with BEMF sensing.
- MOSFET Control: High-side and low-side MOSFET switching for precise motor control.
- Dead Time and Commutation Delay: Adjustable to prevent shoot-through and optimize commutation timing.
- Modular Structure: Designed for easy development and contributions.
- Open-Source Hardware: PCB design files and schematics are provided for building your own ESC.
-
v2.0 | Open-Loop ESC:
- Basic BLDC control using open-loop commutation.
- Adjustable commutation timing.
- No feedback control.
-
v3.0 | Closed-Loop ESC with BEMF (ongoing work):
- Implement BEMF sensing for feedback control.
- Improve performance and efficiency under varying load conditions.
-
Future Enhancements:
- Current sensing for protection and advanced control.
- Field-Oriented Control (FOC) for smoother and more efficient motor control.
- Parameter tuning for commutation timing, current limits, etc.
OpenESC/
βββ README.md # Overview of the project.
βββ LICENSE # Open-source license.
βββ docs/ # Documentation, schematics, and theory.
β βββ ESC_Schematic.pdf # Circuit diagrams and explanation.
β βββ ESC_Theory.md # How the ESC works, BEMF concepts, etc.
βββ src/ # Source code directory.
β βββ open_loop_esc/ # Open-loop ESC version.
β β βββ open_loop_esc.ino
β βββ bemf_esc/ # BEMF-based closed-loop ESC version (for future).
β β βββ bemf_esc.ino
β βββ common/ # Common libraries or code used by both versions.
βββ hardware/ # PCB design files, BOM, and hardware details.
βββ gerbers/ # PCB Gerber files.
βββ BOM.md # Bill of materials.
- Arduino IDE: You can download the Arduino IDE here.
- ATmega328P-based microcontroller (e.g., Arduino Nano).
- BLDC Motor: Ensure that your motor is compatible with open-loop ESCs.
- MOSFET Drivers: This ESC requires an external driver such as the IR2110 for interfacing with the MOSFETs.
-
Clone the Repository:
git clone https://github.com/yourusername/OpenSourceESC.git
-
Navigate to the Source Code:
cd OpenSourceESC/src/open_loop_esc/
-
Open the Project in Arduino IDE:
- Open the
.ino
file in Arduino IDE. - Select the appropriate board and port in the IDE.
- Open the
-
Upload the Code:
- Upload the firmware to your Arduino-compatible microcontroller.
The open-loop ESC has been tested and verified to produce correct phase switching, stable operation, and is ready for use in various applications. Details of the tests can be found in the docs/testing/ directory, along with oscilloscope captures and test logs.
- PCB Design: The PCB Gerber files and schematics can be found in the
hardware/
directory. - Bill of Materials (BOM): A complete list of components is available in the
BOM.md
file.
The following features and improvements are currently being developed on separate branches:
- BEMF-based Feedback Control: Development of closed-loop ESC with back-EMF feedback is in progress on the
bemf_dev
branch. - Current Sensing: Adding support for current sensors to protect the ESC from overcurrent conditions.
- Advanced Field-Oriented Control (FOC): Future plans to implement FOC for smoother motor control.
To stay updated on these developments, check out the development branches.
We welcome contributions to improve OpenESC!
Please read the Contributing Guidelines to get started. Whether it's bug reports, feature requests, or pull requests, we appreciate any help to make this project better!
This project is licensed under the MIT License - see the LICENSE file for details.
For details about the project's version history, refer to the CHANGELOG.md.