DIY Electric Car Forums banner

81 - 100 of 121 Posts

·
Registered
Joined
·
46 Posts
Hello Kenny,

This morning i monitored the dialog during 1h30.
I discharged a fully charged battery with my electronic load at 5ah for 10 min.
And i plugged in the charger.
For the first 50 min the data was the same
After 50 min until the end of charge, the data move constantly every 20-60 sec.
The refresh rate is not constant.

By observing the scope curve, we can say that the dialog is asynchronous.
I think in this dialog, there are a acknowledge pulse. We can observe two different kinds of groung level.
The small pulse may represent a logic 0 , and the large pulse a logic 1.
Or the opposite.
Anyway, i can count 32 bits.
Only the fisrts 16 bits move.

Kenny, i don't understand why the charger will make this dialog.


1011111000100010 1001100000000100 start
1011111000100010 1001100000000100
.
.
.
0110000011111100 1001100000000100 50 min later
0000000010011100 1001100000000100
0111000011101100 1001100000000100
0011000010101100 1001100000000100
0101000011001100 1001100000000100
1101000001001100 1001100000000100
0001000010001100 1001100000000100
1001000000001100 1001100000000100
0110100011110100 1001100000000100
1110100001110100 1001100000000100
0010100010110100 1001100000000100
1010100000110100 1001100000000100
0100100011010100 1001100000000100
1100100001010100 1001100000000100
0000100010010100 1001100000000100
1000100000010100 1001100000000100
0111100011100100 1001100000000100
1111100001100100 1001100000000100
0011100010100100 1001100000000100
1011100000100100 1001100000000100
0101100011000100 1001100000000100
1101100001000100 1001100000000100
0001100010000100 1001100000000100
1001100000000100 1001100000000100
0110010011111000 1001100000000100
1110010001111000 1001100000000100
0010010010111000 1001100000000100
1010010000111000 1001100000000100
0100010011011000 1001100000000100
1100010001011000 1001100000000100
0000010010011000 1001100000000100
1000010000011000 1001100000000100
0111010011101000 1001100000000100
1111010001101000 1001100000000100
0011010010101000 1001100000000100
0101010011001000 1001100000000100
1101010001001000 1001100000000100
0001010010001000 1001100000000100
0110110011110000 1001100000000100
0010110010110000 1001100000000100
1010110000110000 1001100000000100
0100110011010000 1001100000000100
1100110001010000 1001100000000100
0000110010010000 1001100000000100
1000110000010000 1001100000000100
0111110011100000 1001100000000100
1111110001100000 1001100000000100
0011110010100000 1001100000000100
0011111010100000 1001100000000100
0011110110100000 1001100000000100 end
 

·
Registered
Joined
·
1,437 Posts
Discussion Starter #82 (Edited)
The second field of 16 bits is repeating a sequence: 9 8 0 4

if we change the byte order gives: 8940 , which could be part number of the OZ chip?

i noticed at the :50 minute mark that the last byte of the first 16-bits word is shifting the lowest set bit to the left and back filling with zero. Something is increasing over time. It started at the second bit, then shifted over to the 6th bit position.

Code:
1011	1110	0010	0010		1001	1000	0000	0100
1011	1110	0010	0010		1001	1000	0000	0100
								
								
								
