MoreRSS

site iconHackadayModify

Hackaday serves up Fresh Hacks Every Day from around the Internet. Our playful posts are the gold-standard in entertainment for engineers and engineering enthusiasts.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of Hackaday

Turning a Milling Machine into a Lathe

2025-09-13 19:00:02

A lathe is shown on a tabletop. Instead of a normal lathe workspace, there is an XY positioning platform in front of the chuck, with two toolposts mounted on the platform. Stepper motors are mounted on the platform to drive it. The lathe has no tailpiece.

If you’re planning to make a metalworking lathe out of a CNC milling machine, you probably don’t expect getting a position sensor to work to be your biggest challenge. Nevertheless, this was [Anthony Zhang]’s experience. Admittedly, the milling machine’s manufacturer sells a conversion kit, which greatly simplifies the more obviously difficult steps, but getting it to cut threads automatically took a few hacks.

The conversion started with a secondhand Taig MicroMill 2019DSL CNC mill, which was well-priced enough to be purchased specifically for conversion into a lathe. Taig’s conversion kit includes the spindle, tool posts, mounting hardware, and other necessary parts, and the modifications were simple enough to take only a few hours of disassembly and reassembly. The final lathe reuses the motors and control electronics from the CNC, and the milling motor drives the spindle through a set of pulleys. The Y-axis assembly isn’t used, but the X- and Z-axes hold the tool post in front of the spindle.

The biggest difficulty was in getting the spindle indexing sensor working, which was essential for cutting accurate threads. [Anthony] started with Taig’s sensor, but there was no guarantee that it would work with the mill’s motor controller, since it was designed for a lathe controller. Rather than plug it in and hope it worked, he ended up disassembling both the sensor and the controller to reverse-engineer the wiring.

He found that it was an inductive sensor which detected a steel insert in the spindle’s pulley, and that a slight modification to the controller would let the two work together. In the end, however, he decided against using it, since it would have taken up the controller’s entire I/O port. Instead, [Anthony] wired his own I/O connector, which interfaces with a commercial inductive sensor and the end-limit switches. A side benefit was that the new indexing sensor’s mounting didn’t block moving the pulley’s drive belt, as the original had.

The end result was a small, versatile CNC lathe with enough accuracy to cut useful threads with some care. If you aren’t lucky enough to get a Taig to convert, there are quite a few people who’ve built their own CNC lathes, ranging from relatively simple to the extremely advanced.

Design Scanimations In a Snap With The Right Math

2025-09-13 16:00:06

Barrier-grid animations (also called scanimations) are a thing most people would recognize on sight, even if they didn’t know what they were called. Move a set of opaque strips over a pattern, and watch as different slices of that image are alternately hidden and revealed, resulting in a simple animation. The tricky part is designing the whole thing — but researchers at MIT designed FabObscura as a design tool capable not only of creating the patterned sheets, but doing so in a way that allows for complex designs.

The barrier grid need not consist of simple straight lines, and movement of the grid can just as easily be a rotation instead of a slide. The system simply takes in the desired frames, a mathematical function describing how the display should behave, and creates the necessary design automatically.

The paper (PDF) has more details, and while it is possible to make highly complex animations with this system, the more frames and the more complex the design, the more prominent the barrier grid and therefore the harder it is to see what’s going on. Still, there are some very nice results, such as the example in the image up top, which shows a coaster that can represent three different drink orders.

We recommend checking out the video (embedded below) which shows off other possibilities like a clock that looks like a hamster wheel, complete with running rodent. It’s reminiscent of this incredibly clever clock that uses a Moiré pattern (a kind of interference pattern between two elements) to reveal numerals as time passes.

We couldn’t find any online demo or repository for FabObscura, but if you know of one, please share it in the comments.

Musical Motors, BLDC Edition

2025-09-13 13:00:16

This should count as a hack: making music from a thing that should not sing. In this case, [SIROJU] is tickling the ivories with a Brushless DC motor, or BLDC. 

To listen to a performance, jump to 6:27 in the embedded video. This BLDC has a distinctly chip-tune like sound, not entirely unlike other projects that make music with stepper motors. Unlike most stepper-based instruments we’ve seen [SIROJU]’s BLDC isn’t turning as it sings. He’s just got it vibrating by manipulating the space vector modulation that drives the motor — he gets a response of about 10 kHz that way. Not CD-quality, no, but plenty for electronic music. He can even play chords of up to 7 notes at a time.

There’s no obvious reason he couldn’t embed the music into a proper motor-drive signal, and thus allow a drone to hum it’s own theme song as it hovers along. He’s certainly got the chops for it; if you haven’t seen [SIROJU]’s videos on BLDC drivers on YouTube, you should check out his channel. He’s got a lot of deep content about running these ubiquitous motors. Sure, we could have just linked to him showing you how to do FOC on an STM32, but “making it sing” is an expression for mastery in English, and a lot more fun besides.

There are other ways to make music with motors. If you know of any others, don’t hesitate to send us a tip.

What Is the Fourier Transform?

2025-09-13 10:00:49

