# Max current limit on board

**URL:** <https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442>\
**Category:** General\
**Created:** [July 19, 2021, 4:47am UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442 "2021-07-19T04:47:47Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![ap23](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ap23/32/3894_2.png) [@ap23](https://discourse.odriverobotics.com/u/ap23)\
**Post date:** [July 19, 2021, 4:47am UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/1 "2021-07-19T04:47:47Z")

</div>

Does anyone know what the highest, safest current is to run on the oDrive v3.6 board 56V model? (I want to know the highest value current\_lim can be without damaging the board)

---

<div class="post-metadata">

**Author:** ![towen](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/t/bcef8e/32.png) [@towen](https://discourse.odriverobotics.com/u/towen)\
**Post date:** [July 19, 2021, 8:11pm UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/2 "2021-07-19T20:11:11Z")

</div>

The current sensors saturate at 120A on their highest range, so that is the only ‘absolute limit’.  
The rest is a function of how much cooling you can apply.  
It is good up to about 60A continuous with the included heatsinks. After that, you will need to add extra cooling.

---

<div class="post-metadata">

**Author:** ![ap23](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ap23/32/3894_2.png) [@ap23](https://discourse.odriverobotics.com/u/ap23)\
**Post date:** [July 19, 2021, 8:27pm UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/3 "2021-07-19T20:27:32Z")

</div>

Thanks Towen! Is there a way to check what the current is so that I can trip the motor when the continuous current is above, say, 60A?

---

<div class="post-metadata">

**Author:** ![Wetmelon](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/wetmelon/32/10_2.png) [@Wetmelon](https://discourse.odriverobotics.com/u/Wetmelon)\
**Post date:** [July 19, 2021, 9:56pm UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/4 "2021-07-19T21:56:41Z")

</div>

Yes, the (total) current sent through the motor is `motor.current_control.Iq_measured^2 + motor.current_control.Id_measured^2`. If you just want the setpoint, use `motor.current_control.Iq_setpoint`

---

<div class="post-metadata">

**Author:** ![towen](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/t/bcef8e/32.png) [@towen](https://discourse.odriverobotics.com/u/towen)\
**Post date:** [July 20, 2021, 7:52am UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/5 "2021-07-20T07:52:36Z")

</div>

> [@ap23](#):
>
> Is there a way to check what the current is so that I can trip the motor when the continuous current is above, say, 60A?

Also that’s already done by the ODrive. If the current measured is ever above `current_lim * current_lim_tolerance` (or might be a + I can’t remember) then ODrive will trip with MOTOR\_ERROR\_CURRENT\_LIM\_VIOLATION.

---

<div class="post-metadata">

**Author:** ![ap23](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ap23/32/3894_2.png) [@ap23](https://discourse.odriverobotics.com/u/ap23)\
**Post date:** [July 20, 2021, 3:04pm UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/6 "2021-07-20T15:04:18Z")

</div>

Will the oDrive trip based on a continuous current exceeding the limit, or just a peak? Based on my tests I had thought it was just a peak, but I’m not sure. Thanks!

---

<div class="post-metadata">

**Author:** ![towen](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/t/bcef8e/32.png) [@towen](https://discourse.odriverobotics.com/u/towen)\
**Post date:** [July 20, 2021, 7:19pm UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/7 "2021-07-20T19:19:43Z")

</div>

Aha sorry you’re right, It trips on a peak. The `motor.config.current_lim` is an absolute max limit that is never exceeded by the current controller, except if it overshoots.  
ODrive doesn’t have a concept of a continuous or “I^2 T” thermal limit AFAIK, although wouldn’t be hard to add it with some basic thermal model.  
There are industrial drives which will derate the current limit after a preset continuous rating has been exceeded by an i^2 t value.

If you do adjust the current limit dynamically in operation, don’t forget to to test your controller stability at both limits 😉

---

<div class="post-metadata">

**Author:** ![ap23](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ap23/32/3894_2.png) [@ap23](https://discourse.odriverobotics.com/u/ap23)\
**Post date:** [July 28, 2021, 8:16pm UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/8 "2021-07-28T20:16:17Z")

</div>

Hi Towen, I was re-reading your response just now and you mentioned “except if it overshoots.” When would this occur and how exactly would we prevent this. Also, if this were to happen, what damage would occur on the oDrive.

I am extremely frustrated right now because something is happening where my oDrives are “busting” in some way that I don’t really know. My hypothesis is that it involves some current overshoot. Essentially, when my motor (maybe goes too fast or gets stuck in my system as it spins) in an unforeseen circumstance situation, the oDrive throws a combination of “DRV fault” errors, “current\_lim violation” errors, and “undefined errors.” When the “busted” board boots up, and I dump errors, there are no errors. Then, when I put a “busted” oDrive into closed loop mode, you get the errors mentioned above. Sometimes they are DRV fault, sometimes current limit, and sometimes just undefined errors. Over the course of this month, I have had many (like 7-8 oDrives break) with similar errors. At first, I thought I was getting unlucky, but now I feel like something is causing the oDrives to break, because I really don’t think they are this delicate. I could really use some help hardware debugging what may have caused these to break, so any suggestions on where to start would be helpful.

Furthermore, with some of these “busted” oDrives, I often try putting the boards in DFU mode and reflashing the firmware. After doing that on these boards, and dumping errors, I get a bunch of non-sensical errors that don’t make sense. For example, after reflashing the firmware on one of these broken boards, I would get “ERROR\_DC\_BUS\_OVER\_REGEN\_CURRENT,” and error I wouldn’t get in my setup  
on a normal, fresh oDrive.

Also if it may help, I may move this to its own post.

---

<div class="post-metadata">

**Author:** ![Wetmelon](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/wetmelon/32/10_2.png) [@Wetmelon](https://discourse.odriverobotics.com/u/Wetmelon)\
**Post date:** [July 29, 2021, 12:11am UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/9 "2021-07-29T00:11:26Z")

</div>

Yes there’s definitely something with your configuration.

With 0.5.2, OVER\_REGEN\_CURRENT happens pretty often. Remember to set `config.enable_brake_resistor = True` and `config.dc_max_negative_current = -1`

What motors are you driving? ODrive doesn’t like high inductance motors doing sudden stops at high speeds. The resulting inductive voltage spike has a chance to damage the board.

---

<div class="post-metadata">

**Author:** ![ap23](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ap23/32/3894_2.png) [@ap23](https://discourse.odriverobotics.com/u/ap23)\
**Post date:** [July 29, 2021, 4:08pm UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/10 "2021-07-29T16:08:53Z")

</div>

> [@Wetmelon](#):
>
> `config.enable_brake_resistor = True` and `config.dc_max_negative_current = -1`

I am driving Flipsky 6374 190 KV motors. More indepth scenario surrounding the error at this post:

> [@Torque control with bunch of unknown errors, not increasing torque](https://discourse.odriverobotics.com/t/torque-control-with-bunch-of-unknown-errors-not-increasing-torque/7496/5):
>
> I added some more ferrites and this time it calibrated successfully on the new firmware which is good. However, the board randomly disconnects and reconnects frequently. I’ve replaced the microusb and everything looks like a solid connection. Sometimes it doesn’t do this, but sometimes it does too – its random. Any ideas why? Also, when I try to save configuration, I get false? Do you know why for that? Lastly, when I get lucky and oDrive isn’t discon…

---

<div class="post-metadata">

**Author:** ![ap23](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ap23/32/3894_2.png) [@ap23](https://discourse.odriverobotics.com/u/ap23)\
**Post date:** [July 30, 2021, 4:19pm UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/11 "2021-07-30T16:19:53Z")

</div>

I was doing some tests with a current probe today and noticed that whenever I change my axis\_state, I get an immediate current limit violation. I wanted to verify that that a surge of current was actually being sent to the “broken” oDrive so I put the probe around all 3 of the motor A B and C cables and noticed that when around the C motor wire, I was indeed getting an overload of current, even past 100 amps, because my probe was beeping with an Overload indication. I think some part of the oDrive got broken and is requesting a lot of current, because I have used this bench setup with new odrives with no issues. To clarify, the oDrive that this current limit and current surge issue happened to is the one that broke in the scenarios I described above.

---

<div class="post-metadata">

**Author:** ![towen](https://discourse.odriverobotics.com/letter_avatar_proxy/v4/letter/t/bcef8e/32.png) [@towen](https://discourse.odriverobotics.com/u/towen)\
**Post date:** [July 30, 2021, 4:29pm UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/12 "2021-07-30T16:29:15Z")

</div>

It is possible that the current sense amplifier is not working properly… Or perhaps it is not accepting the requested range?  
What current limit have you got set, and what requested\_current\_range are you using?

What current were you requesting when you saw \>100A on phase C?  
(what requested\_state did you set, and what do you have for calibration\_current)

---

<div class="post-metadata">

**Author:** ![ap23](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ap23/32/3894_2.png) [@ap23](https://discourse.odriverobotics.com/u/ap23)\
**Post date:** [July 30, 2021, 4:53pm UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/13 "2021-07-30T16:53:09Z")

</div>

I am using current limit of 85, requested current range of 100.

I set requested state to odrv0.axis0.requested\_state = AXIS\_STATE\_MOTOR\_CALIBRATION

**odrv0.axis0.motor.config.calibration\_current** is set to 10.

 ![IMG_2387.PNG](https://discourse.odriverobotics.com/uploads/default/original/2X/6/6aeb7b0c948d86bd35032f3b44db67442ac7c2dd.jpeg)

Here is a picture of the surge right when I send that axis state command

---

<div class="post-metadata">

**Author:** ![ap23](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/ap23/32/3894_2.png) [@ap23](https://discourse.odriverobotics.com/u/ap23)\
**Post date:** [August 10, 2021, 2:57pm UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/14 "2021-08-10T14:57:14Z")

</div>

Hey there, I was just coming back to this equation you had given me for total current through the motor and had a quick question about it. You mentioned that measured current through the motor is `motor.current_control.Iq_measured^2 + motor.current_control.Id_measured^2` but the docs say that to measure current for torque calculation, to use just `current_control.Iq_measured`. Which is the correct value if I want to use a measured current value for torque? Thanks.

 ![Screen Shot 2021-08-10 at 10.55.52 AM](https://discourse.odriverobotics.com/uploads/default/original/2X/8/88435f94ad90eb93219b6d727060c22ad25b651d.png)

---

<div class="post-metadata">

**Author:** ![Wetmelon](https://discourse.odriverobotics.com/user_avatar/discourse.odriverobotics.com/wetmelon/32/10_2.png) [@Wetmelon](https://discourse.odriverobotics.com/u/Wetmelon)\
**Post date:** [August 12, 2021, 12:28am UTC](https://discourse.odriverobotics.com/t/max-current-limit-on-board/7442/15 "2021-08-12T00:28:42Z")

</div>

Torque is directly proportional to `Iq_measured`.  
The total current through the windings is `sqrt(Iq^2 + Id^2)`.
