Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit #393: BMS-own blocking charge/discharge not available #458

Closed
Dr-Gigavolt opened this issue Feb 12, 2023 · 20 comments
Closed

Commit #393: BMS-own blocking charge/discharge not available #458

Dr-Gigavolt opened this issue Feb 12, 2023 · 20 comments
Assignees

Comments

@Dr-Gigavolt
Copy link

Dr-Gigavolt commented Feb 12, 2023

Hi Louis,
since the commit #393 the paths /System/NrOfModulesBlockingCharge and /System/NrOfModulesBlockingDischarge are always set by your code, regardless whether CCCM_CV_ENABLE and DCCM_CV_ENABLE are set True or False. It is not possible to transmit the state of MOSFET switch any more. Is there some reason for it? Otherwise please make the possibility to pass the BMS state again. Thanks.
Best regards,
Anton

@mr-manuel
Copy link
Collaborator

Hi @Dr-Gigavolt,

I try to understand your problem and search for a possible solution. Unfortunately I do not fully understand the problem.

Hi Louis,
since the commit #393 the paths '/System/NrOfModulesBlockingCharge' and '/System/NrOfModulesBlockingDischarge' are always set by your code, regardless whether CCCM_CV_ENABLE and DCCM_CV_ENABLE are set True or False.

What else should write on this paths, if not the driver?

It is not possible to transmit the state of MOSFET switch any more.

What do you mean with this?

  1. You want to read this state from the BMS?
  2. You want to set this state in the driver?
  3. You want to set this state in the BMS over the driver?

Could you check, if the problem persists when you install the code from the jkbms_ble branch, which is currently the most updated? You can ignore the Bluetooth part, when installing the code.

To install execute this

wget -O /tmp/install-nightly.sh https://raw.githubusercontent.com/Louisvdw/dbus-serialbattery/jkbms_ble/etc/dbus-serialbattery/install-nightly.sh && bash /tmp/install-nightly.sh

and select 2 for jkbms_ble.

@mr-manuel mr-manuel self-assigned this Apr 20, 2023
@Dr-Gigavolt
Copy link
Author

Hi @mr-manuel
I just need the option to get raw BMS data from Dbus as it was up to commit #393. Since 393 even if everything is set to False the Blocking charge/discharge values are from the Serial Battery driver and not from BMS. If the option "own charge parameters" in AggregateBatteries is activated, the calculation is interfered and therefore both drivers cannot be compatible any more. I didn't have the time to test jkbms_ble branch yet, I'll try it later.

@mr-manuel
Copy link
Collaborator

Sorry, but I still can't understand.

The code from the master branch, v0.14.3, v0.14.0 and v0.13.0 is the same for the values /System/NrOfModulesBlockingCharge and /System/NrOfModulesBlockingDischarge.

master

self._dbusservice["/System/NrOfModulesBlockingCharge"] = (
0
if self.battery.charge_fet is None
or (self.battery.charge_fet and self.battery.control_allow_charge)
else 1
)
self._dbusservice["/System/NrOfModulesBlockingDischarge"] = (
0 if self.battery.discharge_fet is None or self.battery.discharge_fet else 1
)

v0.14.3

self._dbusservice['/System/NrOfModulesBlockingCharge'] = 0 if self.battery.charge_fet is None or \
(self.battery.charge_fet and self.battery.control_allow_charge) else 1
self._dbusservice['/System/NrOfModulesBlockingDischarge'] = 0 if self.battery.discharge_fet is None \
or self.battery.discharge_fet else 1

v0.14.0

self._dbusservice['/System/NrOfModulesBlockingCharge'] = 0 if self.battery.charge_fet is None or \
(self.battery.charge_fet and self.battery.control_allow_charge) else 1
self._dbusservice['/System/NrOfModulesBlockingDischarge'] = 0 if self.battery.discharge_fet is None \
or self.battery.discharge_fet else 1

v0.13.0

self._dbusservice['/System/NrOfModulesBlockingCharge'] = 0 if self.battery.charge_fet is None or \
(self.battery.charge_fet and self.battery.control_allow_charge) else 1
self._dbusservice['/System/NrOfModulesBlockingDischarge'] = 0 if self.battery.discharge_fet is None \
or self.battery.discharge_fet else 1

However between v0.13.0 and v0.14.0 it was changed how control_allow_charge is set: Comparing v0.13...v0.14 · Louisvdw/dbus-serialbattery. But this was one month before the commit you are referring to.

Am I missing something?

@mr-manuel
Copy link
Collaborator

There are new changes regarding this values: 28395bc

@Dr-Gigavolt any update from your side?

@Dr-Gigavolt
Copy link
Author

