BMW S box control #896
Replies: 1 comment
-
Hi, there is already support for the s-box in battery emulator in shunt mode based on the above code. The issue is that the s-box doesn't provide a complete BMS solution on it's own. You need the cell monitors to get cell voltages & temps and the SME to get the highly optimized SOC/SOH calculations. The CSCs also cannot sit on the same canbus as the s-box due to ID overlap. The BMW PHEV integration instead seeks to control the original SME with the battery intact, having the SME control the S-BOX and the CSCs via it's 2 internal canbus connections. This integration has everything working - except for the messages the EME/DME would send on the external side of the bus to enable the contactors (this is different to the messages posted above). We need canbus logs from a working vehicle to complete this. With a 3canbus board or an inverter that doesn't mind battery CAN, you could build an integration directly to the CSC & SBOX using two separate can-buses - that however should be started fresh in a different battery type as it's a completely different approach. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Damien has already worked on the code for the S box.
Damien's notes:
Four heavy duty spade terminals provide connection for HV Battery + , - and Output + ,-
Connection of Can data and 12v power is via a white 16 pin connector on the front.
Pins 12 and 14 to +12v
Pin 3 to GND
Pin 1 CANH
Pin 10 CANL
CAN is 500K speed.
Two ids are required to run the SBox and control its contactors:
0x100 and 0x300 DLC 4 at 20ms intervals.
0x100 has a counter and CRC8 and is the main control message.
Byte 0 controls contactor function as follows :
0x62 Activates negative contactor
0x0A Activates positive contactor
0x8A Activates positive contactor and precharge relay
0xA6 Activates negative contactor and precharge relay
0x62 Activates negative and positive contactors and precharge relay
0x86 Activates precharge relay only.
Other combinations of bits in byte 0 will cause individual contactors and combinations of contactors and precharge relay to engage.
Byte 1: Counter in upper nibble running from 0x0 to 0xE. Lower nibble fixed at 0x1.Function not yet investigated.
Byte 2: fixed at 0xFF. Function not yet investigated.
Byte 3: CRC8 , Poly 0x31 ,Initial value 0x00, final XOR 0x00 , inverse both. Calculated on length of 8 bytes while message is only 4 bytes long.
0x300 can be static:
0xFF , 0xFE , 0xFF , 0xFF
Information such as Battery voltage, Current, Output voltage etc are provided over CAN making it a very versatile unit. Messages for Ah,kwh,kw etc are being investigated.
More information is available on Damien's GitHub - /~https://github.com/damienmaguire/BMW_SBox
Can this be added to the BMW PHEV code?
Thanks
Andrew
Beta Was this translation helpful? Give feedback.
All reactions