STM32 getting very hot. Can't connect (ODrive 3.6)

I simulated the whole system (especially all axis acceleration scenarios) before building and there are certain scenarios where there could be short periods of overcurrent (I have more motors than the two driven by the ODrive). The capacitor bank should smooth those out (I should only need ~10mF).

The SMPS I use has a current limiting output and won’t trip. Also there are no limits to capacitive loads according to the datasheet. So there is no issue there.

I am aware of this and accept the risks :smiley:. The only other way would have been to reduce the acceleration of the X and Y axis, which would slow down my machine significantly. A bigger power supply would also have been too expensive (~200$), as I already owned this one.

1 Like

:+1:
I’d be interested to know your model for the ODrive. What simulation system did you use?

1 Like

I didn’t model the ODrive at all. I only modeled the constant loads as resistive loads (assuming 10W for the Jetson, 20W for the vacuum pump,…). Then I calculated the mechanical inertia for each axis, 1 kg mm² for X and 2.5 kg mm² for Y (The stepper motor based axis I assumed to be constant current loads and weren’t considered). Then I used a DC motor model (should be accurate enough) for the two ODrive axis.

I used LTSpice for simulation.

Right… That’s probably why you ended up with such an oversized power supply then… :stuck_out_tongue:

The current drawn from the DC supply is NOT the same as the current in the motor! It is significantly lower, and only starts to match the motor current when the motor at its maximum possible speed for a given voltage & load. Even in this case it is limited to 80% of the motor current, because the ODrive places a limit on PWM magnitude at 80%.
The case of accelerating from a dead stop actually draws the least amount of current for a given torque, because the speed is near zero.

Whereas a brushed DC motor does not limit the current or convert voltage, so it would apply more starting torque, and would also be much less efficient at startup due to resistive losses.

I think it would be useful to have a proper LTSpice model for ODrive, at least for torque control mode only, but I don’t know if anyone has one. Maybe Oskar might.

Even a super-simplified set of equations such as this might be useful:

  • inputs are torque_command and dc_bus_voltage
  • motor_current is proportional to torque_command
  • resistive_voltage_loss is proportional to motor_current
  • velocity is proportional to time-integral of torque_command
  • back_emf is proportional to velocity
  • pwm_duty is proportional to (back_emf + resistive_voltage_loss) / dc_bus_voltage, and saturates at 0.8, causing a simulator warning
  • dc_bus_current is proportional to (motor_current * pwm_duty)

Of course, this ignores the transient nature of these signals, but it would be a better approximator of DC Bus current than a brushed motor model.

1 Like

Thanks for your detailed post! I see how I messed my simulation attempts up. You are absolutely correct, a simple DC motor model can’t simulate the ODrive. Having an accurate model would be awesome, but creating it would be a lot of work.