Page 1 of 1
Regen broke my LDU
Posted: Sun Aug 20, 2023 7:20 pm
by mane2
I was happily tweaking my LDU after finally getting the car road legal. I had problems having regen working strong enough and felt like I was missing power. I tested different boosts, but didn't really do much. Then started looking into fweak. I had it set to 258. Tested dropping it considerably, to all the way to 90. And all the sudden, my regen was super strong .. and accelerating spun the tires like nothing. I was super excited, as this was what I was expecting the motor to do, but never got it to do that before!
I tweaked regen to -60, as -100 was now way too violent and locked the tires. So I approched intersection, and just lifted accelerator .. saw regen kW value raising in my display, to somewhere around -40kW .. and all the sudden I hear click, and motor goes to neutral. I rolled to bus stop, and started wondering what happened. I hadn't hit OVERCURRENT before, but I've read that people have hit it multiple times, testing the motor.
So first, I just turned the key, waited a bit, and turned power back on for inverter. I can hear contactors click. Selected D, pushed accelerator .. but nothing happened. Did that few times.. same thing. Then went for safety switch, manually cut the HV and 12v. Waited a while, and put them back .. still the same thing. Checked my Orion BMS that if there is some error that needs to be cleared, but there was nothing. Not even a fault code. Everything on BMS side looks normal. (EDIT: it ended up being BMS opening contactors while regen)
I have set tripmode=1 (keep contactors closed / dc switch on), so even with error, contactors should not open.
From web interface, I can see lasterr = OVERCURRENT. My battery voltage is 220-300V, Tesla 5.3kWh modules. I'm running the latest stm32_sine v5.27.R. Tesla sport LDU. boost was set to 1400.
I have no idea why it triggered overcurrent. Regen was probably doing -180A back to battery (battery voltage was about 250V at that point) when it happened. My ocurlim was set to -2500. idcmax 950.
Did I actually broke the LDU, or is there anything I could do to fix this situation? Help!

Re: Regen broke my LDU
Posted: Sun Aug 20, 2023 8:48 pm
by mane2
Did some more testing. There are no errors shown when I power up the inverter.
din_ocur = Ok,
status = None,
lasterr = None.
But immediately when i choose direction, lasterr becomes = OVERCURRENT. Still status is None, din_ocur = Ok.. and nothing happens if I apply the throttle. From spotvalues I can see potnom going up if I press throttle, but nothing happens.
I'm at loss. Is the LDU now broken, or is it possible that something broke from the board?
Re: Regen broke my LDU
Posted: Sun Aug 20, 2023 9:20 pm
by johu
Quick check without even opening the motor:
https://openinverter.org/wiki/Electronics_Basics (second item)
Of course fweak 90 is very very low and ocurlim 2500 disables the hardware limit. But most people have it set like that.
Re: Regen broke my LDU
Posted: Mon Aug 21, 2023 5:16 am
by mane2
Just checked with diode mode. Positive lead to positive gives rising voltage. Positive to negative shows only 0,283V. So I guess it's the end of that motor?
I'm wondering that went wrong. How can it break like that? Is it the low fweak value that caused something bad with regen?
Default value for fweak is 70 and default for ocurlim is 2500. I thought I'm in safe limits there.
My initial fear was that BMS saw too much incoming current, and opened the contactor, but BMS has no trouble codes recorded. It's Orion BMS2. I limit of -250A. That would mean with 250V pack, it would allow 62kW regen. I might have been close to that, but from display I saw maybe around -45kW regen. Need to dig that log up and inspect it more carefully. That would be the most obvious reason I guess.
Re: Regen broke my LDU
Posted: Mon Aug 21, 2023 6:28 am
by johu
Does the BMS or the inverter control the relays? BMS control is always a bad idea.
You might be able to swap the transistors of the broken phase if you're patient. It's buried somewhere here in the Tesla section
EDIT:
Look here
viewtopic.php?t=2440 and here
viewtopic.php?t=1625
Re: Regen broke my LDU
Posted: Mon Aug 21, 2023 11:21 am
by mane2
BMS controls the main contactors. So once BMS thinks something is badly off, it will open contactors to keep the battery safe. In this case, it was catastrophic .. and should actually never open contactors when car in "discharge" mode, as it probably will break the inverter every time.
What can BMS do if it can't control any contactors, when something is off? What would you recommend?
Thanks for the links. During dark winter nights, I might find myself doing that. But now, I just had to order new P85 motor.
Re: Regen broke my LDU
Posted: Mon Aug 21, 2023 11:53 am
by crasbe
There are some different ideas about what a safe way of handling "badly off" is. Your BMS essentially acts like a fuse that blew.
Personally, I think the decision to open contactors (while driving) should never come from any control unit. Not the BMS nor the inverter controller. Maybe a big "emergency stop" button in the cabin, where the driver can decide to blow up the inverter
You could add a warning light or audible warning signal to the BMS which would indicate to the user "hey, something is really off, do something". In your case everything would've been fine and after tuning the parameters of the BMS, no further warning would've occured in a normal driving situation.
Oh... by the way: You should check your contactors now. Disconnecting big loads can damage the contact surfaces. Celeron55 had an issue where a previously welded contactor had increased contact resistance, subsequently killing components due to overvoltage...
Re: Regen broke my LDU
Posted: Mon Aug 21, 2023 12:03 pm
by johu
mane2 wrote: ↑Mon Aug 21, 2023 11:21 am
What can BMS do if it can't control any contactors, when something is off? What would you recommend?
I generally vote for the CAN bus way. The BMS calculates charge and discharge limits and these end up in the inverters idcmin and idcmax. They can go down to 0, rendering the car immobile and all that without opening any contactor.
Even the Maguire way could be made to work this way where he monitors 3 partial pack voltages and if the delta between them becomes too large, he stops whatever he's doing. So then idcmin/max could be a function of the delta or something. I don't really advocate this way of doing it, as there can be some corner cases it doesn't catch, but he seems fine with it.
Re: Regen broke my LDU
Posted: Mon Aug 21, 2023 12:17 pm
by mane2
I get it. Need to do some changes.
I have idcmax sent via canbus from BMS to control that, so that is ok. It would have made sense to use idcmin too for this situation.. And remove the contactor control, at least when driving. Maybe completely.
Re: Regen broke my LDU
Posted: Mon Aug 21, 2023 4:46 pm
by mane2
Found it from bms logs.. multi purpose relay off, is where the contractors open.
Re: Regen broke my LDU
Posted: Mon Sep 04, 2023 8:19 pm
by mane2
I could only see one phase having one burnt spot. Maybe I should try to revive that..
Re: Regen broke my LDU
Posted: Mon Jun 17, 2024 9:28 pm
by alexbeatle
johu wrote: ↑Mon Aug 21, 2023 12:03 pm
I generally vote for the CAN bus way. The BMS calculates charge and discharge limits and these end up in the inverters idcmin and idcmax. They can go down to 0, rendering the car immobile and all that without opening any contactor.
Is this a feature of the LDU only? I don't see the way to map idcmax and idcmin values to CAN bus on SDU web interface.
Alternatively. Is it there any damage for the drive if bms error puts the drive into neutral, when it's spinning forward or reverse?
Re: Regen broke my LDU
Posted: Tue Jun 18, 2024 4:31 am
by mane2
I’m setting those limits from BMS to OI. Works on SDU too. They are not directly mappable from UI, but you can set them with different command. It’s under “Mapping values to arbitrary CAN messages” in wiki.
https://openinverter.org/wiki/CAN_communication
Putting it to neutral won’t do damage.