The Sanskrit Square Root Algorithm

Years ago, no math education was complete without understanding how to compute a square root. Today, you are probably just reaching for a calculator, or if you are writing a program, you’ll probably just guess and iterate. [MindYourDecisions] was curious how people did square roots before they had such aids. Don’t remember? Never learned? Watch the video below and learn a new skill.

The process is straightforward, but if you are a product of a traditional math education, you might find his terminology a bit confusing. He will refer to something like 18b meaning “a three-digit number where the last digit is b,” not “18 times b,” as you might expect.

Continue reading “The Sanskrit Square Root Algorithm”

A photo of [nanofix]'s bench including his FNIRSI soldering station.

Investigating Soldering Iron Phantom Voltage

Just because you are paranoid doesn’t mean people aren’t out to get you. Do you think your soldering iron is after you? Well, [nanofix] asks (and answers): Is My Soldering Iron Dangerous?

He has a look at his cheap FNIRSI soldering station and measures a “phantom voltage” of nearly 50 volts AC across the tip of his iron and earth ground. He explains that this phantom voltage is a very weak power source able to provide only negligible measures of current; indeed, he measures the short circuit current as 0.041 milliamps, or 41 microamps, which is negligible and certainly not damaging to people or components.

He pops open his soldering iron power supply (being careful to discharge the high voltage capacitor) and has a look at the switched mode power supply, with a close look at the optocoupler and Y-class capacitor, which bridge the high voltage and low voltage sides of the circuit board. The Y-class capacitor is a special type of safety capacitor designed to fail open rather than fail short. The Y-class capacitor is there to remove high-frequency noise. Indeed, it is this capacitor that is the cause of the phantom voltage on the iron tip.

Continue reading “Investigating Soldering Iron Phantom Voltage”

Testing Whether Fast Charging Kills Smartphone Batteries, And Other Myths

Calendar aging of NMC Li-ion cells at 50 ℃ at various SoCs. (Credit: Wiljan Vermeer, IEEE, 2021)
Calendar aging of NMC Li-ion cells at 50 ℃ at various SoCs. (Credit: Wiljan Vermeer, IEEE, 2021)

With batteries being such an integral part of smartphones, it’s little wonder that extending the period between charging and battery replacement has led to many theories and outright myths about what may affect the lifespan of these lithium-ion batteries. To bust some of them, [HTX Studio] over on YouTube has spent the past two years torturing both themselves and a myriad of both iOS and Android phones to tease out some real-life data.

After a few false starts with smaller experiments, they settled on an experimental setup involving 40 phones to investigate two claims: first, whether fast charging is worse than slow charging, and second, whether limiting charging to 80% of a battery’s capacity will increase its lifespan. This latter group effectively uses only 50% of the capacity, by discharging down to 30% before recharging. A single control phone was left alone without forced charge-discharge cycles.

Continue reading “Testing Whether Fast Charging Kills Smartphone Batteries, And Other Myths”

A man's hands are shown holding a microphone capsule with a 3D-printed part on top of it, with a flared metal tube protruding from the plastic.

2025 Component Abuse Challenge: Playing Audio On A Microphone

Using a speaker as a microphone is a trick old enough to have become common knowledge, but how often do you see the hack reversed? As part of a larger project to measure the acoustic power of a subwoofer, [DeepSOIC] needed to characterize the phase shift of a microphone, and to do that, he needed a test speaker. A normal speaker’s resonance was throwing off measurements, but an electret microphone worked perfectly.

For a test apparatus, [DeepSOIC] had sealed the face of the microphone under test against the membrane of a speaker, and then measured the microphone’s phase shift as the speaker played a range of frequencies. The speaker membrane he started with had several resonance spikes at higher frequencies, however, which made it impossible to take accurate measurements. To shift the resonance to higher frequencies beyond the test range, the membrane needed to be more rigid, and the driver needed to apply force evenly across the membrane, not just in the center. [DeepSOIC] realized that an electret microphone does basically this, but in reverse: it has a thin membrane which can be uniformly attracted and repelled from the electret. After taking a large capsule electret microphone, adding more vent holes behind the diaphragm, and removing the metal mesh from the front, it could play recognizable music.

