Reverse-engineering The Milwaukee M18 Redlink Protocol

In an ideal world, every single battery pack for power tools would use the same physical interface and speak a clearly documented protocol with chargers. Since we live in a decidedly less-than-ideal world, we get to enjoy the fun pastime of reverse-engineering the interfaces and protocols of said battery packs.

Hooking up a logic analyzer to a M18 battery and charger.

A recent video from the [Tool Scientist] goes over what is already known about the Milwaukee M18 Redlink protocol, used with the manufacturer’s M18-series of batteries, before diving into some prodding and poking of these packs’ sensitive parts to see what comes out of their interface.

Previously, [Buy It Fix It] shared their findings on Reddit, covering the basic protocol, including the checksum method, but without an in-depth analysis of the entire charging protocol. Meanwhile [Quagmire Repair] performed an in-depth teardown and reverse-engineering of the M18 hardware, including the circuitry of the BMS.

Putting these two things together, [Tool Scientist] was able to quickly get some of his M18 packs strapped down into the analysis chair for both passive analysis, as well as the effect of overvoltage, undervoltage, overheating and freezing the battery pack on the output reported by the battery’s BMS.

One of the lists of commands and response messages obtained by [Tool Scientist] on YouTube.
One of the lists of commands and response messages obtained by [Tool Scientist] on YouTube.
The result is a rather comprehensive list of instructions obtained under these various conditions, including a fault condition (05) returned by the BMS of one pack indicating its likely demise. Overall, it does not appear to be a particularly special (or well-designed) protocol, but it does make for a good reverse-engineering target, while adding to the body of collective knowledge on these widely available battery packs.

Hopefully the same inertia that prevents people from moving outside the designated power tool ecosystem due to the incompatible battery packs will also ensure that this level of  knowledge will remain relevant for the foreseeable future, especially since the manufacturers of knock-off battery packs seem rather unwilling to share the results of their own reverse-engineering efforts.

Continue reading “Reverse-engineering The Milwaukee M18 Redlink Protocol”

Bare Bones Vacuum Forming, Just Add Plastic Plates

Vacuum forming is a handy thing to be able to do, and [3DSage] demonstrates how to do a bare-bones system that can form anything smaller than a dinner plate with little more than a 3D printed fitting to a vacuum cleaner, a heat gun, and a trip to the dollar store.

Plastic plates from the dollar store make excellent forming sheets, and in a variety of colors.

The 3D printed piece is a perforated table that connects to a vacuum cleaner hose, and [3DSage] mentions elsewhere that he tried a few different designs and this one worked the best. A cardboard box makes an expedient stand. The object being molded goes on the table, and when the vacuum is turned on, air gets sucked down into the holes.

As for the thermoforming itself, all that takes is some cheap plastic plates and a heat gun. Heat the plastic until it begins to droop, then slap it down onto the vacuum table and watch the magic happen. Using plastic plates like this is brilliant. Not only are they economical, but their rim serves as a built-in handle and helps support the sagging plastic.

Thermoforming plastic on a 3D-printed vacuum table and using 3D-printed molds definitely isn’t a system that will be cranking parts out all day long, but as long as one allows time for everything to cool off in between activations, it’ll get the job done. Nylon will hold up best but even PLA can be serviceable.

Watch it in action in the video embedded below. The video is actually about [3DSage] making adorable Game Boy themed s’mores, but here’s a link to the exact moment the vacuum forming part happens.

Continue reading “Bare Bones Vacuum Forming, Just Add Plastic Plates”

A homebrew machine that dips a piece of wire into an etching solution

Homebrew Probe Tip Etcher Makes Amazingly Sharp Needles

There’s a simple reason why high-tech gadgets like PCs, TVs and smartphones are so cheap: they’re mass-produced. By spreading out huge engineering costs over equally huge production volumes, the cost per item can remain quite low. The flipside to this is that devices with only a small niche market can be extremely expensive even when they seem quite simple.

[Baird Bankovic], an undergrad student at Penn State University, discovered this when he was working with a scanning tunneling microscope (STM). He noticed that the machines used to make STM probes, a pretty straightforward process, cost north of $7500. This inspired him to make a cheap STM probe etching machine using simple homebrew parts.

If you’re not familiar with scanning tunneling microscopy, here’s how it works in a nutshell: a very sharp tungsten needle is positioned a few nanometers above the sample to be analyzed, and a small voltage is applied between the two. Through an effect known as quantum tunneling, a small current then flows between the probe and the sample. By observing this current and scanning the probe across the sample, a three-dimensional picture of the surface is obtained with sub-nanometer-level resolution.

One of the many factors that determine the quality of the image is the sharpness of the probe. Because a very sharp probe is extremely fragile and prone to oxidation, they are typically made on-site by dipping a piece of tungsten wire into an etchant in one of those costly machines.

That’s exactly what [Baird]’s device does: a Petri dish on a 3D printed frame holds a volume of sodium hydroxide solution, while a jackscrew Z-stage moves a probe holder up and down. A piece of tungsten wire is dipped into the solution and a voltage is applied to start the etching process. Because most of the etching happens at the liquid’s surface, the wire gets progressively thinner at that point until it snaps and the bottom half drops off. When this happens, the current through the wire changes rapidly, which triggers the machine to pull the wire out of the solution and stop the etching process.

The resulting probes have a well-defined sharp tip with an estimated width of about 50 nanometers — pretty impressive for such a simple setup. The entire hardware design is open source and available on [Baird]’s GitHub page for anyone to replicate. Nanometer-sized needles might only seem useful for those with a professional STM setup, but they also come in handy for all kinds of homebrew atomic-scale imaging experiments.

Continue reading “Homebrew Probe Tip Etcher Makes Amazingly Sharp Needles”

Putting The Magic Smoke Back Into A Dodgy Spectrum Analyzer

The trouble with fixing electronics is that most devices are just black boxes — literally. Tear it down, look inside, but it usually doesn’t matter — all you see are black epoxy blobs, taunting you with the fact that one or more of them are dead with no external indication of the culprit.

Sometimes, though, you get lucky, as [FeedbackLoop] did with this Rigol spectrum analyzer fix. The instrument powered up and sort of worked, but the noise floor was unacceptably high. Even before opening it up, there was clearly a problem; in general, spectrum analyzers shouldn’t rattle. Upon teardown, it was clear that someone had been inside before and got reassembly wrong, with a loose fastener and some obviously shorted components to show for it. But while the scorched remains of components made a great place to start diagnosis, it doesn’t mean the fix was going to be easy.

Figuring out the values of the nuked components required a little detective work. The blast zone seemed to once hold a couple of resistors, a capacitor, a set of PIN diodes, and a couple of tiny inductors. Also nearby were a pair of chips, sadly with the markings lasered off. With some online snooping and a little bit of common sense, [FeedbackLoop] was able to come up with plausible values for most of these — even the chips, which turned out to be HMC221 RF switches.

Cleaning up the board was a bit of a chore — the shorted components left quite a crater in the board, which was filled with CA glue, and a bunch of missing pads. This called for some SMD soldering heroics, which sadly didn’t fix the noise problem. Replacing the two RF switches and the PIN diodes seemed to fix the problem, albeit at the cost of some loss. Sometimes, good enough is good enough.

This isn’t the first time [FeedbackLoop] has gotten lucky with choice test equipment in need of repairs — this memory module transplant on a scopemeter comes to mind.

Continue reading “Putting The Magic Smoke Back Into A Dodgy Spectrum Analyzer”

Bringing Da Vinci’s Saw Mill To Life

DaVinci’s notebook — the real one, not the band — was full of wonderous inventions, though many were not actually built and probably weren’t even practical with the materials available at the time (or even now). [How To Make Everything] took one of the Master’s drawings from 1478 of a sawmill and tried to replicate it. How did he do? You can see for yourself in the video below.

There are five different pieces involved. A support structure holds a water wheel and a saw. There’s a crank mechanism to drive the saw and a sled to move the wood through the machine. It sounds simple enough, although we were impressed and amused that he made his own nails to be authentic. No Home Depot back in the 1470s, after all.

