Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V11 and V15 (SV22) Support #8

Open
Gucioo opened this issue Jan 19, 2024 · 32 comments
Open

V11 and V15 (SV22) Support #8

Gucioo opened this issue Jan 19, 2024 · 32 comments

Comments

@Gucioo
Copy link

Gucioo commented Jan 19, 2024

My battery from Dyson V15 detect (SV22) stopped working suddenly, even it had 14 minutes left on LCD.
It didn't give any power and did not light any LED.
I opened it and measured the cells voltage and there were 4x 3.1 V and 3x 3.5 V,
this is probably the case where they go out of balance and uC locks battery output.
I charged remaining 4 cells to 3.5 V, so now all cells are at the same level - 3.5 V.
This didn't recover battery pack. Connecting charger doesn't trigger LED or V out either.

I found your firmware and topic on the forum, which is very helpfull. Dyson is clearly putting bad practice in to BMS batteries.
Forcing to buy new battery, even though old one is usable. I can us old one for tests or provide some details / images to help.

Looking at wiki under section V11, I decided to give it a go and flash the firmware using Rpi4.

I compiled new firmware with following change to the config.h, as per your advice:
#define ENABLE_CHARGE_PIN PIN_PA01 // V10 PIN_PA02

Now battery BMS seems to be giving some signs of life. Still no output on the main Pins.
but there are 2 flashes of blue LED, it only has 2 blue LEDs and you already know it :) looking at your wiki error list:

BMS_ERR_PACK_UNDERTEMP Pack is below -40 if attempting discharge, or -0 if attempting charge.

This would lead to incorrect/missing mapping of RTDs?

There are 2 RTDs and I measured their resistance: 38 Ohms and 39 Ohms.

//PA07 is attached to thermistor RT1

I can remove glue from PCB and maybe trace back RTD pins, if that will help bring compatibility with V11&V15.

SV22-001
SV22-002
SV22-003
SV22-004
SV22-005
SV22-006
SV22-007
SV22-008
SV22-009
SV22-010
SV22-011

Kudos to you David. It would be fantastic if these old batteries could work again with our vacuums.
I know there is still serial protocol that have to be figured out, but you did already great work.

@Gucioo
Copy link
Author

Gucioo commented Jan 22, 2024

I verified pinouts for V15 and enabled Serial Debug as David mentioned in other topic

RESET
PA31 SWDIO
PA30 SWCLK
PA00
PA11 - Rx Sercom0
> PA10 - Tx Sercom0
GND
Vdd (3.3v)

So PA10 and PA11 can be connected to a USB-serial converter or similar at
115200baud and you can see the debug output.

By setting temp limits to - 300 & -400 battery pack is charging and giving output when trigger is pressed.

#define MIN_PACK_CHARGE_TEMP -300				//'C - if less than this, no charge.
#define MIN_PACK_DISCHARGE_TEMP -400			//'C - if less than this, no discharge

This is output from debug serial:
Dyson V10 BMS Aftermarket firmware init
(C) David Pye [email protected]
GNU GPL v3.0 or later
Pack cell voltages:
Cell 0: 3659 mV, min 2500 mV, max 4200 mV
Cell 1: 3686 mV, min 2500 mV, max 4200 mV
Cell 2: 3667 mV, min 2500 mV, max 4200 mV
Cell 3: 3651 mV, min 2500 mV, max 4200 mV
Cell 4: 3745 mV, min 2500 mV, max 4200 mV
Cell 5: 3749 mV, min 2500 mV, max 4200 mV
Cell 6: 3742 mV, min 2500 mV, max 4200 mV
bms_mainloop: Entering state BMS_IDLE
bms_mainloop: Entering state BMS_DISCHARGING
bms_mainloop: Entering state BMS_FAULT
Starting discharge
Discharging at 0 mA, 1000 mAH, capacity 2000 mAH, Temp -56'C
Discharging at 8 mA, 1000 mAH, capacity 2000 mAH, Temp -56'C
bms_mainloop: Entering state BMS_IDLE

I will have to check temperature reading equation, initially looks fine, you are reading TS2_HI register.
I measured around 0.876 V on RT1 & RT2 in ambient temp 22.5 deg C.
For bq76930 maybe reading TS1 and TS2 would be also nice.