Hi @mr-manuel, I am sorry, I had no time yet.

@Dr-Gigavolt
Copy link
Author

Hi @mr-manuel , I've just installed the jkbms_ble and will observe the behavior tomorrow. I appreciate the well commented config.default.ini. But please explain me why the lead-acid algorithm bulk-absorption-float is still maintained? This art of choreography was developed for lead-acid cells having no balancer, no BMS and high leakage current.

@mr-manuel
Copy link
Collaborator

mr-manuel commented May 6, 2023

There are only two voltages:

  • Bulk/Absorption: For Linear Mode max voltage is applied the first time the driver runs. When the cells are balanced, then max voltage is only applied again, if the cells are unbalanced in order to balance them.
  • Float: Don't keep max voltage to reduce stress to the battery chemistry. This is based on this chart:
    1-s2 0-S2352152X21015243-gr3_lrg
    Source: https://www.sciencedirect.com/science/article/pii/S2352152X21015243

@Dr-Gigavolt
Copy link
Author

Hi @mr-manuel,

  • thanks for the paper, I'll read it in following days.
  • I hadn't the issue with blocking charge/discharge when using jkbms_ble any more. But this driver is not stable, both instances disappeared several times per day.
  • today I re-installed the driver at the time of a lot of solar power and full batteries. At the time it was not present the ESS tried to charge with couple of 10A. Do you know how to set up the ESS to disable charging and discharging if the battery monitor is not available? Thanks.

@mr-manuel
Copy link
Collaborator

mr-manuel commented May 8, 2023

Which BMS do you have? Maybe Daly? If yes we imrpoved the driver a lot and now it runs finally smoothly. Would be great, if you can test it. It was released as beta today.

If the battery monitor is not available, then it will fall back to the default for a MultiPlus. There is no way to block discharge/charge, but you can prevent bigger currents by setting this settings to 0. Don't forget to remove them afterwards.

GUI -> Settings -> DVCC -> Limit charge current
GUI -> Settings -> ESS -> Limit inverter power

@transistorgit
Copy link
Contributor

@Dr-Gigavolt can you check /var/log/messages.* for "watchdog" and "load average too high"? I've seen that before and wonder if it is the same

@Dr-Gigavolt
Copy link
Author

@mr-manuel

Which BMS do you have? Maybe Daly?

No, I have JK.

@Dr-Gigavolt
Copy link
Author

@transistorgit

@Dr-Gigavolt can you check /var/log/messages.* for "watchdog" and "load average too high"? I've seen that before and wonder if it is the same

I installed the jkbms-ble again to see the messages after the next crash.

@Dr-Gigavolt
Copy link
Author

The first crash already happened:
May 16 19:51:01 raspberrypi2 user.err kernel: [8031915.992387] usb 1-1.1.2.1: failed to send control message: -71
(no "watchdog" or "load average too high")

@mr-manuel
Copy link
Collaborator

Could you post a screenshot of the result from the top command? Please watch for a minute how it's ongoing, so you get a feeling, when the best moment for a screenshot is. Else it can happen that you take a screenshot where the system is idle for a second.

I had a similar problem, when the device run out of memory. Then it bebun to swap and the CPU load went to the sky. This was caused by Node-RED.

@Dr-Gigavolt
Copy link
Author

I don't understand what you mean. The crash happens after some hours, I cannot sit and wait for it. But this commit works reliably and I use it since January: https://github.com/Louisvdw/dbus-serialbattery/tree/3685d15a5d1ba801867bbdb98f57fd805ea2c24a/etc/dbus-serialbattery

@mr-manuel
Copy link
Collaborator

mr-manuel commented May 20, 2023

Reboot your Venus OS and check after 4 hours for one minute the top command. Then check again in 4 hours, if the system did not reboot. Post the screenshot here, after you understood which process is taking the most memory and/or cpu.

@Dr-Gigavolt
Copy link
Author

What is the "top command"?

@Rikkert-RS
Copy link

@Dr-Gigavolt I think this is what is meant "top Command" https://www.linux-praxis.de/top-zeigt-laufende-cpu-prozesse

@Dr-Gigavolt
Copy link
Author

Hello @mr-manuel,
today I mounted jkbms-ble again. Before I updated the Venus, selected the small image (had large before). The instance on TTY3 crashed apx. 3/4 hour after Venus reboot. I found it out 13 min. later. The screenshots of processes are attached. I see nothing suspicious.

top_after_restart.txt
top_13minutes_after_crash.txt

@mr-manuel
Copy link
Collaborator

I close this issue, since the issue related problem is solved.

@Dr-Gigavolt there is another issue open related to your current problem #655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants