tinfever / FU-Dyson-BMS

(Unofficial) Firmware Upgrade for Dyson V6/V7 Vacuum Battery Management System
Other
584 stars 66 forks source link

FU-Dyson-BMS

An (Unofficial) Firmware Upgrade for Dyson V6/V7 Vacuum Battery Management System (BMS)

Github Header Image


Dyson vacuum batteries are designed to fail.

Here's why:

  1. Series battery cells in a battery pack inevitably become imbalanced. This is extremely common and why cell balancing was invented.
  2. Dyson uses a very nice ISL94208 battery management IC that includes cell balancing. It only requires 6 resistors that cost $0.00371 each, or 2.2 cents in total for six. ^1
  3. Dyson did not install these resistors. (They even designed the V6 board, PCB 61462, to support them. They just left them out.)
  4. Rather than letting an unbalanced pack naturally result in lower usable capacity, when the cells go moderately (300mV) out of balance (by design, see step 3) Dyson programmed the battery to stop working...permanently. It will give you the 32 red blinks of death and will not charge or discharge again. It could not be fixed. Until now. [^2]

FU-Dyson-BMS is a replacement firmware for the microcontroller inside Dyson V6/V7 vacuum batteries. By using this firmware, your battery pack will not become unusable if the cells become imbalanced, you will just have reduced battery capacity as usual. It will also allow you to replace the battery cells to repair your battery, rather than be forced to replace it.

Demonstration, disassembly, and programming video:

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

FU-Dyson-BMS - (Unofficial) Firmware Upgrade for Dyson V6/V7 Vacuum Battery Management System

Revolutionary features:

Why you would want this:

Compatible vacuums/batteries:

Note: the model numbers are kind of weird. There are three different ways to identify/categorize your vacuum:

  1. The advertised version number (V6, V7, etc)
  2. The actual model number printed on the battery (SV04, SV09, SV11)
  3. The part number printed on the battery PCB (61462, 279857, 188002).

Some models like SV04 contain different versions of the battery PCB. Many of these PCB versions are extremely similar and I have no idea why Dyson seems to have made at least 5 different versions. I recommend you use the PCB part number for reference if possible, or the model number printed on the battery otherwise. I still use the V6, V7 names in some places since that is what most people are familiar with, and I keep changing my mind as to which identification method is better.

Probably not compatible: (Although it’d be interesting to see PCB photos of them to be sure)

If you aren’t sure if your battery is compatible, please submit a Github issue with the highest quality photos possible of the battery PCB and provide the advertised model number (V6, V7, etc) and printed model number (SV09, SV11, etc) and I’ll try to tell you if it will work.

How to install it:

Warning: The firmware flash process is irreversible. It is not possible to restore the factory firmware.