0110	0000	1111	1100		1001	1000	0000	0100
0000	0000	1001	1100		1001	1000	0000	0100
0111	0000	1110	1100		1001	1000	0000	0100
0011	0000	1010	1100		1001	1000	0000	0100
0101	0000	1100	1100		1001	1000	0000	0100
1101	0000	0100	1100		1001	1000	0000	0100
0001	0000	1000	1100		1001	1000	0000	0100
1001	0000	0000	1100		1001	1000	0000	0100
0110	1000	1111	0100		1001	1000	0000	0100
1110	1000	0111	0100		1001	1000	0000	0100
0010	1000	1011	0100		1001	1000	0000	0100
1010	1000	0011	0100		1001	1000	0000	0100
0100	1000	1101	0100		1001	1000	0000	0100
1100	1000	0101	0100		1001	1000	0000	0100
0000	1000	1001	0100		1001	1000	0000	0100
1000	1000	0001	0100		1001	1000	0000	0100
0111	1000	1110	0100		1001	1000	0000	0100
1111	1000	0110	0100		1001	1000	0000	0100
0011	1000	1010	0100		1001	1000	0000	0100
1011	1000	0010	0100		1001	1000	0000	0100
0101	1000	1100	0100		1001	1000	0000	0100
1101	1000	0100	0100		1001	1000	0000	0100
0001	1000	1000	0100		1001	1000	0000	0100
1001	1000	0000	0100		1001	1000	0000	0100
0110	0100	1111	1000		1001	1000	0000	0100
1110	0100	0111	1000		1001	1000	0000	0100
0010	0100	1011	1000		1001	1000	0000	0100
1010	0100	0011	1000		1001	1000	0000	0100
0100	0100	1101	1000		1001	1000	0000	0100
1100	0100	0101	1000		1001	1000	0000	0100
0000	0100	1001	1000		1001	1000	0000	0100
1000	0100	0001	1000		1001	1000	0000	0100
0111	0100	1110	1000		1001	1000	0000	0100
1111	0100	0110	1000		1001	1000	0000	0100
0011	0100	1010	1000		1001	1000	0000	0100
0101	0100	1100	1000		1001	1000	0000	0100
1101	0100	0100	1000		1001	1000	0000	0100
0001	0100	1000	1000		1001	1000	0000	0100
0110	1100	1111	0000		1001	1000	0000	0100
0010	1100	1011	0000		1001	1000	0000	0100
1010	1100	0011	0000		1001	1000	0000	0100
0100	1100	1101	0000		1001	1000	0000	0100
1100	1100	0101	0000		1001	1000	0000	0100
0000	1100	1001	0000		1001	1000	0000	0100
1000	1100	0001	0000		1001	1000	0000	0100
0111	1100	1110	0000		1001	1000	0000	0100
1111	1100	0110	0000		1001	1000	0000	0100
0011	1100	1010	0000		1001	1000	0000	0100
0011	1110	1010	0000		1001	1000	0000	0100
0011	1101	1010	0000		1001	1000	0000	0100
 

·
Registered
Joined
·
46 Posts
........

