I bet you were hoping for something much more interesting. However more pics to come of what it has now under the rear

Any paint left Damien ??
Code: Select all
{
"boost": 2400,
"fweak": 220,
"fconst": 400,
"udcnom": 370,
"fslipmin": 2,
"fslipmax": 5,
"fslipconstmax": 6,
"fmax": 600,
"dirchrpm": 1000,
"dirmode": 1,
"ocurlim": 1200,
"bmslimhigh": 90,
"bmslimlow": -100,
"udcmin": 300,
"udcmax": 460,
"idcmax": 5000,
"idcmin": -500,
"tmphsmax": 100,
"tmpmmax": 300,
"throtmax": 100,
"throtmin": -100,
"iacmax": 5000,
"chargemode": 0,
"chargecur": 0,
"chargekp": 80,
"chargeki": 10,
"chargeflt": 8,
"chargepwmin": 0,
"chargepwmax": 90,
"potmin": 460,
"potmax": 1900,
"pot2min": 850,
"pot2max": 3850,
"potmode": 1,
"throtramp": 10,
"throtramprpm": 20000,
"ampmin": 2,
"slipstart": 40,
"brknompedal": -15,
"regenramp": 100,
"brknom": 15,
"brkmax": -15,
"brkcruise": -15,
"brkrampstr": 10,
"brkout": -100,
"idlespeed": -100,
"idlethrotlim": 50,
"idlemode": 3,
"speedkp": 1,
"speedflt": 5,
"cruisemode": 0,
"udcsw": 300,
"udcswbuck": 540,
"tripmode": 3,
"pwmfunc": 0,
"pwmgain": 100,
"pwmofs": 0,
"canspeed": 1,
"canperiod": 0,
"fslipspnt": -2,
"respolepairs": 1,
"encmode": 1,
"pwmfrq": 1,
"deadtime": 63,
"ampnom": 0
}
What hardware are you using to talk to the battery module?
Thanks for the info. Unfortunately I am not at all keen to try to tap directly into to the BMS boards with a serial link, and would prefer to use the proper connectors if possible. Unfortunately, these connectors don't expose normal serial, only a proprietary link, requiring the board I linked to previously. Connecting to the first one would be enough to access the chain and talk to the others, so I suppose this is an option to consider. I suspect if I had the hardware working it would be quite easy to get comms with the Arduino working, as the protocol is well documented (and I'm a software engineer).Peter wrote: ↑Sat Oct 09, 2021 6:54 pm Hi catphish. I connected directly to the onboard chip of the BMS modules by using 4 wires of an RS232 adaptor cable then using the TI software. Tried to use the software thankfully offered by FJ3422 but couldn’t extract what I thought was the simple cell voltage reading part. Any assistance to be able to comms with the modules via Arduino would be gratefully accepted. I am already using an UNO and CAN shield to interface SDU to a Nextion screen so if I could sort comms to BMS the task would be complete. As to current, pulling 250A is exciting in such a small car but a quick delve into higher doesn’t so far show any deterioration of the capacity. I will be adding another 2 modules in parallel to give 400v so that will require waterproof underwear![]()
Code: Select all
#include "CRC16.h"
#include "CRC.h"
#define FRM_TYPE_COMMAND (1<<7)
#define REQ_TYPE_BROADCAST_READ (6<<4)
#define ADDR_SIZE_8 0
void setup() {
// Communication with PC for debugging, I assume you know what you're doing here
Serial.begin(115200);
// I'm not certain what baud rate is required. Default is likely 250,000
Serial2.begin(250000);
Serial.println("Hello!");
}
uint16_t crc_16_ibm(uint8_t *buf, uint16_t len);
void loop() {
delay(1000);
// Our command frame will be 6 bytes (init, address, data, data, crc, crc)
uint8_t command[6];
// Broadcast read (write with response) command. 2 data byts. See datasheet page 64.
// We use a broadcast because we don't know or care about the device's address.
command[0] = FRM_TYPE_COMMAND | REQ_TYPE_BROADCAST_READ | ADDR_SIZE_8 | 2;
// Register address 0 is the 2 byte silicon version
// Change this to 0x0A to get the device address (and change length below to 0)
command[1] = 0;
// First "data" byte is address of highest responder, we'll set this to 31, the highest possible address.
command[2] = 31;
// Second "data" byte is the number of bytes expected (less 1). We expect 2 bytes, so set 1 here.
// Set this to zero if only 1 byte is expected
command[3] = 1;
// Calculate crc
uint16_t crc = crc_16_ibm(command, 4);
// Append CRC
command[4] = crc >> 8;
command[5] = crc & 0xff;
// Send the command
Serial2.write(command, 6);
// Wait for a response, first byte is length (less 1)
uint8_t length = Serial2.read() + 1;
Serial.print("Received response. Length: ");
Serial.print(length);
Serial.print("\n");
// Receive and print each byte reseived. This should probably be 08 06 but, any response would be a start.
for(int n=0; n<length; n++) {
uint8_t data = Serial2.read();
Serial.print(" Data: ");
Serial.print(data, HEX);
Serial.print("\n");
}
// Ignore CRC
Serial2.read();
Serial2.read();
}
// Ths function is provided in the TI datasheet. It should just work.
uint16_t crc_16_ibm(uint8_t *buf, uint16_t len) {
uint16_t crc = 0;
uint16_t j;
while (len--) {
crc ^= *buf++;
for (j = 0; j < 8; j++)
crc = (crc >> 1) ^ ((crc & 1) ? 0xa001 : 0);
}
return crc;
}
What do you mean with the 'proprietary link'' ? Isn't that the CAN-bus between the slaves (that's the interface I used)?
Unfortunately this isn't CAN. There's only one IC on the board, and it doesn't support CAN.