Lithium-Ion Battery Hotswapping, Polarity, Holders

Everyone loves, and should respect, lithium-ion batteries. They pack a ton of power and can make our projects work better. I’ve gathered a number of tips and tricks about using them over the years, based on my own hacking and also lessons I’ve learned from others.

This installment includes a grab-bag of LiIon tricks that will help you supercharge your battery use, avoid some mistakes, and make your circuits even safer. Plus, I have a wonderful project that I just have to share.

Hot-swapping Cells

When your device runs out of juice, you might not always want to chain yourself to a wall charger. Wouldn’t it be cool if you could just hot-swap cells? Indeed it is, I’ve been doing it for years, it’s dead simple to support, but you can also do it wrong. Let me show you how to do it right!

Recently, a new handheld has hit the hacker markets – the Hackberry Pi. With a Blackberry keyboard and a colour screen, it’s a pretty standard entry into the trend of handheld Pi Zero-backed computers with Blackberry keyboards. It’s not open-source and the author does not plan to open-source its hardware, so I want to make it absolutely clear I don’t consider it hacker-friendly or worth promoting. It did publish schematics, though, and these helped me find a dangerous mistake that the first revision made when trying to implement LiIon battery hot-swap. Continue reading “Lithium-Ion Battery Hotswapping, Polarity, Holders”

Assessing The Energy Efficiency Of Programming Languages

Programming languages are generally defined as a more human-friendly way to program computers than using raw machine code. Within the realm of these languages there is a wide range of how close the programmer is allowed to get to the bare metal, which ultimately can affect the performance and efficiency of the application. One metric that has become more important over the years is that of energy efficiency, as datacenters keep growing along with their power demand. If picking one programming language over another saves even 1% of a datacenter’s electricity consumption, this could prove to be highly beneficial, assuming it weighs up against all other factors one would consider.

There have been some attempts over the years to put a number on the energy efficiency of specific programming languages, with a paper by Rui Pereira et al. from 2021 (preprint PDF) as published in Science of Computer Programming covering the running a couple of small benchmarks, measuring system power consumption and drawing conclusions based on this. When Hackaday covered the 2017 paper at the time, it was with the expected claim that C is the most efficient programming language, while of course scripting languages like JavaScript, Python and Lua trailed far behind.

With C being effectively high-level assembly code this is probably no surprise, but languages such as C++ and Ada should see no severe performance penalty over C due to their design, which is the part where this particular study begins to fall apart. So what is the truth and can we even capture ‘efficiency’ in a simple ranking?

Continue reading “Assessing The Energy Efficiency Of Programming Languages”

Reinforcing Plastic Polymers With Cellulose And Other Natural Fibers

While plastics are very useful on their own, they can be much stronger when reinforced and mixed with a range of fibers. Not surprisingly, this includes the thermoplastic polymers which are commonly used with FDM 3D printing, such as polylactic acid (PLA) and polyamide (PA, also known as nylon). Although the most well-known fibers used for this purpose are probably glass fiber (GF) and carbon fiber (CF), these come with a range of issues, including their high abrasiveness when printing and potential carcinogenic properties in the case of carbon fiber.

So what other reinforcing fiber options are there? As it turns out, cellulose is one of these, along with basalt. The former has received a lot of attention currently, as the addition of cellulose and similar elements to thermopolymers such as PLA can create so-called biocomposites that create plastics without the brittleness of PLA, while also being made fully out of plant-based materials.

Regardless of the chosen composite, the goal is to enhance the properties of the base polymer matrix with the reinforcement material. Is cellulose the best material here?

Continue reading “Reinforcing Plastic Polymers With Cellulose And Other Natural Fibers”

Hackaday Links Column Banner

Hackaday Links: September 8, 2024

OK, sit down, everyone — we don’t want you falling over and hurting yourself when you learn the news that actually yes, your phone has been listening to your conversations all along. Shocking, we know, but that certainly seems to be what an outfit called Cox Media Group (CMG) does with its “Active Listening” software, according to a leaked slide deck that was used to pitch potential investors. The gist is that the software uses a smartphone’s microphone to listen to conversations and pick out keywords that it feeds to its partners, namely Google, Facebook, and Amazon so that they can target you with directed advertisements. Ever have an IRL conversation about something totally random only to start seeing references to that subject pop up where they never did before? We sure have, and while “relationship mining” seemed like a more parsimonious explanation back in 2017, the state of tech makes eavesdropping far more plausible today. Then there’s the whole thing of basically being caught red-handed. The Big Three all huffed and puffed about how they were shocked, SHOCKED to learn that this was going on, with reactions ranging from outright denial of ever partnering with CMG to quietly severing their relationship with the company. So much for years of gaslighting on this.

Continue reading “Hackaday Links: September 8, 2024”

Self Driving Cars Learn From Our Eyes

[Michelle Hampson] reports in IEEE Spectrum that Chinese researchers may improve self-driving cars by mimicking how the human eye works. In some autonomous cars, two cameras use polarizing filters to help understand details about what the car sees. However, these filters can penalize the car’s vision in low light conditions.

Humans, however, have excellent vision in low-lighting conditions. The Retinex theory (based on the Land Effect discovered by [Edwin Land]) attributes this to the fact that our eyes sense both the reflectance and the illumination of light. The new approach processes polarized light from the car’s cameras in the same way.

Continue reading “Self Driving Cars Learn From Our Eyes”

I2C For Hackers: Digging Deeper

Last time, I gave you an overview of what you get from I2C, basics like addressing, interface speeds, and a breakdown of pullups. Today, let’s continue looking into I2C capabilities and requirements – level shifting, transfer types, and quirks like combined transfers or clock stretching.

Level Shifting

Continue reading “I2C For Hackers: Digging Deeper”

How Sony Mastered The Transistor

When you think of Sony, you probably think of a technology company that’s been around forever. However, as [Asianometry] points out, it really formed in the tough years after World War II. The two people behind the company’s formation were an interesting pair. One of them was a visionary engineer and one was a consummate businessman.

While it is hard to imagine today, securing a license to produce transistors was difficult in the early days. What’s worse is, even with the license, it was not feasible to use the crude devices in a radio.

Continue reading “How Sony Mastered The Transistor”