Modified ESC for Bidirectional BLDC Control

A cheap alternative to more expensive BLDC controllers, where only simple operation is required. More features may be added as required.

Public Chat
Similar projects worth following
Welcome to our project page detailing the modification of cheap brushless ESCs used in multirotor drones, and adapting them for use in larger robots. For our robots we need a method of driving brushless DC (BLDC) motors used in actuators. Controllers such as ODrive are great, but too expensive and complex for our design. Still needing the speed, acceleration and torque BLDC motors offer, we needed a solution.

This project will detail how the ESCs are modified, and how they are tested using common BLDC motors. As the controller develops, features such as current control, and closed loop position control may be integrated.

When a stable implementation is found, the source files will be made available on our GitHub.

Intended Specs for V1:

  • Operating Voltage: 11.4 - 14.8 V 
  • Continuous Current: 30 - 50 A (Depending on the ESC)
  • Peak Current: 35 - 60A (Again, ESC dependent)
  • Interface: PWM, Serial (over USB)
  • Control Feedback: Position w/ off-board encoder (e.g. localized on joint being actuated)
  • Cooling: 40mm active cooler
  • Cost: ~$50 - $60 CAD

Materials consumption for developing the V1 controller will be low, and all required components are on hand. Work required to build it consists of some simple hardware changes to an existing ESC, flashing custom firmware to the onboard MCU, and programming a master MCU for controlling the ESC. Progress can be checked in the project logs below.

  • 1 × Generic 30A ESC preloaded with SimonK firmware
  • 1 × Teensy 3.2 MCU Low cost, compact size and high clocks make for an ideal master controller to quickly develop and test with
  • 1 × 4S LiPo Battery 14.8V power supply for the ESC
  • 1 × 580KV BLDC Motor An ideal test candidate, as it is a good motor for use on a robot

  • Testing bidirectional control

    Anthrobotics06/09/2020 at 19:29 0 comments

    Success! We managed to get bidirectional control with an off-the-shelf ESC!

    Unfortunately, the type of ESC had to be changed, as we encountered numerous issues flashing different firmware to a generic SimonK-type ESC. Instead we opted to go with a BLHeli_32 ESC. This comes with a number of advantages over the previous model, without incurring a massive price increase:

    • 32-bit MCU,
    • Easier firmware management, using a GUI;
    • Built-in RPM, voltage and current monitoring;
    • Sinusoidal control option;
    • Higher continuous + peak current rating, and
    • native bidirectional support

    We are using a T-Motor F35A and F45A ESC to evaluate our BLDC controller design, as they are lightweight (~10 g) and compact (33 x 16 x 6 mm). The cost of each unit runs between $29 CAD and 43$ CAD, which is within our ideal price range, given their specifications. An ESC capable of delivering a higher continuous current will incur a higher cost, as expected. The current rating of an ESC selected for our actuator design will be based around the average current requirement for the intended task (current req. for drive systems for legs on a robot will be greater than that of the arms).

    Next up is to experiment with position control of the BLDC motor (using the attached AS5047P Encoder), create a PID controller, and install the motor into an actuator housing. Load tests with a planetary gearbox will also be performed. 

  • Wiring the ESC for flashing firmware

    Anthrobotics05/22/2020 at 03:30 0 comments

    Here is the current wiring setup for flashing a generic ESC with new firmware. The layout of soldered wires for re-flashing will depend on the model of ESC.

    Six wires are soldered onto the six exposed pads on the PCB. They are, from left to right,


    The wires are connected to a USBASP programmer using a 6 to 10 pin ISCP ribbon cable, following the standard Arduino ISCP pinout. 

    USBASP Programmer

    It can be hard to tell from the image as the plastic bits on the jumper wires are crammed together. We actually ended up just soldering to the ATmega8 chip directly as the pads ripped right off the PCB!

    Fixing the botched attempt. Notice the carnage on the second image...

    With that out of the way, hopefully we can flash some different firmware to the chip. Fingers crossed, we won't have to go looking for another alternative. If we do, hopefully it is also affordable to fit the bill for our project.

  • Getting Started: The ESC

    Anthrobotics05/15/2020 at 05:27 0 comments

    First, what is the goal of this project?

    We require a brushless motor driver to control BLDC motors with, for the development of our humanoid robots. Without an effective, simple and cheap controller, we cannot build our robots. Simple!

    BLDC motors offer high torque, high acceleration and high speeds - all ideal for a powerful robot. Their lack of brushes should reduce the chances of arcing inside the motor housing, allowing for operation in more hazardous environments (i.e. explosive/combustible gases). Furthermore, they perform very well when combined with a gear reducer or ballscrew , forming either a quasi-direct-drive (QDD) or direct-drive actuator. Actuators like these can be backdriven, compliant, and more importantly - 3D printed - making for a more affordable robot!

    The heart of the controller: The ESC

    30A ESC w/580KV BLDC Motor

    The Electronic Speed Controller (ESC) is the most important component of the BLDC controller. It is responsible for regulating the speed of the brushless motor, and is often controlled by means of pulse width modulation (PWM). Depending on how the ESC is calibrated, different pulse widths will result in a different speed. Some ESCs even have bidirectional control, meaning that pulse widths above and below a certain threshold will change the motor's direction in addition to its speed. However, the majority of ESCs we've encountered are not bidirectional, and lack more complicated control methods (i.e. FOC, BEMF, etc.). Therefore, we are going to expand the capability of common hobby ESCs and modify them for robotics-oriented applications.

View all 3 project logs

Enjoy this project?



Larock1234 wrote 11/24/2020 at 16:20 point

Is the project still going on?

  Are you sure? yes | no

Anthrobotics wrote 11/24/2020 at 20:05 point

Yes, although it is dependent on our Anthro project regarding it's form factor and carrier board layout. There will be another update coming once the first leg has been assembled, and we can proceed with position control testing.

  Are you sure? yes | no

Larock1234 wrote 11/24/2020 at 20:07 point


  Are you sure? yes | no

Voodoobrew101 wrote 09/02/2020 at 21:40 point

Did you have Issues with any of the BLHeli_32 ESC's having a locked bootloader preventing you from rewriting the firmware?

  Are you sure? yes | no

Anthrobotics wrote 09/10/2020 at 15:28 point

We haven't had that issue actually, the ESCs we received flash just fine with the software we used. A download link to the software will be posted in the next update. 

  Are you sure? yes | no

Larock1234 wrote 06/10/2020 at 09:19 point

Great project! I always had it on my to-do list, but I never found the time to do it. It would be amazing if you could share your code!

  Are you sure? yes | no

Anthrobotics wrote 06/10/2020 at 16:10 point

Thanks! We will release our code on GitHub once we work out some of the bugs, add some features and get it stable.

  Are you sure? yes | no

Larock1234 wrote 06/10/2020 at 16:29 point

Ok, cool. Thanks for your reply. I am looking forward! 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates