Battery Charger

Posted on
  • Hi,

    I just posted up a new tutorial - it's a really simple AA or AAA battery charger that you just leave on: http://www.espruino.com/Battery+Charger

    I've been using it for a while now, and it's been really handy always knowing you have fully charged batteries :)


    1 Attachment

    • final.jpg
  • Love it!

  • I wonder if this will work to charge 18650 batteries? The batteries that I use for my vape can be found here: http://www.amazon.com/Sony-US18650VTC4-2100mAh-Rechargeable-Batteries/dp/B00J470LTA

    My goal is to implement battery marrying, Bluetooth/WiFi status for updates.

    Right now I'm using an efest charger to charge my batteries which takes care of draining and charging. The charger also has the capability to charge either at 0.5amps or 1.0amps. I charge at 1.0amps for a faster charge. The batteries are rated at 3.7v but the charger shows 4.2v while charging. So im not sure if the charger is actuall charging using 4.2v. Is charging at 4.2v a trigger to tell the chip in the batteries to turn on charging mode? I don't completely know all the specs used to charge the batteries or the technology/science used in battery charging.

  • I doubt that there is any electronics inside those cells. I also think that if you charge above 4.1V you have a fire.

  • @tage I was wrong about the 4.7v the efest charger says 4.2v not 4.7v.

    I'll edit my original post..

  • @tage that's Li-Ion batteries. They are very demanding on what voltage is applied to them, and may take fire when overvoltage is applied.
    Nominal voltage is 3,7V but during charging the voltage increase up to 4,2V (which is a limit that shall never be exceeded).
    This charger can't be used as is, as batteries are charged by the 3.3V of Espruino's I/O. And with the available current on an I/O it will take loooong to charge a 2100mAh battery.

  • As @fdufnews says, the charger above can only produce max 3.3v, so it wouldn't be able to charge LiPi or Li-ion batteries as-is.

    You could actually use the Pico's onboard FET to charge one battery, or could wire up external FETs/transistors to charge multiple. You'd also have to add a potential divider to check the voltage, since it would be too high for Espruino's 3.3v ADC.

    Having said that, lithium batteries can burst into flames when overcharged, so you'd want to be very sure you knew what you were doing with the software to charge them. The charger above is nice and safe with NiMH/NiCd as you could do pretty much whatever you wanted with the outputs and you could never make the batteries explode :)

    For LiPos, you could just use a charger IC like the MAX1555. It's safe, and comes on cheap pre-made charger boards (you'd need one per battery). You could still attach an Espruino that could maybe discharge the batteries if you wanted, and could also look at the 'charge in progress' output of the chip to detect how much charge had gone into the battery.

  • Most 18650 cells do have protection circuitry in them, even those el-cheapo cells from china that have 1/3rd to 1/5th of their rated capacity - not that you should ever rely on that... I once shorted an 8s3p config of Ultrashit 18650s, rated for 6000 mAh (1200-1500 in reality). Blew every fuse, and then I measured the battery voltage - ZERO. I took the cells out and was measuring around, and as I was doing so, one at a time, they turned themselves back on. Batteries have been in service since. HOWEVER I'm not sure what kind of protection the "high-draw" ones have, because they can't have much in the way of current limiting if they're going to supply 30A... (though I do suspect they have overcharge protection). I would never charge a single cell LiPo without an appropriate charging IC - on the principle that the cost of doing it right is low. When I have to do multi-cell configurations, though, I use a current limiting charger and charge them in series, since I haven't found any nice balancing charger IC's yet that I can build into my projects (open to suggestions, particularly for a 4s configuration)

    LiPo batteries are "rated" at 3.7 or 4.2v - despite having the same discharge curve. You charge them up to 4.2, but the discharge curve has a long flat plateau at 3.7v. I use the ubiquitous nitecore charger for 18650s (the cheap ones, and my friend's high draw vape batteries), when I'm not using a built-in charging setup.

    That said, the whole point of this charger, as it looks above, was to continually cycle the charge in the battery?
    That was necessary with old NiCd batteries, which had a very pronounced memory effect, but is not necessary in NiMH batteries. And LiPo batteries are best stored long term at around 60% charge, and do not have a memory effect, so this charger would be entirely the wrong thing here (not to mention it would take eons to charge any decent sized LiPo battery at 20mA....).

  • The idea is just to always have a set of charged batteries - whenever I go to use NiMH they seem to be almost flat, and the 2 main things I use them for now (head torch and mice) take only 1 or 3 batteries, whereas the chargers I have all charge in pairs.

    The cycling does still seem to help with NiMH that haven't been used for a while (I see the amount of charge they hold rising after each cycle), so I think it does help - it's just not as drastic as on NiCd.

    With LiPo, I think you still have to be careful. I've definitely got a few 18650 without protection, because I guess they still use them like that in Laptops/etc? I did wire a JST connector on to one and then plug it into something with a short on it accidentally, and the wires just vapourised in my fingers. There's a ridiculous amount of power in them.

    A bit off-topic, but does anyone make a small, multi-cell LiPo charger PCB? I've got a load of power tools with dead batteries that I'd like to LiPo-ify, but the only chargers I can find that I could stick inside the battery pack are single-cell.

  • I did not know that you can actually buy 18650 cells that has built in electronics for protection. The technological development must have sneaked up on me again. 8-)
    When I was working with battery electronics ten years ago, the 18650 was a popular choice for battery packs because production machinery was available for this type of cell, it was cheap so it was used in huge quantities even in large batteries. Every cell had (has) a small PTC disc inside, at the positive terminal. When there is overcurrent this PTC resistor heats up and becomes resistive, and this limits the current. For high power cells that allow more han 5A current, the PTC disc had to be replaced by a metal disc, to avoid tripping the overcurrent protection of the PTC disc. The next line of defense was the connections to the cell, they would fuse open. If overpressure built up, the positive cap usually would rip open and that disconnected the cell but unfortunately the spark then ignited the fumes. One weakness of the PTC disc was that it only has 20V rating so when 18650 cells is used in battery packs you have to be aware that when one PTC trips, the entire pack voltage appears across that PTC disc. this can cause arcing inside the cell and is a hazard, so all bettery packs need electronics with overcurrent protection etc. and many other safety functions such as cell balancing and disconnect MOSFET to protect against deep discharge and cell overvoltage.

  • The moment consumers started handling 18650's, they needed protection ;-)

    You can buy these itty-bity protection boards on aliexpress that I think are what they stuff into the cells.

    I'm also looking for a multicell charger IC - let me know if you find any - I have several ongoing projects whose charging setup I'd be much happier with if I could find.

  • Can anyone recommend a 18650 battery managment chip that can communicate via serial or i2c? I would like to communicate the charging status and etc to the espruino.

  • @tage, thanks! that's really interesting - I had no idea about the PTC disc!

    @DrAzzy I actually really wanted to make a board to do it, but I don't really have the time at the moment. I figured for 3/4 cells you could just use Opto-isolators for cell balancing.

    @d0773d The MAX1555 has a charge status output - literally just on/off, but I think it charges at 100mA (or 500, depending on the setup) so you could get a rough idea of capacity by measuring the charge time.

  • I found a good web page that explains the 18650 protection.

    http://batterybro.com/blogs/18650-wholesale-battery-reviews/18306003-battery-safety-101-anatomy-ptc-vs-pcb-vs-cid

    It is good to know that even with built in circuit board, the voltage limitation remains. the MOSFET used to disconnect the cell is a low voltage one, about 20V rating. so it is better to use an external circuit board that monitors all cells and contains one MOSFET disconnect switch instead of one per cell. (actually the MOSFET is a double MOSFET that makes it able to block current in both directions. a MOSFET always has a body diode that conducts current from source to drain even if gate-source voltage is zero).
    the 18650 cells are still in heavy use, for example the Tesla battery uses them. when working with your own battery pack designs, make sure you use cells that have a metal tab spotwelded to the terminals, never try to solder wires directly to the cells!
    I worked with very large batteries, some configurations up to 700Vdc and many hundreds Amperes, all using 18650 cells. the type of cell was LiFePO4 which is a lot safer but has only 3.2V nominal voltage instead of 3.7V. as the Dreamliner designers found out, this cell type is a lot safer. (I heard that after some terrible battery fires, their Li-Ion battery had to be enclosed in a fireproof container that vented the smoke and fire to the outside of the plane. this would not have been necessary if the cells were LiFePO4 type. they may burst and the fumes can catch fire, but the destruction usually is contained to one cell, not the entire battery pack).

  • I would like to charge 3 18650 batteries and the batteries need be married (or is it called balancing?) I'm using 3 single 18650s cells for my vape.

    Building a battery charger with built in WiFi or Bluetooth would be a neat project to keep me busy and learn :-) I could always purchase a charger, I already have one, but it doesn't have WiFi or bluetooth.

    Thanks for posting the link. It had tuns of good info :-)

  • Are the 3 cells wired up in a pack, so in series? That makes life harder.

    If they're separate (or can be separate) then I'd just use 3 MAX1555 chips.

    In fact if you're not trying to get the charger to be small and you do have cells in series I'd consider just buying 2 isolated DC-DC converter modules and powering the MAX1555 chips through those. Nice and easy, and safe :)

    But yeah, a nice little multi-cell LiPo charger board would be great. I wonder how many people would be interested. My wish list was:

    • Charges 3 cells, maybe 4.
    • Small enough to fit inside the battery pack
    • Charge via Micro-USB
    • A button and RGB charge status LED
    • Potentially a FET-switched output that could be turned on and off via the button - so if you wanted to make (for example) a torch, you could easily get a 'soft' on/off button.

    The implications of it going wrong do worry me, although if all the LiPos have some kind of protection in them now then I guess it's not as bad.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Battery Charger

Posted by Avatar for Gordon @Gordon

Actions