Skip to content
Sidharth Mohan Nair edited this page Sep 9, 2024 · 1 revision

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.


Table of Contents

  1. Getting Started
  2. Firmware Versions
  3. Hardware Setup
  4. Testing & Troubleshooting
  5. Contributing
  6. FAQ

Getting Started

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:

  1. Setting Up Arduino IDE
  2. Wiring the ESC
  3. Uploading the Firmware
  4. Initial Motor Testing

Firmware Versions

OpenESC currently has an open-loop ESC version. A future BEMF (back electromotive force) version will provide closed-loop control for sensorless BLDC motors.

Open Loop ESC (v1.0)

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:

  1. Connect the potentiometer to the analog pin (A1).
  2. Flash the open_loop_esc_v1.ino firmware.
  3. 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


Future Work: BEMF ESC (v2.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!


Hardware Setup

This section provides a detailed guide to setting up the hardware, from assembling the ESC to wiring it to the motor.

Components:

  • Microcontroller: Arduino Nano
  • MOSFET Driver: IR2110
  • MOSFETs: IRF3205
  • Capacitors: 22uF bootstrap capacitors
  • Power Supply: 12V, 4A

Wiring the ESC:

  • 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

PCB Layout:

Check the ESC PCB Schematics for details on the hardware design and wiring.


Testing & Troubleshooting

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.

Oscilloscope Testing:

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.

Testing Code:

Use the following test scripts to validate various parts of the ESC hardware:

Common Issues:

  • 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.

Contributing

OpenESC is an open-source project, and contributions are welcome!

How to Contribute:

  1. Fork the repository.
  2. Create a feature branch for your work.
  3. Submit a pull request with a detailed description of the changes.
  4. Run unit tests and ensure all code passes.

Code Style: Follow the Google C++ Style Guide for all code submissions.


FAQ

Q: How do I install the firmware?

A: Follow the steps in the Getting Started section to upload the firmware using Arduino IDE.

Q: Why is my MOSFET heating up?

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.

Q: How do I troubleshoot the commutation sequence?

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.