Arduino uno r4 + two simplefoc mini + bipolar stepper => drivers melting hot within seconds

Hi!

Im facing a hot as hell issue which I wish you can help me with.

Im using an arduino uno r4 wifi, two simplefoc minis 1.1 and a nema 17 pipolar stepper motor.
I can get the open loop example code to spin the stepper both ways as expected. But it only takes seconds for the minis to get super hot, melting cable plastic hot. Really, the plastic in the breadboard melts. When I connect power and have a finger on the driver chip, I can only keep it there for 2-3 seconds.

As you can see in the code I have tried to set different voltage limits but it does not make any difference. I wonder if there is a short somewhere. I have a BLDC motor so I can try that one and see if the drivers get equally super hot then (using one at a time).

In general the “limit” settings should at least make some difference?

Bear in mind Im a bit of a beginner, and I hope I have done some really basic error, else Im very confused. I have read about hot motors and hot drivers but I thought the limit setting should at least do something? :slight_smile:

Code:


#include <SimpleFOC.h>

StepperMotor motor = StepperMotor(50);
StepperDriver4PWM driver = StepperDriver4PWM(5, 6, 9, 10, 7, 12);

float target_velocity = 2;

Commander command = Commander(Serial);
void doTarget(char* cmd) { command.scalar(&target_velocity, cmd); }
void doLimit(char* cmd) { command.scalar(&motor.voltage_limit, cmd); }

void setup() {

  driver.voltage_power_supply = 12;
  driver.voltage_limit = 0.05f;
  driver.pwm_frequency = 32000;
  driver.init();
  driver.enable();

  motor.linkDriver(&driver);
  motor.voltage_limit = 0.05f;   
  motor.controller = MotionControlType::velocity_openloop;
  motor.foc_modulation = FOCModulationType::SinePWM;
  motor.init();

  command.add('T', doTarget, "target velocity");

  Serial.begin(115200);
  Serial.println("Motor ready!");
  Serial.println("Set target velocity [rad/s]");
  _delay(1000);
}

void loop() {

  motor.move(target_velocity);
  command.run();

}

Hey @mackanjansson,

Both driver and motor voltage limits are set very low so you should basically see almost no movement from the motor with this. That is, unless there is an issue somewhere. :smiley:

It is interesting that everything else burns but the minis keep working, they have the current protection and they should stop as soon as the current passes few amps (I think its 3.5Amps peak). 3.5Amps peak should not melt plastic, at least not in a few seconds.

Are you sure that everything is well connected?
Is it possible that you have some short (or almost short) circuit between the battery and ground?
Also is it possible that you’re using the mini outputs that do not correspond to the inputs IN1=>M1, IN2=>M2 and IN3=>M3?

Hi Antun,

Thank you! Hmm, I think I need to get myself a good oscilloscope to measure whats really going on. INX>MX should be correct.

I have started using the driver with a bldc-motor instead and will continue with that for a while (no melted plastic there yet). When the SimpleFOC-StepMini is available in the shop I will try with the stepper again!