Over at Quanta Magazine [Shalma Wegsman] asks What Is the Fourier Transform?

[Shalma] begins by telling you a little about Joseph Fourier, the French mathematician with an interest in heat propagation who founded the field of harmonic analysis in the early 1800s.

Fourier’s basic insight was that you can represent everything as a sum of very basic oscillations, where the basic oscillations are sine or cosine functions with certain parameters. [Shalma] explains that the biology of our ear can do a similar thing by picking the various notes out from a tune which is heard, but mathematicians and programmers work without the benefit of evolved resonant hairs and bone, they work with math and code.

[Shalma] explains how frequency components can be discovered by trial and error, multiplying candidate frequencies with the original function to see if there are large peaks, indicating the frequency is a component, or if the variations average to zero, indicating the frequency is not a component. [Shalma] tells how even square waves can be modeled with an infinite set of frequencies known as the Fourier series.

Taking a look at higher-dimensional problems [Shalma] mentions how Fourier transforms can be used for graphical compression by dropping the high frequency detail which our eyes can barely perceive anyway. [Shalma] gives us a fascinating look at the 64 graphical building blocks which can be combined to create any possible 8×8 image.

[Shalma] then mentions James Cooley and John Tukey and the development of the Fast Fourier Transform in the 1960s. This mathematical tool has been employed to study the tides, to detect gravitational waves, to develop radar and magnetic resonance imaging, and to support signal processing and data compression. Even quantum mechanics finds use for harmonic analysis, and [Shalma] explains how it relates to the uncertainty principle. The Fourier transform has spread through pure mathematics and into number theory, too.

[Shalma] closes with a quote from Charles Fefferman: “If people didn’t know about the Fourier transform, I don’t know what percent of math would then disappear, but it would be a big percent.”

If you’re interested in the Fourier transform and want to dive deeper we would encourage you to read The Fastest Fourier Transform In The West and Even Faster Fourier Transforms On The Raspbery Pi Zero.

Header image: Joseph Fourier, Attributed to Pierre-Claude Gautherot, Public domain.

Running Code On a PAX Credit Card Payment Machine

2025-09-13 07:00:35

The PAX D177 PoS terminal helpfully tells you which tamper points got triggered. (Credit: Lucas Teske)
The PAX D177 PoS terminal helpfully tells you which tamper points got triggered. (Credit: Lucas Teske)

These days Points of Sale (PoS) usually include a digital payment terminal of some description, some of which are positively small, such as the Mini PoS terminals that PAX sells. Of course, since it has a CPU and a screen it must be hacked to run something else, and maybe discover something fun about the hardware in the process. Thus [Lucas Tuske] set out to do exactly this with a PAX D177 PoS, starting with purchasing three units: one to tear apart, one to bypass tamper protections on and one to keep as intact reference.

As expected, there are a few tamper protections in place, starting with pads that detect when the back cover is removed and a PCB that’s densely covered in fine traces to prevent sneaky drilling. Although tripping the tamper protections does not seem to affect the contents of the Flash, the firmware is signed. Furthermore the secrets like keys that are stored in NVRAM are purged, rendering the device effectively useless to any attacker.

The SoC that forms the brains of the whole operations is the relatively obscure MH1903, which is made by MegaHunt and comes in a dizzying number of variants that are found in applications like these PoS terminals. Fortunately the same SoC is also found on a development board with the AIR105 MCU that turns out to feature the same MH1903 core. These are ARM Cortex-M3 cores, which makes targeting them somewhat easier.

Rather than try to break the secure boot of the existing SoC, [Lucas] opted to replace the SoC package with a brand new one, which was its own adventure. Although one could say that this is cheating, it made getting a PoC of custom code running on one of these devices significantly easier. In a foll0w-up article [Lucas] expects to have Doom running on this device before long.

A Breadboard Computer in Three Chips

2025-09-13 04:00:17

Building a computer on a breadboard is a seminal project for many builders, but it can become complicated quite quickly, not to mention that all the parts needed for a computer are being placed on a medium which often lends itself to loose wires and other hardware bugs. [3DSage] has a working breadboard computer that is as simple as it can possibly be, putting it together piece by piece to show exactly what’s needed to get a computer which can count, access memory, and even perform basic mathematical operations.

The first step for any computer is to build a clock, and in this case it’s being provided by a 555 timer which is configured to provide an adjustable time standard and which steps through the clock pulses when a button is pressed. The next piece is a four-bit counter and a memory chip, which lets the computer read and write data. A set of DIP switches allows a user to write data to memory, and by using the last three bits of the data as opcodes, the computer can reset, halt, and jump to various points in a simple program.

Although these three chips make it possible to perform basic programming, [3DSage] takes this a bit further in his video by demonstrating some other simple programs, such as one which can play music or behave as an alarm clock. He also shows how to use a fourth chip in the form of a binary adder to perform some basic math, and then packages it all into a retro-styled computer kit. Of course you can take these principles and build them out as far as they will go, like this full 8-bit computer built on a breadboard or even this breadboard computer that hosts a 486.