Page 1 of 1

Tesla SDU - Unable to get any regen at all

Posted: Sun May 29, 2022 8:08 pm
by cloudy
Pulling my hair out, so posting here as a last resort. Otherwise fine Tesla SDU running on openinverter - however I cannot no matter what I try and do, get any regen at all (potnom never drops below zero)

Params attached, but I've tried many variations and trying to have pot2 both set to zero and 4095. My expectation is there should be some regen ramped in when off throttle. I'm really hoping I've missed something incredibly stupid. Can anyone suggest? Is it possible I need a pot2 value above the value of ~23 I have now - even when setting pot2 max to zero?

Running 5.14 - params attached

Thankyou!

Re: Tesla SDU - Unable to get any regen at all

Posted: Sun May 29, 2022 9:17 pm
by johu
Looks ok. Is udc measuring correctly?

Re: Tesla SDU - Unable to get any regen at all

Posted: Sun May 29, 2022 9:36 pm
by cloudy
Yes, reading about 400V - I've even reapplied damian's default params and tried to add some regen to no avail. Perhaps I have a corrupt config memory? Is it worth using the default revert button?

Re: Tesla SDU - Unable to get any regen at all

Posted: Mon May 30, 2022 2:18 am
by remy_martian
Is there a flag or other boolean / signal that says the battery is fully charged?

Re: Tesla SDU - Unable to get any regen at all

Posted: Mon May 30, 2022 6:34 am
by johu
If the parameter memory is corrupt it will load (useless) defaults anyway as a CRC is stored along with the parameters.

I'm assuming your throttle is also calibrated correctly?

Re: Tesla SDU - Unable to get any regen at all

Posted: Mon May 30, 2022 9:16 am
by cloudy
Yes, throttle within range. I've also added a brake digital input and wired up pot2. Even with pot2 calibrated and set high - potnom never drops below zero. Pulling the digital brake input high shows activated, and inhibits throttle, but again no regen and no negative potnom at rest or whilst motor spinning. Error memory showing no errors.

What parameters out of range could cause regen to be inhibited? udcmax, idcmin, throtmin, bmslimlow? Possible to have a sign wrong? idcmin should be entered as negative value right?

Re: Tesla SDU - Unable to get any regen at all

Posted: Mon May 30, 2022 10:42 am
by johu

Code: Select all

   throtSpnt = GetUserThrottleCommand();
   bool determineDirection = GetCruiseCreepCommand(finalSpnt, throtSpnt);
   finalSpnt = Throttle::RampThrottle(finalSpnt);

   if (hwRev != HW_TESLA)
      Throttle::BmsLimitCommand(finalSpnt, Param::GetBool(Param::din_bms));

   Throttle::UdcLimitCommand(finalSpnt, Param::GetFloat(Param::udc));
   Throttle::IdcLimitCommand(finalSpnt, Param::GetFloat(Param::idc));
   Throttle::FrequencyLimitCommand(finalSpnt, Param::GetFloat(Param::fstat));

   if (Throttle::TemperatureDerate(Param::GetFloat(Param::tmphs), Param::GetFloat(Param::tmphsmax), finalSpnt))
   {
      DigIo::err_out.Set();
      ErrorMessage::Post(ERR_TMPHSMAX);
   }

   if (Throttle::TemperatureDerate(Param::GetFloat(Param::tmpm), Param::GetFloat(Param::tmpmmax), finalSpnt))
   {
      DigIo::err_out.Set();
      ErrorMessage::Post(ERR_TMPMMAX);
   }
Does that help? It's not the BMS input it is masked out on Tesla hardware. It's none of the temp deraters because they would limit acceleration as well and trigger an error message. idc/udc you have configured correctly. Maybe try setting idlemode to off?

Re: Tesla SDU - Unable to get any regen at all  [SOLVED]

Posted: Mon May 30, 2022 10:44 am
by johu
Oh yeah, just checked again. You have speedkp=0 . That means the idle speed controller will override any negative throttle. Not greatest usability I admit. Set idlemode off and speedkp=0.25

Re: Tesla SDU - Unable to get any regen at all

Posted: Mon May 30, 2022 10:50 am
by cloudy
That fixed it! Many thanks 8-) 8-) 8-)