int bq7693_read_temperature() {
	//Returns 'C * 10 eg 217 = 21.7'C
	
	volatile uint8_t scratch[3];
 	volatile int adcVal = 0;

	volatile unsigned long  rts;
	volatile int vtsx;
	volatile float tmp;
	bq7693_read_register(TS2_HI_BYTE, 3, scratch);

	adcVal =  ((scratch[0]&0x3F)<<8);
	adcVal |= scratch[2]; //ignore the unwanted CRC byte.
		
	// calculate R_thermistor according to bq769x0 datasheet
	vtsx = adcVal * 0.382; // mV
	rts = 10000.0 * vtsx / (3300.0 - vtsx); // Ohm
	 
	// Temperature calculation using Beta equation
	// - According to bq769x0 datasheet, only 10k thermistors should be used
	// - 25°C reference temperature for Beta equation assumed
    tmp = 1.0/(1.0/(273.15+25) + 1.0/3435 *log(rts/10000.0)); // K
	volatile int result = (tmp - 273.15)* 10;
	return result;
}

@davidmpye
Copy link
Owner

Hi!

Great work you've done so far - that is fantastic work!

I haven't tried the exact battery you've got in the picture, so I am not surprised things don't quite work right.

On the V10: I did try reading TS1 but only ever got garbage, so I gave up - only TS2 seems tor return a sensible value on the 76930.... I don't know why, as there are two thermistors. I did wonder if one was wired up to an ADC pin on the SAMD20 instead of to TS1?

What BMS IC is your pack using? Is it the same? I can make out BQ76????

The serial protocol is a real pain - I managed to get it working on the Dyson V10s by using a Chinese clone battery and just copying it's very simple serial protocol. It is more complex on newer ones because it has to convey amount of charge so the cleaner can change power modes. I have hit a bit of a wall here on the newer ones for that reason.

I can currently think of several solutions to get around the serial protocol problem:

  1. Try to dump the original dyson firmware from the packs and reverse engineer the serial protocol that way. It's hard work, and it is technically quite challenging because of the protection on the SAMD20. You'd have to try to glitch-attack the chip-erase - I am not sure if the SAMD20 is vulnerable to this or not.

  2. Find someone who is interested enough to see if they can spot patterns and work out how to provide the code values the cleaner expects.

  3. Write new firmware for the dyson itself and flash it, so it doesn't use silly serial-code any more

  4. Get a cheap chinese clone battery and see if you can copy its' protocol functions.

@Suenbrad
Copy link

Hello, I currently have a V11 vacuum cleaner around me and its battery cannot start normally. I would like to ask if you can share the new firmware you compiled so that I can try to save my v11 battery. Thank you.

@davidmpye
Copy link
Owner

davidmpye commented Mar 31, 2024 via email

@Gucioo
Copy link
Author

Gucioo commented Apr 8, 2024

Hi!

Great work you've done so far - that is fantastic work!

I haven't tried the exact battery you've got in the picture, so I am not surprised things don't quite work right.

On the V10: I did try reading TS1 but only ever got garbage, so I gave up - only TS2 seems tor return a sensible value on the 76930.... I don't know why, as there are two thermistors. I did wonder if one was wired up to an ADC pin on the SAMD20 instead of to TS1?

What BMS IC is your pack using? Is it the same? I can make out BQ76????

The serial protocol is a real pain - I managed to get it working on the Dyson V10s by using a Chinese clone battery and just copying it's very simple serial protocol. It is more complex on newer ones because it has to convey amount of charge so the cleaner can change power modes. I have hit a bit of a wall here on the newer ones for that reason.

I can currently think of several solutions to get around the serial protocol problem:

  1. Try to dump the original dyson firmware from the packs and reverse engineer the serial protocol that way. It's hard work, and it is technically quite challenging because of the protection on the SAMD20. You'd have to try to glitch-attack the chip-erase - I am not sure if the SAMD20 is vulnerable to this or not.
  2. Find someone who is interested enough to see if they can spot patterns and work out how to provide the code values the cleaner expects.
  3. Write new firmware for the dyson itself and flash it, so it doesn't use silly serial-code any more
  4. Get a cheap chinese clone battery and see if you can copy its' protocol functions.

It is also BQ76930, but didn't manage yet to get proper readings from TS1 or TS2.

To decode protocol:
Option 1 - more likely to hard for myself
Option 2 + most probable, I could duplicate protocol, but I have to figure out voltage levels and connections there
Option 3 - Dyson is still in use, I've got new battery (This could help to copy protocol actually)
Option 4 - Couldn't find clone for this one

Anyway, now I don't have to much time to follow up this topic.
You did great job and huge thanks to you. Some day, I may re-work this.