Replacing the speaker with another microphone gave good test results, with much better frequency stability than the electromagnetic speaker could provide, and let the final project work out (the video below goes over the full project with English subtitles, and the calibration is from minutes 17 to 34). The smooth frequency response of electret microphones also makes them good for high-quality recording, and at least once, we’ve seen someone build his own electrets. Continue reading “2025 Component Abuse Challenge: Playing Audio On A Microphone”

The Strange Depression Switch Discovered Deep Inside The Brain

As humans, we tend to consider our emotional states as a direct response to the experiences of our lives. Traffic may make us frustrated, betrayal may make us angry, or the ever-grinding wear of modern life might make us depressed.

Dig into the science of the brain, though, and one must realize that our emotional states are really just electrical signals zinging around our neurons. And as such, they can even be influenced by direct electrical stimulation.

One group of researchers found this out when they inadvertently discovered a “switch” that induced massive depression in a patient in mere seconds. For all the complexities of the human psyche, a little electricity proved more than capable of swaying it in an instant.

Continue reading “The Strange Depression Switch Discovered Deep Inside The Brain”

DIY RP2040 Dev Board

RP2040 From Scratch: Roll Your Own Dev Board Magic

Have you ever looked at a small development board like an Arduino or an ESP8266 board and thought you’d like one with just a few different features? Well, [Kai] has put out a fantastic guide on how to make an RP2040 dev board that’s all your own.

Development boards are super useful for prototyping a project, and some are quite simple, but there’s often some hidden complexity that needs to be considered before making your own. The RP2040 is a great chip to start your dev-board development journey, thanks to its excellent documentation and affordable components. [Kai] started this project using KiCad, which has all the features needed to go from schematics to final PCB Gerber files. In the write-up, [Kai] goes over how to implement USB-C in your design and how to add flash memory to your board, providing a place for your program to live. Once the crystal oscillator circuit is defined, decoupling capacitors added, and the GPIO pins you want to use are defined, it’s time to move to the PCB layout.

In the PCB design, it starts with an outside-in approach, first defining the board size, then adding the pins that sit along the edges of that board, followed by the USB connector, and then moving on to the internal components. Some components, such as the crystal oscillator, need to be placed near the RP2040 chip, and the same goes for some of the decoupling capacitors. There is a list of good practices around routing traces that [Kai] included for best results, which are useful to keep in mind once you have this many connections in a tight space. Not all traces are the same; for instance, the USB-C signal lines are a differential pair where it’s important that D+ and D- are close to the same length.

Finally, there is a walk-through on the steps needed to have your boards not only made at a board house but also assembled there if you choose to do so. Thanks [Kai] for taking the time to lay out the entire process for others to learn from; we look forward to seeing future dev-board designs. Be sure to check out some of our other awesome RP2040 projects.

“AI, Make Me A Degree Certificate”

One of the fun things about writing for Hackaday is that it takes you to the places where our community hang out. I was in a hackerspace in a university town the other evening, busily chasing my end of month deadline as no doubt were my colleagues at the time too. In there were a couple of others, a member who’s an electronic engineering student at one of the local universities, and one of their friends from the same course. They were working on the hardware side of a group project, a web-connected device which with a team of several other students, and they were creating from sensor to server to screen.

I have a lot of respect for my friend’s engineering abilities, I won’t name them but they’ve done a bunch of really accomplished projects, and some of them have even been featured here by my colleagues. They are already a very competent engineer indeed, and when in time they receive the bit of paper to prove it, they will go far. The other student was immediately apparent as being cut from the same cloth, as people say in hackerspaces, “one of us”.

They were making great progress with the hardware and low-level software while they were there, but I was saddened at their lament over their colleagues. In particular it seemed they had a real problem with vibe coding: they estimated that only a small percentage of their classmates could code by hand as they did, and the result was a lot of impenetrable code that looked good, but often simply didn’t work.

I came away wondering not how AI could be used to generate such poor quality work, but how on earth this could be viewed as acceptable in a university.
Continue reading ““AI, Make Me A Degree Certificate””