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

  • Actuator is ready for testing with the ESC!

    Anthrobotics02/16/2021 at 20:02 0 comments

    It's been a long time since the last update, but we are finally ready for some real-world testing!

    We have a completed actuator to test with the modified ESC, including the onboard absolute contactless encoder. This way we can implement position control on the motor-side of things, with the eventual goal of having a second encoder somewhere on the output side (say on a joint or chain and sprocket).

    Stay tuned for a demo in the next couple of weeks!

    Here is a video on the actuator undergoing testing with the ODrive motor controller. We will make a video comparing the ODrive to our modified bidirectional ESC once we get a stable position control method implemented.

  • 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 4 project logs

Enjoy this project?



Grayson Millar wrote 02/24/2021 at 05:39 point

I love that this is a project. I’m actually doing something very similar for my recent brushless quadruped project,  except with really cheap ESCs that have bidirectional movement built into the blheli_s firmware options, so that wasn’t a hurdle. (I did go through a bin of assorted ESCs before I arrived at these NIDICI 35amp units) Currently also working on wrapping up position control, however I’m using Arduino to handle the PID. I’m aiming to achieve a cost effective solution for hobbyists to make these dog robots possible without dropping $$$ on odrive units or custom driver boards, as well. Would love to chat sometime maybe we can compare notes!

  Are you sure? yes | no

Anthrobotics wrote 02/27/2021 at 02:37 point

Awesome, we can definitely discuss more on this! What stage of building your quadruped are you currently in?

A cost effective solution for performing simple BLDC control is definitely worth developing, given how popular quads are becoming for hobbyists. Bipeds need a little more power than quads for sure, but we hope to tackle that problem in the process!

  Are you sure? yes | no

dekutree64 wrote 02/27/2021 at 05:03 point

Does it really respond quickly enough to use on a quadruped? I would have thought the twitchy starting process for sensorless control would make standard ESC firmware useless for position control. I've tried writing custom firmware for such hardware, using the firmware flashing solder pads as inputs for hall sensors. Mostly just the basic framework done so far (how to read the RC input pulse signal, how to map which hall sensor state corresponds to which commutation state, how to PWM the transistors). Need to learn how to PID. But I keep kicking it down the road in favor of working on other projects.

  Are you sure? yes | no

Grayson Millar wrote 02/27/2021 at 20:53 point

In my configuration it absolutely engages fast enough. Adding a gearbox in the chain seems to smooth out any potential jitters. Note: it took some configuration in blheli to make the ESCs respond quickly enough. There will be documentation on the project here shortly.

  Are you sure? yes | no

craigwebster wrote 02/08/2021 at 12:52 point

Oh man, just what I'm looking for but it seems like the project has stalled or been dropped...bummer. 

  Are you sure? yes | no

rraetz 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

rraetz 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

rraetz 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

rraetz 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