Page 1 of 1

(SDU, OI board) control of derating via CAN, from BMS

Posted: Thu Oct 03, 2024 11:05 am
by et0
Hi, creating a thread for this topic since I can't see it explained anywhere (please link if it has been)

On the SDU web interface, there is support for bmslimhigh and bmslimlow. I believe this is associated with a digital input from a BMS to give a fixed change of limits for "turtle mode" type operation, or to reduce regen. The pin seems not to be brought out to the external connector.

On the SDU board, the support exists to both send and receive some values over CAN - I am using this to send values already, based on the instructions here:
https://openinverter.org/wiki/CAN_communication

In the list of "spot values" which can be set via CAN, there is "bms" which will presumably work with the bmslimhigh and bmslimlow values above. But this is a crude method, I would prefer to change idcmax or something like that to definitively use the dynamic limit from the BMS. idcmax is not in the list.

There is discussion of "SDO" in the page above, which seems to be the way to modify other parameters not in the "spot values" list. Has anyone successfully used this method, and which values did you use to achieve it? And any other tips

I will update with my answer, assuming I find one, if no-one else does!

Re: (SDU, OI board) control of derating via CAN, from BMS

Posted: Thu Oct 03, 2024 11:24 am
by et0
There was actually a link to a thread on that page, I missed it:

viewtopic.php?t=1468

Will confirm...

Re: (SDU, OI board) control of derating via CAN, from BMS

Posted: Thu Oct 03, 2024 11:42 am
by johu
You can map idcmin and idcmax to receive via CAN. On the newer web interface this is possible via gui, on the older on you'll need a custom command like

Code: Select all

can rx idcmax 100 0 16 1
But of course the same is possible with SDO

Re: (SDU, OI board) control of derating via CAN, from BMS

Posted: Thu Oct 03, 2024 12:18 pm
by et0
Thanks, I have tried it the "old way", but will look into updating if that's possible.
Is there any way to validate that the correct value is received, or is it only possible by mashing the accelerator and see what happens?

Re: (SDU, OI board) control of derating via CAN, from BMS

Posted: Thu Oct 03, 2024 12:23 pm
by tom91
et0 wrote: Thu Oct 03, 2024 12:18 pm Thanks, I have tried it the "old way", but will look into updating if that's possible.
Is there any way to validate that the correct value is received, or is it only possible by mashing the accelerator and see what happens?
Refresh the values on the webinterface.

Re: (SDU, OI board) control of derating via CAN, from BMS

Posted: Thu Oct 03, 2024 12:26 pm
by et0
tom91 wrote: Thu Oct 03, 2024 12:23 pm Refresh the values on the webinterface.
idcmin and idcmax under "parameters" remain at the values I originally set, not what the BMS is transmitting. Should they reflect the received values?

The messages sent by Orion:
image.png
image.png (9.84 KiB) Viewed 2642 times
The custom config used (copied from that post linked above):

can rx idcmax 1301 0 16 32

can rx idcmin 1300 0 16 -32

Re: (SDU, OI board) control of derating via CAN, from BMS

Posted: Thu Oct 03, 2024 12:35 pm
by tom91
et0 wrote: Thu Oct 03, 2024 12:26 pm idcmin and idcmax under "parameters" remain at the values I originally set, not what the BMS is transmitting. Should they reflect the received values?
The show the active current parameters in memory, not the ones loaded from flash on start. So if they are not changing they are not received correctly.

Re: (SDU, OI board) control of derating via CAN, from BMS

Posted: Thu Oct 03, 2024 1:35 pm
by johu
Which version software? The more recent ones take 1 as a multiplier for unity gain, no longer 32

Re: (SDU, OI board) control of derating via CAN, from BMS

Posted: Thu Oct 03, 2024 1:36 pm
by et0
OK, thanks, they do change, and the 32 was incorrect. It's a very confusing trial and error process as the wifi disconnects every 30 seconds or so, so always a lottery if it actually refreshed or accepted the command.

A working config is:

can rx idcmin 1300 0 16 -1
With Orion settings:
0x514, PACK CCL, 2 bytes field length, MSB, Little Endian, Signed value. 48ms repetition

can rx idcmax 1301 0 16 1
With Orion settiings:
0x515, PACK DCL, 2 bytes field length, MSB, Little Endian. 48ms repetition

I will see how it drives and report back.

Re: (SDU, OI board) control of derating via CAN, from BMS

Posted: Mon Oct 28, 2024 11:35 pm
by alexbeatle
How do you find the drive performing with dynamic idcmax/idcmin at 48ms repetition?

I tried mine last night setting idcmax dynamically per BMS and I would sometimes get the drive to studder when I'd accel.
Theories:
1. Need to increase the frequency of BMS update - currently ~600ms (default BMS)
2. During discharge current derating I receive decimal values, not sure if SDU cares.
3. During discharge current derating BMS values derates almost linearly, i.e they sometimes dance +/- around the value, not sure if SDU cares.

My setup from SimpBMS on the SDU custom CAN message

Code: Select all

can rx idcmax 849 32 16 0.1
Sample reading on the can bus for the BMS discharge current.
image.png

Re: (SDU, OI board) control of derating via CAN, from BMS

Posted: Tue Oct 29, 2024 10:05 am
by johu
v5.35.R has the parameter "idcflt" that low pass filters DC current before feeding it into the derater. This should make derating smoother.