This post is an update of the second part of my Moto server series: https://lemmy.zip/post/72142441

Rumor has it that keeping an 8-year-old phone permanently plugged in with its equally ancient Li-ion battery might not be the greatest idea ever conceived.

Some even claimed that a phone needs a battery to work.

Very negative people.

Anyway, I removed it.

Pettyl did not care.

nginx: UP PHP-FPM: UP MariaDB: UP WordPress: UP cloudflared: UP sshd: UP

The battery is currently sitting next to the phone, contributing absolutely nothing to the project.

Pettyl is now running entirely from USB power, at around 37°C, while continuing to serve the website like this is completely normal.

There is, however, one tiny detail the haters may enjoy:

It can’t boot without the battery.

So the official Pettyl disaster recovery procedure is now:

  1. Insert battery
  2. Boot Pettyl
  3. Connect USB power
  4. Remove battery
  5. Pretend this is enterprise infrastructure

The battery is no longer a battery.

It is the starter motor.

I see no problems with this architecture.

Anyway, Part 3 is going great.

    • tradicije@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      6 days ago

      It sounds like a good idea until you remember that USB provides 5V and the battery contacts are designed for a Li-ion battery and its management circuitry.

      Wiring USB directly to the battery contacts would basically be like noticing your car runs on petrol and pouring it directly into the engine instead of the fuel tank. The general concept of “engine needs fuel” is technically correct. The implementation leaves something to be desired.

      The USB port and the phone’s power-management circuitry exist for a reason, and bypassing them could damage the phone or make it behave in exciting new ways.

      A properly regulated dummy battery, however, might actually work. Unfortunately, that means I now have another terrible idea to investigate.

  • 0485@lemmy.world
    link
    fedilink
    English
    arrow-up
    51
    arrow-down
    2
    ·
    8 days ago

    Since when does a phone need a battery to run? It needs power, doesn’t matter where the power comes from.

    • tradicije@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      74
      ·
      8 days ago

      well ACKSHUALLY 🤓☝️

      Unfortunately Pettyl is stupid enough to need the battery to boot, but smart enough to forget about it immediately afterwards.

      I don’t make the rules, I just host WordPress on an 8-year-old Motorola.

    • frongt@lemmy.zip
      link
      fedilink
      English
      arrow-up
      4
      ·
      8 days ago

      It’s something about how the charging circuitry is constructed. I’ve asked a handful of electrical engineers about it but they’ve never given me a good answer. My guess is that it’s easier/cheaper to design and build a circuit that only powers the phone off the battery, and only uses DC to charge the battery.

  • vext01@feddit.uk
    link
    fedilink
    English
    arrow-up
    47
    ·
    8 days ago

    Remember the days when hou could just pop the back off and take the battery out?

    • WhoIzDisIz@lemmy.today
      link
      fedilink
      English
      arrow-up
      6
      ·
      8 days ago

      Still have my LG Optimus on Android 2.x somewhere. With 512MB RAM I dunno what to do with it outside of a clock display, but I have it (and a spare battery).

    • SayCyberOnceMore@feddit.uk
      link
      fedilink
      English
      arrow-up
      6
      ·
      7 days ago

      That’s where I am today with my Fairphone.

      I honestly held on to my old Nokia, replacing batteries and cases until Fairphone came along and then I jumped from 90’s tech to modern day.

      0–>100% in 10 seconds (with a 2nd battery)

    • El_Scapacabra@lemmy.zip
      link
      fedilink
      English
      arrow-up
      4
      ·
      7 days ago

      And it would still run when you had it plugged in. I could remove the battery from my old Galaxy S2, plug it in and it would work. And if I remember correctly, the same thing went for most of the phones I had before that.

    • foggy@lemmy.world
      link
      fedilink
      English
      arrow-up
      29
      ·
      8 days ago

      I used to keep a charged spare on me. And this was back when a phones battery life was like 3-7 days.

      Stop making phones thinner God dammit. I don’t want a thinner phone. I want longer battery life and a removable battery so I can fucking double the shitty longer battery life I get.

        • nullroot@lemmy.world
          link
          fedilink
          English
          arrow-up
          5
          arrow-down
          1
          ·
          8 days ago

          That’s kinda hard when women’s pants often have no pockets, fake pockets, or pockets so small they’re functionally useless.

          • Mouselemming@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            6
            ·
            edit-2
            7 days ago

            That’s why it’s a response to “I want…”!

            An add-on to the wishlist, as it were. I’m just an old non-tech cis woman but I firmly believe generous pockets could and should be designed/engineered/built into every twirly skirt, every thigh-high (but down near the ankle bc gravity) every booty pant and even red-carpet gala gowns. At least someone finally realized workout leggings can have a pocket down on the leg if it’s so god-damned important not to interrupt the “line” elsewhere.

            And everyone should feel free to wear whatever styles they feel suit them, with neither social stigma nor pocket-neglectful construction holding them back.

            • nullroot@lemmy.world
              link
              fedilink
              English
              arrow-up
              4
              ·
              7 days ago

              Hell yeah sister! I’m 100% for this. I’m a cis guy but the clear disparity of pants pockets between gendered clothing (and clothing being gendered at all) has always irked me. Everyone should have equal access to pockets!! (Silly but serious)

      • u/lukmly013 💾 (lemmy.sdf.org)@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        2
        ·
        7 days ago

        I used to keep a charged spare on me.

        There’s at least one Chinese brand that has smartphone with hot-swappable battery: https://rugone.net/products/xever-8

        Removable battery. Swap within 2 minutes for zero interruption. After 2 minutes, the device enters a 60-second safety lock-out to protect your data.

        Unfortunately, software from these brands tends to be shit. I feel like they just outsource it to the cheapest company. Especially following this recent thing:

        As of March 4, Sophos X-Intercept telemetry listed over 500 unique compromised Android devices across nearly 50 models. The devices were mostly low-cost models produced by the following manufacturers: Allview, BLU, Dcode, DOOGEE, Gigaset, Gionee, Lava, and Ulefone. The list did not include Alldocube devices, despite Kaspersky reportedly observing Keenadu affect that manufacturer as well.

        Source - Sophos
        Report from Kaspersky

    • undefinedTruth@lemmy.zip
      link
      fedilink
      English
      arrow-up
      11
      ·
      edit-2
      7 days ago

      Didn’t EU pass a regulation regarding that? If I recall correctly all portable devices sold in the EU after February will will need to have a user replaceable battery.

  • neidu4@piefed.social
    link
    fedilink
    English
    arrow-up
    20
    ·
    edit-2
    8 days ago

    Anything made to be run from battery can work fine without one. Worst case scenario requires you to spoof some I²C communication to properly emulate a battery, but most devices and batteries are far dumber than that. DC is DC, and sometimes you just need to graft something on top for the other pins.

    Source: My old laptops charging circuit failed, so I soldered the charger onto the battery pins instead. Then I replaced the actual battery with an Adafruit Itsybitsy 32u4 (because that what I happened to have available) that emulated the battery status of “Charging, nothing to see here, move along” and sent it via I²C

    • ShortN0te@lemmy.ml
      link
      fedilink
      English
      arrow-up
      5
      ·
      7 days ago

      The charging cirtuit that also tries to guess the battery percentage can be the problem. The ‘guessed percentage’ will depending on the chip and programming go down even if you solder in a dc power supply. When it hits the 0% it will shutdown.

      Thats the case for some smart phones.

  • Gagootron@feddit.org
    link
    fedilink
    English
    arrow-up
    19
    ·
    7 days ago

    When the battery in my wall mounted android tablet swelled i had to add a 10k resistor to the sense line, inject the 5V directly into the battery port and add a few capacitors to get it to work. But at least it won’t cause a fire now.

  • dual_sport_dork 🐧🗡️@lemmy.world
    link
    fedilink
    English
    arrow-up
    17
    ·
    8 days ago

    My old Galaxy S5 would work without the battery, including bootup. So it’s not entirely unexpected that other phones could also do so. I would say I can’t imagine who would take the time out out of their day to just talk out their ass and claim something like this wouldn’t work without trying it first. Except then I remember this is the internet, and people do that all the time.

    Regardless, good on you for making this all work!

    • tradicije@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      12
      ·
      8 days ago

      Hahaha, thank you for defending me! 😄

      Just to clarify though, the “they said it couldn’t be done” part was mostly me being ironic and unnecessarily dramatic for the post lol. The comments on this whole project have actually been overwhelmingly positive and helpful.

      People here are the reason I even tried some of this stuff in the first place.

      But I genuinely appreciate you having my back. And the S5 being able to cold boot without a battery is really interesting — Pettyl unfortunately needs its battery as a starter motor. 😂

  • non_burglar@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    ·
    8 days ago

    Nice.

    There is often a check for battery that is effectively a check of resistance between sense and ground. Looks like that battery is labelled, you might be able to bodge a resistor between sense and ground on the phone and get it to boot without the battery?

    • ThePantser@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      9
      ·
      8 days ago

      Here I was thinking you should add a capacitor so there is some juice if the phone draws more than the USB can supply. Maybe even a super cap so you get a more robust drain discharge cycles.

  • tradicije@lemmy.zipOP
    link
    fedilink
    English
    arrow-up
    11
    ·
    8 days ago

    Update! Apparently removing the battery also removes half the CPU lol.

    I’ll keep you posted!

  • fox2263@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    ·
    7 days ago

    Perhaps replace its aging battery with a new one. Then you have a built in UPS for ideal disaster recovery