IRF3205 Motor Driver Question

Thinking about getting one of these to control a stepper motor…

https://www.aliexpress.us/item/3256801340662841.html

…but have a couple of reservations:

  • When PWM is 0 it activates a brake function
  • PWM can’t be 100%, only 99%

Will SimpleFOC work with that board?

I believe the link you provided is a clone of:

This has dual h bridges and is designed for 2 brushed motors (?I think?). I don’t know too much about the stepper code in simplefoc. The StepperDriver2PWM.cpp
is the one that is ‘most likely’ to work. It doesn’t look as if the board has enable pins which are on 2PWM constructor, whether this is a show stopper, I don’t know. It has two pwm and two dir pins.

You could take a look at this example where 2PWM is used - but I’d wait to see if someone else can give you a better answer.

Yeah, code-wise it should work, the enable pins don’t have to be set for StepperDriver2PWM. It’s just whether the braking function and restriction on 100% PWM is going to mess with SimpleFOC.

I think the 100%PWM can be avoided by setting voltate_limit < voltage_power_supply. The zero/braking value is harder.
ChatGPT says you could override the setPWM function:

class CustomStepperDriver : public StepperDriver2PWM {
public:
    // Constructor that forwards to StepperDriver2PWM's constructor
    CustomStepperDriver(int pwm1, int* in1, int pwm2, int* in2, int en1 = NOT_SET, int en2 = NOT_SET)
    : StepperDriver2PWM(pwm1, in1, pwm2, in2, en1, en2) {}

    // Override the setPwm method
    void setPwm(float Ua, float Ub) override {
        // Custom implementation here
    }
};

6PWM has a dead zone, not much help to you but I wonder if it existed on 2PWM whether you could have used that.

Hmmm, guess the only way to no is to order one and try. Maybe something like this is better. The specs look pretty similar but it has enable pins so if braking is an issue I could disable the driver when the PWM was 0.

Yes, haven’t used DBH-12V - but the page below seems like it would work with simplefoc:
https://dronebotworkshop.com/dc-motor-drivers/
It’s 2/3rds down the page