Automation idlespeed Not Working

Post Reply
User avatar
E46Driver
Posts: 32
Joined: Fri Sep 17, 2021 3:51 am
Location: Alberta
Has thanked: 2 times
Been thanked: 5 times

Automation idlespeed Not Working

Post by E46Driver »

Hey guys I searched around for more information on the idlespeed, but could not find an answer to my problem.

5.14-FOC Firmware
Leaf Gen2 Inverter with Rev3 O.I. Board
EM57 Motor

The system works with idlespeed = -100 (disabled). I can apply power, apply the start signal, and the motor spins happily with throttle input.

If I try idlemode = 0 (always) and idlespeed = 500, nothing happens.

I read the Brake Input must be active on start, which seems like a logical safety step. So here is my sequence:
1. Apply 12V power (ignition "ON")
2. Apply Brake +12V (din_brake = ON)
3. Apply 12V to start (din_start = ON)
4. Release start and then release brake

I would expect the motor to slowly ramp up to idle speed shortly after din_start goes high. But nothing. In fact, the positive contactor does not even engage (negative contactor is tied to ignition). Instead:
opmode = Off
lasterr = NONE
status = PotPressed


What the heck is PotPressed?

Would the above sequence be wrong? I've seen mention of people "idling" motors but nobody describes the start sequence.

Any help would be greatly appreciated!!!!

FYI - other parameters which I'm currently using for testing (idle disabled):

Code: Select all

{
  "curkp": 32,
  "curki": 10000,
  "curkifrqgain": 50,
  "fwkp": -150,
  "ffwstart": 200,
  "syncofs": 0,
  "syncadv": 10,
  "polepairs": 4,
  "sincosofs": 2048,
  "fmax": 500,
  "dirchrpm": 100,
  "dirmode": 1,
  "snsm": 14,
  "pwmfrq": 1,
  "deadtime": 78,
  "ocurlim": 700,
  "il1gain": 1.65,
  "il2gain": 1.65,
  "udcgain": 5.43,
  "udcofs": 299,
  "udclim": 540,
  "potmin": 0,
  "potmax": 4095,
  "pot2min": 4095,
  "pot2max": 4095,
  "potmode": 0,
  "throtramp": 4,
  "throtramprpm": 20000,
  "throtcur": 4.5,
  "brknompedal": -35,
  "regenramp": 0.25,
  "brknom": 20,
  "brkmax": -25,
  "brkcruise": -20,
  "brkrampstr": 10,
  "brkout": -50,
  "bmslimhigh": 50,
  "bmslimlow": -1,
  "udcmin": 30,
  "udcmax": 520,
  "idcmax": 250,
  "idcmin": -250,
  "idckp": 2,
  "idcflt": 9,
  "tmphsmax": 150,
  "tmpmmax": 300,
  "throtmax": 100,
  "throtmin": 0,
  "chargemode": 0,
  "chargecur": 0,
  "chargekp": 80,
  "chargeki": 10,
  "chargeflt": 8,
  "chargepwmin": 0,
  "chargepwmax": 83.5,
  "idlespeed": -100,
  "idlethrotlim": 50,
  "idlemode": 0,
  "speedkp": 0.25,
  "speedflt": 5,
  "cruisemode": 2,
  "udcsw": 30,
  "tripmode": 0,
  "bootprec": 0,
  "pwmfunc": 0,
  "pwmgain": 100,
  "pwmofs": 0,
  "canspeed": 1,
  "canperiod": 1,
  "nodeid": 1,
  "manualiq": 0,
  "manualid": 0
}
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Automation idlespeed Not Working

Post by johu »

Haven't tested this in a while. Does it even go into run mode or stay in off mode? Try NoBrake also.
status=PotPressed means start is inhibited because the throttle is pressed. Could also be caused by the idlespeed controller
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
E46Driver
Posts: 32
Joined: Fri Sep 17, 2021 3:51 am
Location: Alberta
Has thanked: 2 times
Been thanked: 5 times

Re: Automation idlespeed Not Working

Post by E46Driver »

Hi johu, it does not go into run mode. Stays in off mode.

Also tried no brake. And tried brake applied before ignition. Neither worked.

Unfortunate since I'm running the stock automatic transmission and need the idle feature. Anything else I can try? Or would this be something at the code level - because the throttle was definitely not getting a signal (I disconnected the wire).
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Automation idlespeed Not Working

Post by johu »

It's at code level. Not sure when I broke it.

Try starting, then setting idlespeed. Not as a solution, just as a test
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
johu
Site Admin
Posts: 5683
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: Automation idlespeed Not Working

Post by johu »

Try this version and report back
Attachments
stm32_foc.bin
(47.54 KiB) Downloaded 51 times
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
E46Driver
Posts: 32
Joined: Fri Sep 17, 2021 3:51 am
Location: Alberta
Has thanked: 2 times
Been thanked: 5 times

Re: Automation idlespeed Not Working

Post by E46Driver »

johu wrote: Wed Jul 20, 2022 2:10 pm It's at code level. Not sure when I broke it.

Try starting, then setting idlespeed. Not as a solution, just as a test
Hello johu, thanks for the speedy responses! Yes, I did get this to work last night. Should have mentioned it in my post above - but I only did it once and then forgot about it. Was also able to change the idle speed after it started. Will try new firmware tonight and report back.
User avatar
E46Driver
Posts: 32
Joined: Fri Sep 17, 2021 3:51 am
Location: Alberta
Has thanked: 2 times
Been thanked: 5 times

Re: Automation idlespeed Not Working

Post by E46Driver »

johu wrote: Wed Jul 20, 2022 2:19 pm Try this version and report back
Hi Johannes, works great (Version 5.23R I see). Thank you for your incredibly quick response!!!

Questions:
1. Delay between main contactor close and idle - about 150ms?
2. Ramp-up adjustment from 0 to set idle RPM?
3. Brake interlock missing?



More detail:
It appears you kept a delay between the start signal and the initiation of idle - this is good since I don't think closing the main contactor and simultaneously idling would be good. To clarify - I think there's a chance of arcing if the startup of the motor depletes the inverter capacitors a split second before the main contactor closes. Just out of curiosity - is the delay about 150ms? Do you think thats enough time for the contactor to respond and fully close (to prevent potential arcing).

Is there a ramp adjustment for startup? Seems to go from 0 straight up to 750RPM (a bit of overshoot - not a problem). Then settles around 500RPM which is my setting. But the initial start seems very abrupt (only on 40V of batteries for testing). And I'm just thinking about winter when its -25*C outside. Cold bearings and transmission components might not like the abrupt start very much. However, I guess the general response needs to be fast to match fast throttle response. So we don't want to introduce a problem there.

Also, the brake interlock is not functioning. That is OK for my application because the E46 has a brake interlock anyway. But not sure if you want to add it back in for others. Just thought I'd mention it.

Thanks again for your help!
Post Reply