Blue-Smoke-Electronics / Ember

16 stars 5 forks source link

battery setting: max charge, min charge, shutoff #157

Open jerabaul29 opened 1 year ago

jerabaul29 commented 1 year ago

There is nothing more frustrating than battery powered devices that work just fine but contain a "nearly dead" battery, which means that i) the device does not work well any longer as there is no more battery life, ii) this creates a fire risk.

A solution for this, in particular with modern rechargeable Li batteries, is to avoid applying full charge or depletion of the battery. (for example, on laptops, see https://linrunner.de/tlp/faq/battery.html ; by using this kind of techniques, I have 10 years old laptops that still have a perfectly working battery).

Would it be possible to provide similar setups in this case? I.e. make it possible to:

This would be very helpful for users like me who will likely nearly always use it with a USB supply plugged in, and for whom the battery is only used as a buffer for power spikes.

simenhs commented 1 year ago

I agree, it is really frustrating when the battery of a device degrades and the device become unusable. And sadly, batteries has a large but limited number of charging cycles.

You are right, this this would be a great feature to have.

As of now, the charging is done dedicated charging IC (MCP73832T-2ACI/OT) which is charging the battery to 4.2V, that is usually a good tradeoff between battery lifetime and maximum charge. There is no software control of the charging process As for the lower limit, it is implemented in software ( battery.cpp line 58-65).

I have also tried to make the battery as easy as possible to replace. I am using a battery that is quite common in small RC drones (1 cell 803465 lipo).

Thank you very much for your feedback. I will have this in mind going forward.

jerabaul29 commented 1 year ago

Thanks :) . Great to hear confirmation that there is a dedicated IC for managing the battery (I had seen it too in the schematics :) ). What could always be done is add a MOSFET to switch on / off the power supply to the dedicated charging IC and hence the battery, and a MOSFET to switch on / off the power extraction from the IC to the instrument maybe? Not sure if it would be best to have the MOSFET(s) between the battery and the IC (that may prevent the IC from really doing its work well), or between the IC and the rest of the instrument (this way if you trust that the IC assembled correctly prevents any dangerous charge and discharge of the battery, you do not middle in its protection of the battery, but still can decide to charge / discharge or not the battery).

jerabaul29 commented 1 year ago

Btw, these LiPo batteries are as far as I know some of the "worst" when it regards safety / stability, have you considered / could it be relevant for the future to consider some LiIon or LiFePo4 batteries that are respectively quite a bit and much safer? :) . These are available in AA format too, so they are super easy to swap from a standard AA battery holder (note: they have slightly different voltage than LiPo) (I am a big fan of NKON, very good experience with them, so putting links from their website, of course there are many more providers :) ):

jerabaul29 commented 1 year ago

(and some of these batteries are equipped with protection electronics of their own).

simenhs commented 1 year ago

Thank you very much for those links. I have been looking for a small battery that can deliver 10A+. It is also awesome that they seem to be coming in a package that should fit in a standard holder. Would be easier to replace and assemble.

I could put a transistor between the battery and the IC. This is not ideal, because when the battery is being discharged there will be a Rdson voltage drop across the transistor. If i put a transistor before the charger, it will also cut off the power from the usb to the device when cutting off charging. The device should run directly from the 5V when the battery is not needed to avoid unnecessary charge/discharge cycles.

jerabaul29 commented 1 year ago

My 2 cents (but I may be wrong) is that it will be challenging to find a small (ie low capacity C) battery that can provide relatively high intensity:

jerabaul29 commented 1 year ago

PS: jeg liker navnet Blue Smoke Electronics, den var gøy 👍

simenhs commented 1 year ago

Yeah, I know. The battery I am using now has a very high C rating, 25C, and with a 2500mAh rating it should in teori be able to deliver 62.5 A safely. In practice though, the battery is closer to 1600 mAh when tested, and the voltage drop at 10A is still from 4.1V to 3.3V. When drained the battery drops slowly from 3.3V to 3.0V before it is empty and the voltage starts to plummet. I have ordered one of the batteries you linked that is rated for 10A so i can test it out. To bee honest, I expect the voltage drop to be to high, but it is worth a try. After all, the battery producer seems more serious and maybe a 10A rating actually means that the battery can be used at 10A without a too large voltage drop.

PS: Tusen takk! Setter veldig pris på tilbakemeldinger og gode ideer. Hvordan fant du prosjektet mitt?

jerabaul29 commented 1 year ago

Tindie :) . https://www.tindie.com/products/simenhs/ember-prototype/