Code:
[B]1011[/B]	1110	[B]0010[/B]	0010		B2
[B]1011[/B]	1110	[B]0010[/B]	0010		B2
								
													
[B]0110[/B]	0000	[B]1111[/B]	1100		6F
[B]0000[/B]	0000	[B]1001[/B]	1100		09
[B]0111[/B]	0000	[B]1110[/B]	1100		7E
[B]0011[/B]	0000	[B]1010[/B]	1100		3A
[B]0101[/B]	0000	[B]1100[/B]	1100		5C
[B]1101[/B]	0000	[B]0100[/B]	1100		D4
[B]0001[/B]	0000	[B]1000[/B]	1100		18
[B]1001[/B]	0000	[B]0000[/B]	1100		90
[B]0110[/B]	1000	[B]1111[/B]	0100		6F
[B]1110[/B]	1000	[B]0111[/B]	0100		E7
[B]0010[/B]	1000	[B]1011[/B]	0100		2B
[B]1010[/B]	1000	[B]0011[/B]	0100		A3
[B]0100[/B]	1000	[B]1101[/B]	0100		4D
[B]1100[/B]	1000	[B]0101[/B]	0100		C5
[B]0000[/B]	1000	[B]1001[/B]	0100		09
[B]1000[/B]	1000	[B]0001[/B]	0100		81	
[B]0111[/B]	1000	[B]1110[/B]	0100		7E	
[B]1111[/B]	1000	[B]0110[/B]	0100		F6	
[B]0011[/B]	1000	[B]1010[/B]	0100		3A	
[B]1011[/B]	1000	[B]0010[/B]	0100		B2
[B]0101[/B]	1000	[B]1100[/B]	0100		5C
[B]1101[/B]	1000	[B]0100[/B]	0100		D4
[B]0001[/B]	1000	[B]1000[/B]	0100		18
[B]1001[/B]	1000	[B]0000[/B]	0100		90
[B]0110[/B]	0100	[B]1111[/B]	1000		6F
[B]1110[/B]	0100	[B]0111[/B]	1000		E7
[B]0010[/B]	0100	[B]1011[/B]	1000		2B
[B]1010[/B]	0100	[B]0011[/B]	1000		A3
[B]0100[/B]	0100	[B]1101[/B]	1000		4D
[B]1100[/B]	0100	[B]0101[/B]	1000		C5
[B]0000[/B]	0100	[B]1001[/B]	1000		09
[B]1000[/B]	0100	[B]0001[/B]	1000		81
[B]0111[/B]	0100	[B]1110[/B]	1000		7E
[B]1111[/B]	0100	[B]0110[/B]	1000		F6
[B]0011[/B]	0100	[B]1010[/B]	1000		3A
[B]0101[/B]	0100	[B]1100[/B]	1000		5C
[B]1101[/B]	0100	[B]0100[/B]	1000		D4
[B]0001[/B]	0100	[B]1000[/B]	1000		18
[B]0110[/B]	1100	[B]1111[/B]	0000		6F
[B]0010[/B]	1100	[B]1011[/B]	0000		2B
[B]1010[/B]	1100	[B]0011[/B]	0000		A3
[B]0100[/B]	1100	[B]1101[/B]	0000		4D
[B]1100[/B]	1100	[B]0101[/B]	0000		C5
[B]0000[/B]	1100	[B]1001[/B]	0000		09
[B]1000[/B]	1100	[B]0001[/B]	0000		81
[B]0111[/B]	1100	[B]1110[/B]	0000		7E
[B]1111[/B]	1100	[B]0110[/B]	0000		F6
[B]0011[/B]	1100	[B]1010[/B]	0000		3A
[B]0011[/B]	1110	[B]1010[/B]	0000		3A
[B]0011[/B]	1101	[B]1010[/B]	0000		3A
It's a strange dialog
I noted that all datas are linked

0 -- 9
1 -- 8
2 -- B
3 -- A
4 -- D
5 -- C
6 -- F
7 -- E
8 -- 1
9 -- 0
A -- 3
B -- 2
C -- 5
D -- 4
E -- 7
F -- 6
 

·
Registered
Joined
·
1,437 Posts
Discussion Starter #84
That is such a strange pattern--what could it possibly mean or how used?

Begin at the end and work back, the shift-bit and zero limit the range of available data pairs.

The link pairs go both ways, e.g. an F-->6 and a 6-->F

It could just be some sort of security feature to ensure that both the battery and the charger are OEM equipment, again for liability purpose$.

Maybe it's just constantly checking the health and status of the FETs using this linked pair, but it seems like busy-work code just to fill in some time.

The T1 line will always be held HI by the pull-up circuit in the charger, but then either/both sides can pull it LOW. So maybe this link pattern is a "call" and an "answer-back" response?

Schematic Note:
Looking back on the 5Ahr board, it seems that all balancing is done internally thru the OZ8940--nearly all the transistors are used for the T1 and T2 circuits with not enough left for balancing.
 

·
Registered
Joined
·
46 Posts
It will be very difficult to charge the battery without its original charger.
Even when using a microcontroller, we need a power supply, the connectors, a case ....
It's easyer to find a used original charger than try to make one.

I'm waiting an aliexpress battery, i could monitor the signal.
I wonder how the sellers managed to get around this problem.

Yes , the balancing is made inside the OZ8940. All other transistors are used by the T1 and T2 circuits.
 

·
Registered
Joined
·
5 Posts
Very interesting research here.
I have a 5Ah battery that broke yesterday. The charge level lights are not working and putting it on the charger I get the error. Measuring the cells, all are at 3.35-3.38V, but one is 3.05.
I also measured the two FETs, and both are ON, so this is Ok. I suspect, that the PIC is seeing the imbalance of the cells, and communicating the error through T1. Now I am trying to tricke charge the low cell with 10mA to 3.35V and I will report here what happens.

EDIT: Actually, the charge FET is in a strange state, it measures 12V on the gate, but U2_pin18 is low, so it should be off...
 

·
Registered
Joined
·
1,437 Posts
Discussion Starter #87
Check Q13 and Q14, maybe one of those is leaking but not enough to drive the gate, seems like the charge FET gets about 90% of pack voltage to turn on.

Is the discharge FET ON?

i've had good luck with charging low cells and getting a pack working again.
 

·
Registered
Joined
·
1,437 Posts
Discussion Starter #88
@ Oric 1,

Could you try monitoring T2 to see if it is active when T1 is active?

Did you replace the broken 8940? And did you have to use an isolator to capture those scope traces?
 

·
Registered
Joined
·
5 Posts
Check Q13 and Q14, maybe one of those is leaking but not enough to drive the gate, seems like the charge FET gets about 90% of pack voltage to turn on.

Is the discharge FET ON?

i've had good luck with charging low cells and getting a pack working again.
I have revived the battery!
After charging the low cell up to 3.35V the battery still would not work, but after doing a reset on the PIC, the indicators started working and it also charges! I suspect, the PIC was trapped in an infinite loop or a failure state.

After looking closely at the FETs, I noticed that both should be off, but due to some leakage in the BJTs both gates were at ~12V and actually on. But it doesn't matter, I think what is relevant is the T1 communication between the charger and the battery.

After all I believe that the problem is that the battery can't balance the cells, there is simply no circuitry for that. Now I am curious, what would have happened if I just simply reset the PIC without charging the cell... There is either 1) a different logic for cutting off discharge and allowing charging or 2) the PIC falls in a failure state if a cell is too deeply discharged. If one more battery fails, I will try it out :)
 

·
Registered
Joined
·
5 Posts
On the corner of the PCB there is a 5-pin programming interface labelled CLK, DAT, GND, 3.3V, RST. I connected RST to GND with a 1K resistor for a second
 

·
Registered
Joined
·
1,437 Posts
Discussion Starter #92
Reset and Master Clear pin

Thanks. The "RST" on header HR1 is directly connected to pin 1 of the PIC with a 1% 10k resistor (R12) pullup to 3.3V, and C7 capacitor to GND.

PIC pin1 has the Master Clear function MCLR if enabled in the config register.

i wonder if the chip was in SLEEP mode or some low power state, and just needed to wake up?
 

Attachments

·
Registered
Joined
·
5 Posts
I would rather say it was in a failure state / infinite loop, since power consumption was high, by the time I charged the cell from 3.05 to 3.35, all other cells went down from 3.35 to 3.31...
 

·
Registered
Joined
·
1,437 Posts
Discussion Starter #94
Re: Scope Data Capture Guess

Looking at the T1 COM data again.

The second word of the scope data capture appears to be the chip model number, 8940, IF we reverse the nibble (half-byte) order and read the bits as msb first.

So for the first 16-bit word, i tried the same approach to reverse the nibs but also reversed read the bits as "lsb" first, then an interesting pattern appears to show a sequence of countdown/up loops. i split the bytes into 4 for current hi, 4 for current lo, 2 for mode control, 2 for target/counter hi, 3 for target/counter low, and a loop toggle bit at the end.

Here's my guess of what this means:

Mode Control bits M2: 0 = CV; 1= CC; 2=OFF.

Ch4 and Cl4 are related to the settings or readings of the charging current.

