Battery-Emulator icon indicating copy to clipboard operation
Battery-Emulator copied to clipboard

Why not using relay for A/B/C/D switch control ?

Open X-Ryl669 opened this issue 1 year ago • 1 comments

I wonder why you're using a manual switch for A/B/C/D instead of a (cheap) 4 relay board to control them for the precharge/charge sequence?

You can't respect the tight timing with manual switch (hard to switch on and off in less than 0.3s).

X-Ryl669 avatar May 26 '23 09:05 X-Ryl669

Just what I wanted to suggest, let the LilyGo handle the startup too!

cyberjunky avatar May 26 '23 16:05 cyberjunky

Battery agnostic precharge/contactor closing has been added to the software. https://github.com/dalathegreat/BYD-Battery-Emulator-For-Gen24/blob/main/Software/Software.ino#L206

Still needs to be tested and documented!

dalathegreat avatar Jun 09 '23 22:06 dalathegreat

We did some testing and on the battery we used the bit for LB_MainRelayOn_flag is always 0. I changed the code temporarily so batteryAllowsContactorClosing = 1; and the precharge worked fine. This was on an 30kWh battery. Here is an screenshot on the relevant byte (3) from a log file. image I am not very familiar with Leaf battery and will appreciate if anyone has any ideas on what to test.

Edit: The battery is reported as LEAF battery gen: 2 Here is some log of values: __ OK __ Nissan LEAF battery selected WAITING_FOR_BATTERY... WAITING_FOR_BATTERY... Precharge... Negative... Positive... Precharge OFF... BMS Status (3=OK): 3 Battery Idle Power: 0 Max discharge power: 30000 Max charge power: 19000 SOH%: 9100 SOC% to Fronius: 4530 Temperature Min: 50 Temperature Max: 60 GIDS: 189 LEAF battery gen: 2 Min cell voltage: 0 Max cell voltage: 0 Cell deviation: 0 BMS Status (3=OK): 3 Battery Idle Power: 0

bobbo3 avatar Aug 15 '23 10:08 bobbo3

Thanks for testing @bobbo3 , you beat me to it! LB_MainRelayOn_flag wont be set to 1 unless both HV connectors are seated. Do you have both the big and the small seated?

dalathegreat avatar Aug 15 '23 12:08 dalathegreat

Thank you! I think we shorted both interlocks - the drive one and the heater one... but it is possible that we may have missed something. I will double check.

bobbo3 avatar Aug 15 '23 22:08 bobbo3

Closing this issue as completed, many are using automatic contactor control already! 🥳

dalathegreat avatar Sep 14 '23 08:09 dalathegreat