Page 10 of 10

Re: Kia Niro BMS

Posted: Tue Nov 11, 2025 8:06 pm
by woleg
Here's what the preamble should look like on both MAX17841 TX -> MAX17845 RX (up) and MAX17845 TX -> MAX17841 RX (down) pairs.

Image

Re: Kia Niro BMS

Posted: Thu Nov 13, 2025 11:22 am
by zuuus
Today I could work again on the BMS and found the following problems,

I found the problem that my MAX17841B nothing sends and today I can't even read the registers from it. So the chip is broken :( .
While there is nothing on the TX- and RX lines I still have a sinus wave on TX 1.25V and RX 440mV after my transformers (SM91502ALE). Even when all cables are disconnected. Haven't figured it out yet what is causing it.

Should have started looking at the RX and TX pins on the MAX chip on the board for activity :| .

Image: TX, RX

Re: Kia Niro BMS

Posted: Thu Nov 13, 2025 1:30 pm
by manny
On the scope you see mains frequency.

Did you connector the probe tip TXUP an the ground clip to the TXUN. If you measure after the transformers.

If you measure before the transformers you can connect the ground clip to the board GND

Re: Kia Niro BMS

Posted: Mon Nov 17, 2025 11:38 am
by zuuus
Thankyou Manny,

The probe clip didn't make good contact with GND. I measured it again where the clip was on the board GND and put the probe to RXP, RXN, TXP and TXN and all were stable zero's.

Today i'm getting a freshly Arduino since the one I used didn't make good contact unless there was a lot of solder. I have a back-up PCB with everything assembled and only used it for reading register of the MAX17841B chip on the PCB, so I think that one is still good. Hopefully I can get things working this time. I will keep you guys updated!

Re: Kia Niro BMS

Posted: Tue Nov 18, 2025 11:17 am
by zuuus
So these are the signals coming from my TX pins.

When connected with cables with one module and the loopback at the end of the cables, I get the scope from the first image. It is in that image under the 0 line, but keeps alternating under and above the 0 line.

The second scope is from the pins before the transformer and the third scope is the pins after the transformers. Cables not connected.

Connected the GND clip of the probe to GND on the board and put the probe on the TX pins. I don't think this is the right signal. Still no data from the module.

How do I get the right signal? Woleg signals looks completely different than mine.

I uploaded the BMS_test_OI.ino code to the Arduino.

Re: Kia Niro BMS

Posted: Tue Nov 18, 2025 1:15 pm
by bexander
When connected with cables with one module and the loopback at the end of the cables.
How does your signal on the RX-pins look?

Re: Kia Niro BMS

Posted: Tue Nov 18, 2025 2:07 pm
by zuuus
These are my scopes on RX.

The first image is the scope I have from the RX line. This was also jumping up and down, so I checked what was going on and found that the signal was in a sinewave with mains frequency.

Re: Kia Niro BMS

Posted: Tue Nov 18, 2025 5:11 pm
by bexander
And still same result in SW?

So the output signal is about 1Vp-p and the returning signal is about 50mVp-p so not much of a signal returning.
To measure this correctly one should use a differential probe but they are expensive.

The best one can do with a single ended probe is:
Connect only a probe to one channel on the scope.
Remove any connection on the scope between PE and gnd, if possible?
Connect probe to TXP. Connect ground clip to TXN. Check signal amplitude.
Move probe and clip to RXLP/RXLN of first slave and check amplitude.
Then move to TXUP/TXUN of first slave and check amplitude.
RXUP/RXUN, amplitude?
TXLP/TXLN, amplitude?
RXP/RXN, amplitude?

With TXP/TXN/RXP/RXN I mean on the slave side of the transformer.

Re: Kia Niro BMS

Posted: Wed Nov 19, 2025 10:43 am
by zuuus
Can't remove connection on the scope between PE and GND.

Here are my scopes:
Image 1 (BMS): Connected GND clip of probe to TXN and probe on TXP after transformers on my BMS. Max ampl. +4V and -3.5V