Summary:

  1. Be careful. Li-ion batteries are no joke and must be respected. You're working on a live battery pack that can output 100+ Amps if short-circuited.
  2. Disassemble battery pack to access PCB
  3. Make sure all cells are charged above 3V and that the pack LEDs do something when you press the button (with magnet on reed switch if using V7). This confirms the 3.3V rail is regulating and the PIC is awake/working.
  4. Remove conformal coating over programming connection points (if applicable)
  5. Connect PICkit to computer and, if you using a PICkit 3 or clone, install the PICkit 3 Programmer App and Scripting Tool v3.10. (https://www.microchip.com/en-us/tools-resources/archives/mplab-ecosystem)
  6. Connect PICkit to BMS board as shown below:
    (Note: I now recommend not connecting the VDD wire at all. The ISL94208 chip seems keen to fail with an externally supply voltage. I'd still suggest waking up the battery pack as describe in step 6 to power the board up for programming. One user has suggested (https://github.com/tinfever/FU-Dyson-BMS/issues/24) even this may be unnecessary though.)
  7. Wake up battery pack by pressing button and placing magnet on reed switch (if using V7 vacuum).
  8. While maintaining tension on wires to BMS board, make sure PICkit can see the PIC16LF1847 microcontroller, then import and write the hex file from the latest GitHub release.


    For more details, see video linked at the top (https://www.youtube.com/watch?v=dwyA5rBjncg).


Disclaimer: Lithium-ion batteries can be dangerous and must be respected. Proper cell balancing may reduce this danger which is why only trained professionals who implement cell balancing according to the manufacturer recommended best practices should work on them...wait...well that doesn't include Dyson either so I guess we're on our own. According to the internet, they can spontaneously catch fire, burn your house down, drain your retirement fund, and run away with your wife. Consider yourself warned, and please don't sue me if something goes wrong because I assume no liability and provide no warranty. See section 15 and 16 of the COPYING file for more details.

Miscellaneous Thoughts on Repairing a Battery Pack

Battery Cell Connections and Measurement Points If you left your battery in storage for a long time, you may have found it no longer turns on at all and won’t charge either. This is because the battery cells have self-discharged so low that the ISL94208 won’t even turn on, which means the microcontroller won’t turn on either.

If you connect a constant current power supply directly to the terminals of the battery pack bypassing the BMS board, you can slowly recharge the cells until they are back within a normal voltage range (above 3V). I've found the PCBite probes to work well for easily connecting any cell or pack to a bench power supply. Soldering small wires to the nickel strips or jamming on alligator clips somehow would probably work too. I recommend charging at 50-100mA until all cells are over 3V. For safety, you don’t want to charge a battery that’s been depleted too far at the normal charge current (700mA).

After all cells are above 3V, the BMS should power up as usual. If you aren’t getting the 32 red blinks of death, you might not even need to install this firmware (as much as it pains me to admit it). While you have the battery disassembled, I’d recommend making sure all the battery cells are within 100mV of each other, and manual charge the lower cells to get them in that range.

Note: When charging cells that have been over-discharged, you should monitor them carefully to make sure they are taking a charge (the voltage is actually increasing), they aren't getting hot, and the cell voltages are gradually moving in to an acceptable range. Even if some of your cells are extremely out of balance, don't worry about that until you get them all above 3V. Having one cell at 1V and another at 2V might look really bad, but when they are back in range, they might look more like 3.1V and 3.2V.

If your battery isn’t turning on at all, do the following (do not leave unattended while charging):

  1. Disassemble your battery pack.
  2. Measure the voltage of all of the battery cells. You’ll probably find one or many are below 3V.
    • If your cells are all within 1V of each other and none are negatively charged: Using a bench power supply, charge the entire pack directly across the two large metal terminals that come off cell 1 and cell 6 and connect to the BMS board. This will bypass the BMS and charge the cells directly. Charge at 50-100mA constant current, with a voltage limit of 20V.
    • If your cells are more than 1V from each other: Use a bench power supply to charge the low cells individually to match the higher cells. Then charger the entire pack directly as mentioned in the previous bullet point.
    • If any cells are reverse charged, meaning they have a negative voltage where it should normally be positive, you’ll probably need to replace that battery cell. This would involve cutting the nickel strips connected to it, removing it from the battery pack, and spot welding in a new cell. This is beyond the scope of this documentation.

What do the LEDs mean?

While pulling trigger:

When you release the trigger:

When you connect the charger:

When you disconnect the charger:

When you hold down the trigger and connect the charger:

At any time:

What do the error codes mean?

Number of Red Flashes Fault Name Fault Meaning Default Limit
4 ISL_INT_OVERTEMP_FLAG ISL94208 asserted flag that it reached the internal over-temperature limit 125C
5 ISL_EXT_OVERTEMP_FLAG ISL94208 asserted flag that it measured the external thermistor to be above the over-temperature limit Temp3V/13 = 3.3V/13 = 254mV = 74C on V7 battery
6 ISL_INT_OVERTEMP_PICREAD PIC has read the internal temperature of the ISL94208 to be over the software over-temperature limit 60C
7 THERMISTOR_OVERTEMP_PICREAD PIC has read the external thermistor to be over the software over-temperature limit 60C
8 CHARGE_OC_FLAG ISL94208 asserted flag that the charging current was over the charge over-current limit 1.4A for 2.5ms (Same as stock firmware behavior. Allows for brief inrush current when wall charger is connected)
9 DISCHARGE_OC_FLAG ISL94208 asserted flag that the discharge current was over the discharge over-current limit 50A for 2.5ms (Can’t be set lower)
10 DISCHARGE_SC_FLAG ISL94208 asserted flag that the discharge current was over the discharge short-circuit current limit 175A for 190us (Next lowest setting of 100A is insufficient to start vacuum)
11 DISCHARGE_OC_SHUNT_PICREAD PIC read the discharge current shunt to be over the software discharge over-current limit 30A (Vacuum uses approx. 3A in normal mode, 17A in Max mode)
12 CHARGE_ISL_INT_OVERTEMP_PICREAD PIC has read the ISL94208 internal temp sensor to be over the software over-temperature limit, and the state was charging at time of error 50C
13 CHARGE_THERMISTOR_OVERTEMP_PICREAD PIC has read the external thermistor to be over the software over-temperature limit, and the state was charging at time of error 50C
14 UNDERTEMP_FLAG Either the thermistor or the ISL94208 temp was measured by the PIC to be below under-temp limit 7C (lowest value included in V7 thermistor LUT in code)
15 CRITICAL_I2C_ERROR There was an unrecoverable I2C communication error between the PIC and the ISL94208.
16 ISL_BROWN_OUT ISL94208 has silently reset itself. This usually occurs due to a hard short circuit that isn’t quite large enough to trip the 175A short-circuit limit.
20 Unidentified error This shouldn’t happen

Error codes will be repeated until: 1) The trigger is released/charger is removed 2) The error reason is no longer present (Example: if you have an over-temperature error, the temperature must have come back within the limits) 3) The error code has been presented at least three times.