T2 and T3 are related to a target setting/ up-counter toward some quantity (coulombs or Ahrs ?).

At the end is a Loop toggle bit or an ON/OFF for some function?


At the beginning the mode was set to Constant Current as indicated by the mode bits M2 = 1; the current was set to "4 4"; the target (coulomb?) counter was set to "3 6"; Loop bit set to 1/ON.

After :50 the voltage rose up to the CV level and the charger changed Mode to M2 = 0; there began a count-down loop on the C4 to decrease current; the Target counter began it's up-counter; the Loop bit basically began to toggle for every COM cycle after a few transition cycles.

At the end when the Target Value was reached the Loop bit turned OFF and the Mode went to 1, then on the next cycle went to 2, which was the OFF command to Stop Charging.

This is all just my attempt to put some sense to the data stream and relate it to a lithium battery charging protocol. Why the bit order would be different between the first word and the second word? strange

Code:
reversed nib and bit order										
					C4	C4	M2	T2	T3	Lb
hi	lo	hi	lo		hi	lo	hi	hi	lo	lo
0100	0100	0111	1101		4	4	1	3	6	1
0100	0100	0111	1101		4	4	1	3	6	1
										
0011	1111	0000	0110		3	F	0	0	3	0
0011	1001	0000	0000		3	9	0	0	0	0
0011	0111	0000	1110		3	7	0	0	7	0
0011	0101	0000	1100		3	5	0	0	6	0
0011	0011	0000	1010		3	3	0	0	5	0
0011	0010	0000	1011		3	2	0	0	5	1
0011	0001	0000	1000		3	1	0	0	4	0
0011	0000	0000	1001		3	0	0	0	4	1
0010	1111	0001	0110		2	F	0	1	3	0
0010	1110	0001	0111		2	E	0	1	3	1
0010	1101	0001	0100		2	D	0	1	2	0
0010	1100	0001	0101		2	C	0	1	2	1
0010	1011	0001	0010		2	B	0	1	1	0
0010	1010	0001	0011		2	A	0	1	1	1
0010	1001	0001	0000		2	9	0	1	0	0
0010	1000	0001	0001		2	8	0	1	0	1
0010	0111	0001	1110		2	7	0	1	7	0
0010	0110	0001	1111		2	6	0	1	7	1
0010	0101	0001	1100		2	5	0	1	6	0
0010	0100	0001	1101		2	4	0	1	6	1
0010	0011	0001	1010		2	3	0	1	5	0
0010	0010	0001	1011		2	2	0	1	5	1
0010	0001	0001	1000		2	1	0	1	4	0
0010	0000	0001	1001		2	0	0	1	4	1
0001	1111	0010	0110		1	F	0	2	3	0
0001	1110	0010	0111		1	E	0	2	3	1
0001	1101	0010	0100		1	D	0	2	2	0
0001	1100	0010	0101		1	C	0	2	2	1
0001	1011	0010	0010		1	B	0	2	1	0
0001	1010	0010	0011		1	A	0	2	1	1
0001	1001	0010	0000		1	9	0	2	0	0
0001	1000	0010	0001		1	8	0	2	0	1
0001	0111	0010	1110		1	7	0	2	7	0
0001	0110	0010	1111		1	6	0	2	7	1
0001	0101	0010	1100		1	5	0	2	6	0
0001	0011	0010	1010		1	3	0	2	5	0
0001	0010	0010	1011		1	2	0	2	5	1
0001	0001	0010	1000		1	1	0	2	4	0
0000	1111	0011	0110		0	F	0	3	3	0
0000	1101	0011	0100		0	D	0	3	2	0
0000	1100	0011	0101		0	C	0	3	2	1
0000	1011	0011	0010		0	B	0	3	1	0
0000	1010	0011	0011		0	A	0	3	1	1
0000	1001	0011	0000		0	9	0	3	0	0
0000	1000	0011	0001		0	8	0	3	0	1
0000	0111	0011	1110		0	7	0	3	7	0
0000	0110	0011	1111		0	6	0	3	7	1
0000	0101	0011	1100		0	5	0	3	6	0
0000	0101	0111	1100		0	5	1	3	6	0
0000	0101	1011	1100		0	5	2	3	6	0
		^ .  stop bit				^
 

