Firmware May Cause Fire - Page 1
Forum section: electronics / general

author: Cyberdragon
author_rank: Super Contributor
timestamp: March 19, 2021, 01:06:38 am
content: It seems like these guys were handling simple single cell battery charging WITH ONLY SOFTWARE, NO CHARGE CHIP!What the hell were they thinking? Still looking for more info...butThe battery is not high capacity, you don't need "rapid charge" crap or anything like that. Apparently the charging cable is also an issue...what, is that where they tried to put the protection chip?https://www.gearnews.com/too-hot-by-far-line-6-recalls-relay-g10-wireless-system/#:~:text=Line%206%20has%20issued%20a,will%20solve%20the%20overheating%20issue.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 19, 2021, 02:28:32 am
content: Yeah. I often exhort people to design carefully and not take it lightly when it comes to charging devices for Li-ion batteries. And, I'm also often amazed at how many engineers think there is no risk, and are ready to use very inadequate solutions. Li-ion batteries, despite being very common these days, are still unsafe when not treated properly. There is unfortunately no real replacement technology as of yet - at least not at the same cost and with the same capacity to volume ratio. But I for one really wish they were gone for good. Of course when charged and protected properly, they are safe to use, but there's just so much that can go wrong and the chemistry is still inherently unsafe. I wish we switched to something safer (and more environmentally-friendly if possible). Hopefully this will happen. Soon.A 100% software-based charger would be one of those inadequate solutions. Unless you're very experienced designing software for safety-critical devices and use all the right tools and processes, just don't do that. It's a recipe for disaster. And I don't expect a musical gear company to be experienced designing safety-critical stuff. Just not their area.Now from the little I got here, we don't know for sure what the problem was. It appears that a firmware update could fix the problem, so that's probably why you (and I, following you) assumed it was a software-only charger. But we don't exactly know 1/ whether the overheating came from the battery or from the charging electronics itself (although, the electronics could overheat but it would have to be very badly designed to have a risk of fire, so assuming the battery is involved is reasonable here...), and 2/ whether they used a dedicated charging IC or not. Supposing they actually used a dedicated charging chip, the problem may also have come from the charging current, that could possibly be programmable and set by the firmware. Of course, if that is the case, allowing a max charging current - on a hardware level - if it's software-programmable, too high to be safe, would be a very bad design decision as well.

author: james_s
author_rank: Super Contributor
timestamp: March 19, 2021, 04:49:21 am
content: Most chargers are capable of overcharging and starting a fire if there's a firmware bug, even if they have some kind of charge controller IC the cell count, current setting and cutoff voltage is software configured. There's a reason they say to always charge large LiPo packs outdoors though.

author: Cyberdragon
author_rank: Super Contributor
timestamp: March 19, 2021, 06:06:44 am
content: Quote from: james_s on March 19, 2021, 04:49:21 amSomething this small it is most likely a single cell, no balancer needed, so a dedicated protection chip is the right solution. For a low power device like that, a small 6-pin SOT like a DW01 would suffice. Again...the battery is tiny, let it charge at a fixed rate. This whole rapid charge thing is getting out of hand, for a phone all the way up to a car it makes sense, as high capacity batteries take a long time to charge so squeezing as much current as safely possible makes sense for consumers. For a tiny Bluetoothy dongle thing...just STUPID!Quote from: SiliconWizard on March 19, 2021, 02:28:32 amIt was definately the battery itself failing due to overcharge.QuoteNothing beats a good old analog monitor chip, and that's all you need when the battery is the size of a thumb or smaller.

author: Ben321
author_rank: Frequent Contributor
timestamp: April 24, 2021, 11:02:46 pm
content: Quote from: Cyberdragon on March 19, 2021, 01:06:38 amActually hardware (such as a charging chip) is simply software haredwired into a single silicon chip. You can do the same thing by using separate can program a microcontroller with the needed software and let the microcontroller operate a power transistor that determines when current is flowing to charge the battery, and shuts off the current when the battery has been charged up to the intended voltage. The problem with the charger you mention isn't that they use software instead of hardware. The problem is there was a bug in the software. Same thing could happen with a hardware charging chip, if the charging program hardwired into its silicon was a buggy program.

author: Cyberdragon
author_rank: Super Contributor
timestamp: April 25, 2021, 12:25:13 am
content: Quote from: Ben321 on April 24, 2021, 11:02:46 pmThe problem is they were doing something elses job with their own crap. Ever heard of a DW01 or such crashing? The whole reason dedicated charge controllers exist is to have an industry approved safe standard. There is no benefit to charging a battery with janky software in a basic bluetooth dongle over a known safe device.

author: Ben321
author_rank: Frequent Contributor
timestamp: April 25, 2021, 12:39:27 am
content: Quote from: Cyberdragon on April 25, 2021, 12:25:13 amThere is one benefit. That dedicated charging chip is quite expensive. If you want to beat your competitors and lower your prices more than they do, and make more sales, you need to significantly lower the price you sell it at, to attract more customers. However, if you lower the unit-price you are selling them at by too much, you may actually start LOSING money on every unit sold. Most companies have already cut the unit price of the devices they sell (especially for small cheap massproduced things like battery chargers) as much as they can without actually losing money on each unit they sell. If you want to beat the competition by selling cheaper, while still making a profit, you will NEED to cut the MANUFACTURING cost of the device. The easiest way to do that is to cut your component count (usually starting by removing the most expensive of the optional components), and move the functionality of any of the removed components into the device's firmware.It's definitely a business decision they are making here. Likely it's a very well calculated decision based on the number-crunching of their company's accountant. Not some random decision made by some low-level employee at the company. I don't know exactly how safe it is, but one thing is certain, it's probably causing the company do very very well financially.

author: SeanB
author_rank: Super Contributor
timestamp: April 25, 2021, 09:41:21 am
content: Yes, but likely they are using a common cell type, and decided that buying the version with a charge protection circuit in it was going to cost 5c more, so somebody bought the cheaper cells instead, relying on the main firmware to do charge control and voltage cutoff. Perhaps them somebody also decided that those 0.1% resistors in the charge controller were superfluous, and instead went to a 1% or 2% part, much cheaper, and just as good, if a little less accurate and more prone to drift, but hey, we saved another 2c per resistor. Then you find batteries charging to 4.3V instead of 4.2V because of tolerances, so the new firmware probably defaults max voltage on the cells to be 4.0V, so that even the worst case drift will not put them over, though the components on the other side of the curve now only charge the cell to around 60% of capacity on those units.All this to save 5c, which is the DW01 and associated PCB assembled as part of the lithium pouch cell assembly, which probably also is including the lead to plug it to the board as well.

author: tszaboo
author_rank: Super Contributor
timestamp: April 25, 2021, 10:00:04 am
content: Quote from: Ben321 on April 25, 2021, 12:39:27 amVery expensive, at around 3,6 centshttps://lcsc.com/product-detail/PMIC-Battery-Management_UMW-Youtai-Semiconductor-Co-Ltd-TP4057_C725791.htmlProbably there are cheaper ones, but this is the one I could find after 20 seconds of google.You can argue all you want, but having a software controlled safety device is a no-go in my books. I trust politicians more than programmers at this point.