Watching him produce, for example, castle joints, makes us think, “Hey, we could do that!” But, of course, we probably can’t, at least not by hand. We must admit we are pretty dependent on CNC tools and 3D printing, but we admire the woodwork, nevertheless. There’s some pretty cool metal working, too.

We thought the waterwheel would be the easy part, but it turned out to be a bit of a problem. Things worked, but it was slower than you would think. We’ve seen sawmills put together before. Da Vinci worked for money, and there was always money in weapons so he did design a lot of them, too.

Continue reading “Bringing Da Vinci’s Saw Mill To Life”

Agreeing By Disagreeing

While we were working on the podcast this week, Al Williams and I got into a debate about the utility of logic analyzers. (It’s Hackaday, after all.) He said they’re almost useless these days, and I maintained that they’re more useful than ever. When we got down to it, however, we were actually completely in agreement – it turns out that when we said “logic analyzer” we each had different machines, and use cases, in mind.

Al has a serious engineering background and a long career in his pocket. When he says “logic analyzer”, he’s thinking of a beast with a million probes that you could hook up to each and every data and address line in what would now be called a “retrocomputer”, giving you this god-like perspective on the entire system state. (Sounds yummy!) But now that modern CPUs have 64-bits, everything’s high-speed serial, and they’re all deeply integrated on the same chip anyway, such a monster machine is nearly useless.

Meanwhile, I’m a self-taught hacker type. When I say “logic analyzer”, I’m thinking maybe 8 or 16 signals, and I’m thinking of debugging the communications between a microcontroller, an IMU, or maybe a QSPI flash chip. Heck, sometimes I’ll even break out a couple pins on the micro for state. And with the proliferation of easy and cheap modules, plus the need to debug and reverse commodity electronics, these logic analyzers have never been more useful.

So in the end, it was a simple misunderstanding – a result of our different backgrounds. His logic analyzers were extinct or out of my price range, and totally off my radar. And he thinks of my logic analyzer as a “simple serial analyzer”. (Ouch! But since when are 8 signals “serial”?)

And in the end, we both absolutely agreed on the fact that great open-source software has made the modern logic analyzers as useful as they are, and the lack thereof is also partially responsible for the demise of the old beasts. Well, that and he needs a lab cart then to carry around what I can slip in my pocket today. Take that!

Wien Bridge Oscillator Drives Distortion Into The Floor

It’s not often that a single photo can tell you pretty much everything you need to know about a project, but the spectrum analyzer screenshot nearby is the perfect summary of this over-the-top low-distortion audio oscillator build. But that doesn’t mean there’s not a ton of interesting stuff going on with this one, so buckle up.

One spike at the fundamental and not much more.

The project is by [Basin Street Design], who doesn’t really offer much by way of inspiration for this undertaking, nor a discussion on what this will be used for. But the design goals are pretty clear: build an oscillator with as little distortion as possible across the audio frequency range.

The basic circuit is the well-known Wien bridge oscillator where the R-C pairs are switched in and out of the feedback loop to achieve frequency range control. This was accomplished with rotary switches rebuilt from their original configuration in a Heathkit IG-18 sine/square wave generator, a defunct instrument that was gutted and used as an enclosure for this build. There are a lot of other treats here, too, like the automatic gain control (AGC) that uses a homebrew voltage-controlled resistor made from an incandescent lamp and a cadmium sulfide photoresistor glued inside a piece of brake line, and an output attenuator made from discrete resistors that drops the output in 10 dB steps while maintaining an overall 75-Ohm impedance.

But at the end of the day, it all comes down to that single spike on the spectrum analyzer, with no apparent harmonics. To make sure there wasn’t something hiding down in the noise, [Basin Street] added a notch filter to lower the fundamental by 60 dB, allowing the spectrum analyzer sensitivity to be cranked way up. Harmonics were visible, but so far down into the noise — as low as -115 dBc — that it’s hardly worth mentioning.

There’s a lot more detail in this one, so dive in and enjoy. If you want another take on Wien bridge circuits, check out this recent LM386-based oscillator. Just don’t expect such low distortion with that one.