·
Registered
Joined
·
46 Posts
Whaoo Kenny, very good job !


@ Oric 1,

Could you try monitoring T2 to see if it is active when T1 is active?

Did you replace the broken 8940? And did you have to use an isolator to capture those scope traces?
no yet ordered !
I wonder if it's economically profitable to replace the broken oz8940 on a 2.6 Ah PCB.
Maybe, i'll use an ESP8266 D1 mini pluged directly inside the battery. In this case no isolation problem !

The T2 contact is not connected on the charger.
And my monitoring was perform on a 2.6Ah PCB . This PCB didn't own the T2 contact
 

·
Registered
Joined
·
46 Posts
2nd oz8940 DEAD :(
I didn't understand what happened.
Just wired gnd, sda and scl to my d1 mini wemos.
At the begining , i power it by external USB pack bank.
But i need to reprogram , so i connected it to usb from my computer.
The oz8940 ouput pin 7 that power the 3.3v regulator is 1.3 V instead 12V ???

This Chip is very sensitive.

Very strange , on my first trials, i plug and unplug I2C ten times without any problem. :(
 

·
Registered
Joined
·
5 Posts
2nd oz8940 DEAD :(
I didn't understand what happened.
Just wired gnd, sda and scl to my d1 mini wemos.
At the begining , i power it by external USB pack bank.
But i need to reprogram , so i connected it to usb from my computer.
The oz8940 ouput pin 7 that power the 3.3v regulator is 1.3 V instead 12V ???

This Chip is very sensitive.

Very strange , on my first trials, i plug and unplug I2C ten times without any problem. :(
Was it also connected to the charger? Maybe the common ground is the problem... Have you tried using an optical isolator for the I2C?
 

·
Registered
Joined
·
46 Posts
The battery was not connected to the charger or load.
Only the battery I2C ( sda, scl and gnd ) connected to the ESP8266 mini.
And the ESP connected in usb to the computer.
I think the ESP don't own a true I2C protocol.
Normaly , the I2C is an open collector protocol.
The device apply a ground or nothing. With the pull-up resistor in the circuit , the level rise to vcc when the device release the bus.
The ESP apply gnd or vcc, and the current capactiy is 12 mA, enouth to destroy the input I2C device.
 

·
Registered
Joined
·
12 Posts
On the corner of the PCB there is a 5-pin programming interface labelled CLK, DAT, GND, 3.3V, RST. I connected RST to GND with a 1K resistor for a second
I was able to fix one of my batteries using this reset method. My circuit has 2 pin reset interface. I made sure all cells are at 3.3v and short these two pins with a 5ohm resister. The batter started working.:)

Now I am trying to fix the other battery. I tried to reset it with 4.0V in each cell bank and it did not do anything. Right now I am draining each cell to 3.7v and give it another try.
 

·
Registered
Joined
·
12 Posts
Good news! I got the second batter to work as well. This is the one that did not work at 4.08V in each cell bank. I drained all 10 banks and tried a reset and it worked. To my surprise, cells are not even balanced. Below is the voltage in each cell:

CL1: 3.82
CL2: 3.63
CL3: 3.75
CL4: 3.77
CL5: 3.78
CL6: 3.79
CL7: 3.70
CL8: 3.65
CL9: 3.80
CL10:3.63

So it looks like resetting is the best way to fix the 4-light blinking issue. If this does not work, that means some other component may also be bad.

One of the things that I noticed during the reset process is that all 4 lights blink once if the reset is successful. After that blink, if you press the gauge button, it should indicate the right energy level of the battery.
 
81 - 100 of 121 Posts
Top