I've wanted to build this myself for a long time but couldn't figure out how to overcome the spicy pillow problem.

Maybe I'm barking up the wrong tree, but I thought it was risky to leave a phone plugged in all the time. Does it need to be a modern version of Android OS that has the smart charging that stops at like 85%?

The safest option is probably to remove the battery and run the phone from a (well defined/build) external power source, e.g. like this: https://yaky.dev/2022-09-06-smartphone-without-battery/

Yes that's what I do too! I didn't know that blogpost but I generally replace the battery with a DC-DC converter module from Ali. You can even tune the voltage and see the indicator change the battery charge level. I put them around 4 volt. The advantage of these modules is also that you don't need a beefy 5V power supply, you can simply grab a 12V or so (I have a full drawer of those from shucking external hard drives) and it will regulate it down nicely. They are 80 cents a piece (10 for 8 euro): https://es.aliexpress.com/item/1005007508685885.html and they can deliver up to 3A or so which is enough to handle the peaks. They're a bit bulky but I just tend to mount them elsewhere. Make sure you use a fairly thick cable to the phone then to minimise losses at that low voltage.

I didn't have to bother with the thermistor but some models need it yes. And some even have an i2c charge level module which is even harder to simulate though it can be done.

By the way the diode option is a decent one too, I went for this option because I had many 12V PSUs around, and due to the efficiency of the converter I can use ones with pretty low amperage. But if you have a decent 5V supply using a simple diode drop is not a bad option.

What is bad is using a resistor as the voltage drop will depend on the current being drawn by the device, but the article is not doing that (nor woudl I).

Not all phones work without a battery in the case.

The link provided by cydodon is about emulating a battery.

>I thought it was risky to leave a phone plugged in all the time

I have had phones on a charging dock for long periods. No issues.

Unless you have some budget small brand phone that was too cheap to be true, most phones are fine plugged in.

It's a statistical thing. Most phones don't explode their batteries. When you have a hundred or a thousand together, the chance that at least one has a battery explosion starts to reach concerning levels and you ask what you can do to avoid it.

It's not really. I've had a test bench with smartphones at work with open smartphone test farm and about 50% of them cracked their cases open after a year or two. It is not a joke. It really happens. None of them actually got to the point of exploding but it didn't exactly look "safe". Of course I replaced them when this happened. Sometimes it took a while because they were on a stand, we only controlled them remotely so it would take me cleaning the stand or something to notice something was off.

Still, it served our support team really well during the pandemic. They could test wifi setups at the office with different android versions even when they were in a country that was on lockdown themselves.

OpenSTF was great: https://github.com/openstf

I think it's now been replaced by DeviceFarmer: https://github.com/DeviceFarmer/stf

I left my ~$1k OnePlus phone on the wireless charger for after ATT told me I couldn't use it and forced their spyware Samsung phone on me, The battery puffed up after about a year.

I carefully charged a Motorola G Power 2020 to a 60% SoC (which should be very safe) and left it in the car, unplugged, as a spare. It puffed up in about 6 months.

An ignored Galaxy S7 puffed up while sitting on a shelf, unplugged, in a climate-controlled room.

Some other devices have been fine for far longer periods so it's not like I'm thinking it's endemic or anything (my Sony PSP is still working well-enough with its still-flat lipo cell from 2008), but it's certainly a concern.