@WolfDawid
Copy link

Hello , first big respect to You Gays for this project!

I have on table battery from V11 (SV17)

Anyone , know now more? or still not possiblle?

I have also a Chinsese PCB for this battery, maybe we can download firmware from and make something?

@davidmpye
Copy link
Owner

davidmpye commented May 29, 2024 via email

@WolfDawid
Copy link

WolfDawid commented May 29, 2024 via email

@davidmpye
Copy link
Owner

davidmpye commented May 29, 2024 via email

@WolfDawid
Copy link

WolfDawid commented May 29, 2024 via email

@WolfDawid
Copy link

WolfDawid commented May 30, 2024 via email

@Suenbrad
Copy link

Hello
This V11 battery pack management chip is BQ76930. If I refer to the method of the film to deal with it, the feasibility does not know whether it is correct

https://www.youtube.com/watch?v=IlsNhG2N6Rs

@davidmpye
Copy link
Owner

davidmpye commented May 30, 2024 via email

@WolfDawid
Copy link

WolfDawid commented May 31, 2024

Hi

So we have:

COM- ---- vacum cleaner
K- --- vacum cleaner
K+ ---- switch
COMK ---- switch

I try to find something idea to read this line.

Zdjęcie WhatsApp 2024-05-31 o 09 25 04_cc22b240

Regards

@WolfDawid
Copy link

WolfDawid commented May 31, 2024

Hi David

Thank You very much fur help witch unlock this Pack.
And
Big thanks for Gucioo that He start this solution for Dyson v11 batery packs

My sv17 battery from v11.
Now it give current and I can charge it, no error. works.

last what to do is, try to understand this comunication protocol between cleaner and pack as David said.

I try to work with this Chinese PCB .

But I have still other Idea.

David what would you say , wenn we take a original battery(sv17 sv22) that is not blocked yet and try to read the original communication protocol between the battery and the vacuum cleaner?

IMG_20240531_131157
IMG_20240531_132753

@davidmpye
Copy link
Owner

davidmpye commented May 31, 2024 via email

@WolfDawid
Copy link

WolfDawid commented May 31, 2024 via email

@davidmpye
Copy link
Owner

davidmpye commented May 31, 2024 via email

@WolfDawid
Copy link

Hi

David

Thank's for that We follow this project

What You think about this:

https://www.dreamsourcelab.com/shop/logic-analyzer/dslogic-plus/

Regards

@WolfDawid
Copy link

Hi

I have found in network one more Chinese board SV15 looks little other as my, see a little other MCU ,but for all V11

61jP57s1BnL AC_SX522

@rulof86
Copy link

rulof86 commented Jun 19, 2024

Hello, cool job. Is there a continuation in the revision for V11? I'll try to find a Chinese equivalent and read the firmware. But I do not know what to do next.

@davidmpye
Copy link
Owner

davidmpye commented Jun 19, 2024 via email

@rulof86
Copy link

rulof86 commented Jun 20, 2024

I take it I need a logic analyzer? I've never used it. Please tell me which one might be suitable?

@WolfDawid
Copy link

Hi

I have writed some post above with good logic analyzer

Regars

@aasmundleirhaug
Copy link

@WolfDawid what version of the FW did u use to Get it to work with the SV17. Just the regular Repo or did u have to change some configs? And remove some cables or something? Thanks in advance

@davidmpye
Copy link
Owner

davidmpye commented Nov 5, 2024 via email

@aasmundleirhaug
Copy link

Ahh okay, got it.

Thanks for the reply David!

@Smtblackstone
Copy link

Screenshot_20241116-210429_Video Player

Frekans ölçümü sırasında farklı hızlarda frekans değerleri ortaya çıkıyor ve diğer değerler tam anlamlarını bilmiyorum bu değerler işe yarayabilir mi sizce veya bu değerleri yorumlayabilen varmı

@Smtblackstone
Copy link

Çin kopya bms ile aldığım değerler kart tüm fonksiyonları ile çalışıyor adamlar herseyi ile kopyalamislar

@davidmpye
Copy link
Owner

davidmpye commented Nov 18, 2024 via email

@davidmpye
Copy link
Owner

davidmpye commented Nov 18, 2024 via email

@Smtblackstone
Copy link

Screenshot_20241118-190543_Chrome

Peki bu cihaz ölçüm için yeterli olurmu diğer cihazlar benim için şuan çok pahalı geçici olarak bunu almayı dusunuyorum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants