Linux Fu: Stupid Systemd Tricks

Last time, I gave a whirlwind introduction to a very small slice of systemd. If you aren’t comfortable with systemd services, timers, and mounts, you might want to read that now. Otherwise, press on to see a few interesting uses for custom systemd units, including running a few things on a schedule and automatically mounting a Raspberry Pi Zero.

Can you do every one of these things in a different way? Of course you can. I’m not debating the relative merits of using or not using systemd. However, unless you totally control your own environment, good chance you are going to have to interact with systemd at some point.

Stupid Trick #1: Update Your IP Address

A few years ago, I talked about updating your remote DNS server with your public IP address. This lets you refer to a hostname like snoopy.hackaday.com and get back to your computer that often changes IP addresses. Sure, you can get services to do that for you, but you must either pay or agree to read ads on their site to keep your hostname going. This is all under your control. In the original post, I suggested using cron or NetworkManager to run the update script. I also hinted you could do it with systemd, but I didn’t tell you how. Let’s fix that.

Continue reading “Linux Fu: Stupid Systemd Tricks”

Mechanisms of pulse current charging for stabilizing the cycling performance of commercial NMC/graphite LIBs. (Credit: Jia Guo et al., 2024)

Why Pulse Current Charging Lithium-Ion Batteries Extends Their Useful Lifespan

For as much capacity lithium-ion batteries have, their useful lifespan is generally measured in the hundreds of cycles. This degradation is caused by the electrodes themselves degrading, including the graphite anode in certain battery configurations fracturing. For a few years it’s been known that pulsed current (PC) charging can prevent much of this damage compared to constant current (CC) charging. The mechanism behind this was the subject of a recent research article by [Jia Guo] and colleagues as published in Advanced Energy Materials.

Raman spectra of a) as-cycled and b) surface-removed graphite anodes aged under CC and Pulse-2000 charging. FE-SEM images of the cross-sections of graphite electrodes aged with CC (c,d) and Pulse-2000 (e,f) charging. d,f) are edge-magnified images of (c,e). g) shows the micrograph and O and C element mapping of the surface of CC-aged graphite electrode. TEM images of h) fresh, i) CC, and j) Pulse-2000 aged graphite anodes. (Credit: Jia Guo et al., 2024)
Raman spectra of a) as-cycled and b) surface-removed graphite anodes aged under CC and Pulse-2000 charging. FE-SEM images of the cross-sections of graphite electrodes aged with CC (c,d) and Pulse-2000 (e,f) charging. d,f) are edge-magnified images of (c,e). g) shows the micrograph and O and C element mapping of the surface of CC-aged graphite electrode. TEM images of h) fresh, i) CC, and j) Pulse-2000 aged graphite anodes. (Credit: Jia Guo et al., 2024)

The authors examined the damage to the electrodes after multiple CC and PC cycles using Raman and X-ray absorption spectroscopy along with lifecycle measurements for CC and PC charging at 100 Hz (Pulse-100) and 2 kHz (Pulse-2000). Matching the results from the lifecycle measurements, the electrodes in the Pulse-2000 sample were in a much better state, indicating that the mechanical stress from pulse current charging is far less than that from constant current charging. A higher frequency with the PC shows increased improvements, though as noted by the authors, it’s not known yet at which frequencies diminishing returns will be observed.

The use of PC vs CC is not a new thing, with the state-of-the-art in electric vehicle battery charging technology being covered in a 2020 review article by [Xinrong Huang] and colleagues as published in Energies. A big question with the many different EV PC charging modes is what the optimum charging method is to maximize the useful lifespan of the battery pack. This also applies to lithium-metal batteries, with a 2017 research article by [Zi Li] and colleagues in Science Advances providing a molecular basis for how PC charging suppresses the formation of dendrites .

What this demonstrates quite well is that the battery chemistry itself is an important part, but the way that the cells are charged and discharged can be just as influential, with the 2 kHz PC charging in the research by [Jia Guo] and colleagues demonstrating a doubling of its cycle life over CC charging. Considering the amount of Li-ion batteries being installed in everything from smartphones and toys to cars, having these last double as long would be very beneficial.

Thanks to [Thomas Yoon] for the tip.

Retrotechtacular: The Other Kind Of Fallout Show

Thanks to the newly released Amazon Prime series, not to mention nearly 30 years as a wildly successful gaming franchise, Fallout is very much in the zeitgeist these days. But before all that, small-F fallout was on the minds of people living in countries on both sides of the Iron Curtain who would have to deal with the aftermath of a nuclear exchange.

Uwaga! Pył promieniotwórczy  (“Beware! Radioactive Dust”) is a 1965 Polish civil defense film from film studio Wytwórnia Filmów Oświatowych. While the Cold War turning hot was not likely to leave any corner of the planet unscathed, Poland was certainly destined to bear the early brunt of a nuclear exchange between the superpowers, and it was clear that the powers that be wanted to equip any surviving Polish people with the tools needed to deal with their sudden change in circumstances.

The film, narrated in Polish but with subtitles in English, seems mainly aimed at rural populations and is mercifully free of the details of both fallout formation and the potential effects of contact with radioactive dust, save for a couple of shots of what looks like a pretty mild case of cutaneous radiation syndrome.

Defense against fallout seems focused on not inhaling radioactive dust with either respirators or expedient facemasks, and keeping particles outside the house by wearing raincoats and boots, which can be easily cleaned with water. The fact that nowhere in the film is it mentioned that getting fallout on your clothes or in your lungs could be largely avoided by not going outside is telling; farmers really can’t keep things running from the basement.

A lot of time in this brief film is dedicated to preventing food and water from becoming contaminated, and cleaning it off if it does happen to get exposed. We thought the little tin enclosures over the wells were quite clever, as were the ways to transfer water from the well to the house without picking up any contamination. The pros and cons of different foods are covered too — basically, canned foods dobry, boxed foods zły. So, thumbs up for Cram, but you might want to skip the YumYum deviled eggs.

Dealing with the potential for a nuclear apocalypse is necessarily an unpleasant subject, and it’s easy to dismiss the advice of the filmmakers as quaint and outdated, or just an attempt to give the Polish people a sense of false hope. And that may well be, but then again, giving people solid, practical steps they can take will at least give them some agency, and that’s rarely a bad thing.

Continue reading “Retrotechtacular: The Other Kind Of Fallout Show”