-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Welcome to the OpenESC Wiki!
OpenESC is an open-source electronic speed controller (ESC) project aimed at providing a flexible and customizable alternative to commercial ESCs. The goal is to create ESC firmware that can be used for sensorless BLDC motor control, starting with open-loop control, and evolving to include closed-loop BEMF (back electromotive force) sensing.
This guide will walk you through setting up the OpenESC project, including hardware setup, software requirements, and uploading your first firmware to the ESC.
Requirements:
- Arduino Nano (or other compatible microcontroller)
- IR2110 MOSFET driver
- BLDC Motor (e.g., Emax MT3506-650KV)
- Power supply (12V 4A)
- Oscilloscope (for phase testing)
- Input components (e.g., potentiometer, drone receiver)
Steps:
OpenESC currently has an open-loop ESC version. A future BEMF (back electromotive force) version will provide closed-loop control for sensorless BLDC motors.
The first release of the OpenESC project is an open-loop controller based on potentiometer input. This version doesn't use any feedback from the motor, but instead drives the motor with a fixed commutation sequence.
Features:
- Potentiometer-based speed control
- Fixed commutation sequence
- Adjustable delay for phase switching
- Dead time to prevent shoot-through
How to Use:
- Connect the potentiometer to the analog pin (A1).
- Flash the open_loop_esc_v1.ino firmware.
- Power the ESC and adjust the potentiometer to control motor speed.
Expected Behavior:
- The BLDC motor should start with smooth commutation as the potentiometer is turned.
- The oscilloscope should show 120-degree phase shifts between phases.
Source Code: Open Loop ESC v1.0
The BEMF (Back EMF) version of the firmware (v2.0) is under development. This version will feature closed-loop control using the back EMF from the motor to determine rotor position, improving motor efficiency and torque at higher speeds.
Features Planned:
- Sensorless BLDC control using BEMF
- Improved startup sequence
- Increased efficiency and motor torque
Stay tuned for updates!
This section provides a detailed guide to setting up the hardware, from assembling the ESC to wiring it to the motor.
- Microcontroller: Arduino Nano
- MOSFET Driver: IR2110
- MOSFETs: IRF3205
- Capacitors: 22uF bootstrap capacitors
- Power Supply: 12V, 4A
- Phase Outputs: Connect the MOSFETs to the BLDC motor phases.
-
Arduino Pin Configuration:
- Pin 9 → High-side A
- Pin 10 → High-side B
- Pin 11 → High-side C
- Pin 4 → Low-side A
- Pin 3 → Low-side B
- Pin 2 → Low-side C
Check the ESC PCB Schematics for details on the hardware design and wiring.
Testing is an essential part of validating the ESC's functionality before connecting it to a motor. This section covers both manual testing with an oscilloscope and code-based test procedures.
Before connecting the motor, verify the phase waveforms using an oscilloscope. Check the following:
- Phase Shift: Measure the phase shift between Phase A and B, B and C (should be approximately 120 degrees).
- Voltage Levels: Ensure correct voltage levels (e.g., 12V for a 12V input) for each phase.
Use the following test scripts to validate various parts of the ESC hardware:
- MOSFET Test Code: Validate high-side and low-side MOSFET switching.
- Driver Test Code: Test the IR2110 driver behavior without a load.
- Commutation Timing Test: Test phase commutation timing and dead-time delays.
- MOSFET Heating: Check if the MOSFETs overheat during operation. This could be caused by incorrect gate drive or shoot-through.
- Phase Short Circuit: If the motor doesn't spin, check for short circuits between phases using a multimeter.
OpenESC is an open-source project, and contributions are welcome!
- Fork the repository.
- Create a feature branch for your work.
- Submit a pull request with a detailed description of the changes.
- Run unit tests and ensure all code passes.
Code Style: Follow the Google C++ Style Guide for all code submissions.
A: Follow the steps in the Getting Started section to upload the firmware using Arduino IDE.
A: Ensure that the MOSFET gate voltage is sufficient (12V bootstrap supply for IR2110) and that there's adequate dead time to prevent shoot-through.
A: Use an oscilloscope to check the phase voltages. Ensure that there is a 120-degree phase shift between each phase and the correct voltage levels are reached.