Limiting Battery Risk On Repurposed Smartphones With PostmarketOS

PostmarketOS is a Linux distribution specifically designed for those who wish to repurpose old smartphones as general-use computers, to a degree. This can be a great way to reuse old hardware. However, for [Bry50], it was somewhat discomforting leaving the phone’s aging lithium battery perpetually on charge. A bit of code was thus whipped up to provide a greater measure of safety.

The concept is simple enough—lithium batteries are at lower risk of surprise combustion events if they’re held at a lower state of charge. To this end, [Bry50] modified the device tree in PostmarketOS to change the maximum charge level. Apparently, maximum charge was set at a lofty 4.4V (100%), but this was reconfigured to a lower level of 3.8V, corresponding to a roughly 40-50% state of charge. The idea is that this is a much healthier way to maintain a battery hooked up to power for long periods of time. There’s one small hitch—the system will get confused if the battery voltage is higher than the 3.8 V setpoint when switching over. It’s thus important to let the device discharge to a lower level if you choose to make this change.

It’s a neat mod that both increases safety, but keeps the battery on hand to let the system ride through minor power outages. If you’re new to the world of repurposing old smartphones, fear not. [Bryan] also has a tutorial on getting started with PostmarketOS for the unfamiliar. If you’re working on your own projects in this space, we’d love to hear about them—so get on over to the tipsline!

23 thoughts on “Limiting Battery Risk On Repurposed Smartphones With PostmarketOS

  1. Can PostmarketOS run an old phone/tablet with the battery removed? Or must this be supported by the hardware, or is a problem because of potential higher power delivery from a battery?

    1. Usually the challenge is getting it past the bootloader, which does whatever it does with the battery before it will load your OS. i have a nook (eink tablet) where i used a circuit i found online (two resistors) to let a wall wart fudge the “is there a battery test” and it boots up fine but after a few days the OS sporadically decides to reject my hack and turns itself off. I imagine postmarketos wouldn’t have that particular problem, for example.

      1. When I worked for a Swedish cellphone company, we used a battery shell (back when batteries were designed to be swapped) with an electrolytic capacitor and wires to a lab supply for bench testing. The Swedes called it a “Norwegian Battery”, since it was normally useless to have a battery that had to be plugged in and Norway was the target of jokes that were often variants of the US Polish jokes of the ’70s.
        The capacitor was essential to handle surges. There was often a thermistor or fixed resistor between ground and a third pin that was necessary to see it as a valid battery.

        1. Yeah, this whole thread is annoying me, as I have two projects involving tablets where I planned to yeet the battery.
          I’m not leaving a lithium charging 24/7 in a hacked up tablet I put together for a project.

          I’m assuming there must be something that detects the battery voltage isn’t dropping and it makes Android (or whatever) shit the bed, but I have put 3.7V direct on battery contacts before and had it work (a long time ago though).

          If we go back to the old Nokias, all you had was the battery contacts and a thermistor you could fudge with a 10K resistor. Are modern phones/tablets doing so much more that we can’t fudge it?

    2. Some phone hardware physically won’t stay on if the battery isn’t there, for whatever reason. Might have something to do with the battery smoothing power from the power input circuitry.

          1. 1F is quite large, and you have to mind the inrush current when using capacitors.

            You don’t want the capacitor to be at zero volts when you plug in the charger, because it’s effectively a dead short. This may damage the charging circuit, or make the BMS think it’s a broken battery.

  2. I’ve been meaning to test using a phone as a computer monitor that looks to my eyes to be about as large as an actual monitor by positioning it on a holder 30cm/12” from my face. At that distance it should appear to be the same size as a small laptop screen. Then Bluetooth keyboard and mouse to control. Has anyone tried this?

    1. Look at FPV box googles, it’s the same idea, but they are putting also a fresnel lens in between the screen and your eyes to increase the focal distance (otherwise it will be a problem as mentionned in the post before me).
      Never tried it myself but it was also an idea that I had and that I wanted to test out one day!

    2. About a decade ago when VR hype was taking off, Google pushed “Google Cardboard” which was exactly this. The fact that you haven’t heard about it tells you everything you need to know about its viability.

  3. I thought this great project had stalled, but the dates of updates on Github say otherwise:

    OpenBot: Pitch
    Jun 1, 2023

    https://www.youtube.com/watch?v=n9Yr-guo81s

    OpenBot leverages smartphones as brains for low-cost robots. We have designed a small electric vehicle that costs about $50 and serves as a robot body. Our software stack for Android smartphones supports advanced robotics workloads such as person following and real-time autonomous navigation.

    https://github.com/ob-f/OpenBot

    1. I want this battery-saving feature built in to Android. But I still gotta do workarounds like that. It’s ridiculous that we got an “adaptive charging” feature (delays charging overnight) but not a “this device is plugged in 24/7” feature.

      My mom killed a phone battery (her alarm clock), my friend killed a tablet battery (his calendar and planner), and my own tablet useless and dead because I can’t leave it on the charger.

Leave a Reply to DanCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.