Hello folks, is there a tool in Linux to track how much current the battery is pulling during charging? In Android there is Ampere that does this, and I’m looking for something similar. This nicely shows for example that my Android device is charging the battery with 1.5A right now.

  • ruben@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    16
    ·
    1 year ago

    The voltage, state and current draw and other cool stuff can usually be found from /sys/class/power_supply/BAT0/ you just have to make a small script to calculate what you need from that. This requres some knowledge, but it’s one way to do it.

  • heeplr@feddit.de
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago

    powertop shows discharge rate in W, Joules consumed since last charging and estimated remaining time in the “Overview” pane.

  • HMitsuha
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    i use lm-Sensors because it also shows temperature data, which is useful for what I do.

  • iriyan@lemmy.ml
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    1 year ago

    If a battery is rated at 4amph and it is 99% discharged (dead), and it takes 4hr to fully charge then it is charging at 1amp/h, at 2amph it would charge in 2hrs. Why do you actually want to know the number of Amps passing through? It may further confuse you if you read your charger is rated at 2amph and is only charging at 1.7amps

    2amps at 5V = 10W, and 4amph of 4.4V = 17…6Wh

    acpi vattery battctl can all provide some relevant info, but basically it is simple formulas of volt x amp x time = power/Wh measurements. The software may actually confuse you more as things in charging, discharginj and rates are not very linear and understood outside physics and practical electronics.

    For example, some software will tell you your battery is at 0, when in fact the battery may be 18% charged. A battery for example rated at 4.4V may actually show 4.6 when fully charged, When it begins to fall off given the load it is presented by the machine, the voltage may drop below a threshold the manufacturer considers safe, say 4.1V, and therefor the machine shuts down.

    Take the battery out and measure it and it shows 4.38V but give it a load, say a small 4-5V light bulb (a resistance) and it drops to 4.05V. Plug the charger on and measure it, it shows 5.0V Weird? No, this is how it works, car, motorcycle, e-bike, laptop or vaper. A 12V battery for a car that unplugged shows 12V, it is nearly dead. A tiny moped battery may show 12.6V, if you try to crank a V8 engiine with it will drop to 0.4V and it would stilll be pretty well charged, for the moped. A 12.3V from a boat may crank that V8 car engine like when it was new. + You have a large tank of 200lit and at the bottom through a pipe you measure 5psi, you have a little tank with 4.1psi, you connect them and there is flow, till the flow stops from the large tank to the little one and both have 4.6psi, no flow. Exchange psi for V and this is what a charger does. Take 5 lit off of the large tank, it still shows 4.59V, take the same from the little tank and it drops to 3.9V/psi. A boat 100amph battery can charge many 4.4V batteries at little loss, and the transfer works just like tanks equalizing each other through pressure in the transfer pipe.

    Practical:

    If a battery shows as fully charging at very little time and lasts very little time is either on a machine with a short or the battery is dead. Fast charging is never as good as slow low rate charging, because: Fast charging tends to heat up the battery, when the battery gets hot it gives a false reading of higher voltage telling the charger it is full, when if you let it cool, it may take more charge. Trickle charging is best, charge, pause, recharge, pause, recharge, at lower rates keeping the battery cool.

    • silvercove@lemdro.idOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      1 year ago

      I’m testing multiple different cables, so I would love to see what current they are drawing.

    • iriyan@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Battery: dead --> 2 senarios 1 Battery shows the right voltage but can’t retain much charge, the voltage drops right away with a small load. 2 Battery can still have capacity to be charged but never reaches the required voltage.

      In both cases, 2 separate reasons for battery problem, the battery is useless for what is needed.