Custom Driver: Blackpill, IRS2003, ACS712,50N06 mosfets | Progress

Hi all, creating a new thread to update the progress on this design.


image

I have successfully hooked up the flysky 5010 (7 pp) motor with AS5600 encoder in closed loop mode.
Results are here. I was however not able to get reliable current sense output from the setup, will keep trying it.

My end goal with this project is to achieve robust bi-directional control on BLDC, for a quadruped robot built from scratch (anyone wants to join me on this quest?).

Please help me to understand the “checklist” that this(or newer) designs should complete for me to consider it a self made replacement of off the shelf drivers like ODrive S1?

Which tests should i run on this setup to determine its faults?

How was the current sensing unreliable? Too much noise? Wrong current value compared to clamp meter? Output stuck at some voltage? Software issue reading ADC? I need to know some more information about the problem to figure out the cause.

It looks like you forgot to install the electrolytic capacitors on the power lines. This could lead to extra noise being generated and interfering with your ADC readings.

Here are a few goals that you can aim for:

  • Low cost
  • Small size
  • High efficiency (low power consumption while idle holding position and sleep mode)
  • Supports wide variety of encoders
  • No soldering required (connectors for power and motor wires)
  • Mounting holes
  • Enough onboard capacitance
  • 5V and 3.3V output could be useful in some situations
  • Good range of control interfaces (USB, UART, I2C, CAN, PWM, Analog)
  • Capable of high switching frequency and FOC control frequency, to drive fast motors.
  • Capable of sensorless control at zero speed
  • Onboard LEDs for easy debugging
  • Low EMI
  • Good protection features - overcurrent, overtemperature (driver and motor), undervoltage (low battery), overvoltage (regenerative braking)
  • Wide input voltage range. Multiple variants of the board might be needed, as capacitors need to be sized properly for the input voltage. Using a 48V rated capacitor for 12V input is a huge waste.

Note that many of the goals are mutually exclusive, so you’ll need to pick which ones are most important to you.

It’s pretty difficult to DIY a driver that come close to commercial ones like the Odrive. Usually it is only worth making your own if you want to learn electronics, or if you want something that the commercial drivers don’t provide, such as extremely low cost or some niche sensor interface.