However, the pack will go to sleep if it remains in an error state for 60 seconds, regardless of the previous criteria. It will not sleep if the error occurred while the battery was on the charger; in this case the error code will be repeated until the charger is disconnected (so you are always aware of any errors).

For more error information, you can dump the EEPROM data and use the EEPROM-parsing-tool to read the exact error codes, timestamp, and trigger/charge state at time of error. https://github.com/tinfever/FU-Dyson-BMS/tree/main/EEPROM-parsing-tool

How does the firmware work?

Known Issues:

FAQ

Q: Will this work with my vacuum XYZ?

A: If it is a Dyson V6 or V7, probably. Otherwise, probably not. The best way to tell would be to disassemble your battery and see if you have a PCB number that matches one of the tested models. If it matches, it will very likely work. If it doesn't match, submit a Github issue with a high-res photo of the board and I'll try to tell you. If it has a PIC16LF1847 microcontroller with a ISL94208 battery management front-end, there is a good chance it will work and if there is a version like that but that doesn't currently work, I'm open to adding support.

Q: The batteries aren't designed to fail. They just had to keep costs down.

A: That's not a question. However, if we accept the line of thinking that Dyson truly had to save those 2.2 cents per battery pack, there are other changes they could have made to save a lot more than that. They decided to add the reed switch to the V7 batteries. That probably added a lot more than 2.2 cents. They also added secondary over-charge protection ICs on the V7 batteries. Those probably aren't cheap. I think they also could have replaced the MOSFET they use to allow the over-charge protection ICs to pull-down one of the charge control MOSFETs with a BJT and saved a few cents there. They also could have probably found a different battery management IC without cell balancing that was cheaper. Heck, they might have been able to find a battery management IC that didn't require an additional microcontroller, and saved a whole dollar!

How you can help

Other resources

Credit

In memory of BMS boards SV11 #1, SV09 #1, SV04 #1, and SV04 #3 who gave their lives for this project. Their sacrifice will not be in vain.

Cost in 5000 qty is $0.00371 each. 100R balance resistor = ~42mA balance discharge current with 176mW power dissipation.

[^2]: This is a slight exaggeration. dvd4me on the EEVblog forums figured out which EEPROM values you can reset in order to un-brick the battery that way. https://www.eevblog.com/forum/reviews/dyson-v7-trigger-cordless-vacuum-teardown-of-battery-pack/msg4028665/#msg4028665