Image 2 (slave side): Couldn't connect GND clip of probe to the wire. I used math function and did CH1 (RXP) - CH2 (RXN). That is the purple line you see on the scope with scale on 2V. Max ampl. 4V

Image 3 (slave side): Same problem of image 2. I used math function and did CH1 (TXP) - CH2 (TXN). This time purple line (math function) with scale on 200mV. Max ampl. 0V

These scopes are with the whole setup connected and same result in SW with errorByte 6.

Re: Kia Niro BMS

Posted: Wed Nov 19, 2025 12:38 pm
by bexander
Whats your conclusion from those measurements?
To me it seem like there is a wiring or HW problem. The signal should return (RXP/RXN) to the MAX17841 with close to equal amplitude as it was sent (TXP/TXN).

Re: Kia Niro BMS

Posted: Wed Nov 19, 2025 12:57 pm
by manny
So just to check I'm understanding.

The TX signals from the master look good and get to the first module.

But there is no signal on the RX to the master?

Can you check with a multi meter that there is continuity between:
  • Green and White
  • Yellow and Brown
At the connector for the first module?
20251111_170232.jpg
So that it matches with this picture of the end of the original wiring-loom.

Image

Another check:
With the module connected the TX of the module should be on the white and brown wire's

And a stupid question is the module not completely dead? like at 0V?

Re: Kia Niro BMS

Posted: Wed Nov 19, 2025 1:06 pm
by zuuus
I checked every wire and connection. Also did a recheck on the pinouts and my wiring according to the CMC device document linked earlier. With the pinouts I have from that document, I wired everything correctly. And from my understanding TXP and RXP connect together and TXN and RXN connect together. I also think it is hardware/ wiring problem. I know it isn't probably a big problem, but it is one that is causing the whole system to not work. :roll:
It is not the code because other people have used the codes posted here and it worked.
And the pack came from a crashed E-208. But all the modules were fine apart from one that I don't use. The module I test with is at 21.9V and in perfect condition. I don't know if the system bricks itself if it detects it is in a crash like a pyrofuse, but I don't think the MAX even has a command for that.

Re: Kia Niro BMS

Posted: Wed Nov 19, 2025 1:25 pm
by zuuus
Indeed no signal from the slave to the master. I don't know the module pinouts. I know the pinout from the connector that connects with the module. I based my pinout on that from the CMC document. Also I did read something about the wiring harness that was wired wrong from the factory. Could be the case here?

There is continuity between green and white and yellow and brown

My pinout:
Grey - TXLP
Red - TXLN
Orange - RXLP
Pink - RXLN

Re: Kia Niro BMS

Posted: Wed Nov 19, 2025 2:22 pm
by bexander
System2.png
Refering to picture above. If I understand correctly your measurements are taken at 1, 2 and 4?
Signal is good at 1 and 2 but not good at 4.
What does the signal look like at 3?

Another test idea.
What if you disconnect the slave module and loop the connector i.e connecting RXLN to TXUN, RXLP to TXUP, RXUN to TXLN and RXUP to TXLP. Totally bypassing the slave and then measure signal quality at RXN and RXP at BMS on slave side of transformer. This way you also should have continuity from TXP to RXP and also TXN to RXN at BMS on slave side of transformer.
This way you can verify the total wiring chain.

Re: Kia Niro BMS

Posted: Wed Nov 19, 2025 3:00 pm
by manny
zuuus wrote: Wed Nov 19, 2025 1:25 pm Also I did read something about the wiring harness that was wired wrong from the factory. Could be the case here?
That is just the twisted pair not being right. Not a big problem.
There is continuity between green and white and yellow and brown
That's good.
20231109_181421.jpg
This is from my testing days. Looks the same.

Is there a short on the Rx on the master?

Re: Kia Niro BMS

Posted: Wed Nov 19, 2025 6:01 pm
by tom91
Scope your SPI and capture it so it can be reviewed. I have reviewed it quite a bit when porting the code to work on the STM32 with the 208E battery modules.

SPI data will show you where things fail.

Re: Kia Niro BMS

Posted: Thu Nov 20, 2025 10:43 am
by zuuus
I found something interesting to me. When connecting the loopback I see "transmitQueue WD timeout" when I disconnect loopback "transmitQueue WD timeout" disappears. So that means I see "transmitQueue WD timeout" loopback is working?

There is no short on RX. See image 1.

Image 2: TXN to RXN on the loopback
Image 3: TXP to RXP on the loopback

Im going to connect TXN and RXN, TXP and RXP directly on the BMS and see what happends. I will try to scope my SPI MOSI, MISO and SCK and post it

I also found out that my oscilloscope has a dirty GND and that's why im seeing a 50Hz frequency in my signals, so I don't know how reliable the scopes are that I made.

Re: Kia Niro BMS

Posted: Thu Nov 20, 2025 11:42 am
by bexander
Ok, I'm a bit confused...? I think, I might have missed something here?
From the begining in your serial output you got "UARTSlaveDevicesWakeUp WD timeout" directly after "Daisy chain init" which tells me the slave communication is not working properly and all other faults are irrelevant. That's why I have been so focused on the HW side of things.

Please provide a Serial print out of you current setup.
The first 100 lines or so is enough to start with.
Also provide the SW you are running.

If you don't have this error it is more likely SW or setup error.

EDIT:
Yes, I'm sorry but I have misunderstood my one code... :(

EDIT2:
No, I have not, disregard "EDIT".

Re: Kia Niro BMS

Posted: Fri Nov 21, 2025 8:59 am
by zuuus
When connecting on BMS TXP to RXP and TXN to RXN, I also see "transmitQueue WD timeout" in serial monitor. This is with the code already running and then connecting the pins. And keeps looping

Code: Select all

transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
When the pins are already connected I see in serial monitor errorByte 1 wich means initError. And this keeps looping.

Scopes SPI:
Image 1: SCK
Image 2: MISO
Image 3 to 6: MOSI

Scopes BMS connector TX and RX pins:
Image 7: TXN to RXN
Image 8: TXP to RXP

Re: Kia Niro BMS

Posted: Fri Nov 21, 2025 10:23 am
by zuuus
I use BMS_test_OI.ino for SW. See attachment

When I start it with the TX and RX cables plugged in I get this:

Code: Select all

Entering Configuration Mode Successful!
Setting Baudrate Successful!
Starting to Set Mask!
Setting Mask Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Mask!
Setting Mask Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Daisy chain init
Set all slaves
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
3 2 20 40 A0 58 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
errorByte cleared
4
errorByte cleared
4
errorByte cleared
WRITEALL fail
STATUS cleared
4
errorByte cleared
3 2 30 0 B0 A6 D3 
4
When starting with only TXN disconnected and when it's running I reconnect it again I get this. You can see when I reconnect TXN where it starts saying "transmitQueue WD timeout" :

Code: Select all

Entering Configuration Mode Successful!
Setting Baudrate Successful!
Starting to Set Mask!
Setting Mask Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Mask!
Setting Mask Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Daisy chain init
UARTSlaveDevicesWakeUp WD timeout
Set all slaves
2
errorByte cleared
2
errorByte cleared
2
errorByte cleared
READALL fail
2
errorByte cleared
2
errorByte cleared
2
errorByte cleared
READALL fail
2
errorByte cleared
2
errorByte cleared
2
errorByte cleared
WRITEALL fail
2
errorByte cleared
2
errorByte cleared
2
errorByte cleared
WRITEALL fail
6
errorByte cleared
6
errorByte cleared
6
errorByte cleared
WRITEALL fail
6
errorByte cleared
6
errorByte cleared
6
errorByte cleared
WRITEALL fail
6
errorByte cleared
6
errorByte cleared
6
errorByte cleared
WRITEALL fail
6
errorByte cleared
6
errorByte cleared
6
errorByte cleared
WRITEALL fail
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
6
errorByte cleared
6
errorByte cleared
6
errorByte cleared
WRITEALL fail
6
errorByte cleared
6
errorByte cleared
6
errorByte cleared
READALL fail
6
errorByte cleared
6
errorByte cleared
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
6
errorByte cleared
6
errorByte cleared
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
READALL fail
measureCellData WD timeout
0.0	0.0	0.0	10
1 0	1 0
0	0	0	0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
WRITEALL fail
Data not ready
1: 0 0 0 0 0 0 0 0 0
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6
errorByte cleared
transmitQueue WD timeout
6

Re: Kia Niro BMS

Posted: Fri Nov 21, 2025 10:28 am
by bexander
Please provide a Serial print out of you current setup.
The first 100 lines or so is enough to start with. Meaning directly after power on.

One example:

Code: Select all

Entering Configuration Mode Successful!
Setting Baudrate Successful!
Starting to Set Mask!
Setting Mask Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Mask!
Setting Mask Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Starting to Set Filter!
Setting Filter Successful!
Current sens calib
Current sens calib NOK: 262, 257 (range)
Current sens calib
Current sens calib NOK: 213, 213 (range)
Current sens calib
Current sens calib NOK: 179, 179 (range)
Current sens calib
Current sens calib NOK: 148, 148 (range)
Current sens calib
Current sens calib NOK: 128, 129 (range)
Current sens calib
Current sens calib NOK: 115, 115 (range)
Current sens calib
Current sens calib NOK: 111, 110 (range)
Current sens calib
Current sens calib NOK: 108, 107 (range)
Current sens calib
Current sens calib NOK: 101, 101 (range)
Current sens calib
Current sens calib NOK: 100, 100 (range)
Daisy chain init
UARTSlaveDevicesWakeUp WD timeout
Set all slaves
transmitQueue WD timeout
2
errorByte cleared readAll
transmitQueue WD timeout
2
errorByte cleared readAll
transmitQueue WD timeout
2
errorByte cleared readAll
READALL fail
transmitQueue WD timeout
2
errorByte cleared readAll
transmitQueue WD timeout
2
errorByte cleared readAll
transmitQueue WD timeout
2
errorByte cleared readAll
READALL fail
transmitQueue WD timeout
2
errorByte cleared writeAll
transmitQueue WD timeout
2
errorByte cleared writeAll
transmitQueue WD timeout
2
errorByte cleared writeAll
WRITEALL fail
transmitQueue WD timeout
2
errorByte cleared writeAll
transmitQueue WD timeout
2
errorByte cleared writeAll
transmitQueue WD timeout
2
errorByte cleared writeAll
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared writeAll
transmitQueue WD timeout
6
errorByte cleared writeAll
transmitQueue WD timeout
6
errorByte cleared writeAll
WRITEALL fail
transmitQueue WD timeout
6
errorByte cleared writeAll
transmitQueue WD timeout
6
errorByte cleared writeAll
transmitQueue WD timeout
6
errorByte cleared writeAll
If the "Init" fails, everthing thereafter will fail as well regarding slave communication.
The key here is line 40, "UARTSlaveDevicesWakeUp WD timeout", meaning "// 5, Wait for all UART slave devices to wake up" step have failed in the daisyChainInit() function, and the rest of the function is skipped.

There should be no errors between "Daisy chain init" and "Set all slaves" in order to have a chance of successful slave com.
Until you have reached this state all the other errors are irrelevant.

Re: Kia Niro BMS

Posted: Fri Nov 21, 2025 10:45 am
by zuuus
I think I provided the Serial print? The second print in my post is exactly the first 100 lines I get when I start it/press restart button. Also what is exactly SPI supply pin used for? My chips are already powered.

Re: Kia Niro BMS

Posted: Fri Nov 21, 2025 4:06 pm
by bexander
I did not see that post when I wrote my answer. I started typing before you posted probably.

Anyway, good news.
In first print out you have successful initiation, meaning slave communication is up and your wiring is correct!
Now lets start finding out why writeall fails.

Re: Kia Niro BMS

Posted: Fri Nov 21, 2025 4:15 pm
by bexander
Try this modified code.
BMS_test_OI_modified2.ino
(46.67 KiB) Downloaded 2 times
EDIT:
Code updated again.
Added clearing more registers at start-up and during fault detection.
Changed setup to take numberOfSlaves, numberOfCellsPerSlave and numberOfTemperatureSensors into account.