ESP32 Becomes Music Player In Under 40 Lines Of Code

The demo code for [XTronical]’s ESP32-based SD card music player is not even 40 lines long, though it will also require a few economical parts before it all works. Nevertheless, making a microcontroller play MP3s (and other formats) from an SD card is considerably simpler today than it was years ago.

Part of what makes this all work is I2S (Inter-IC Sound), a format for communicating PCM audio data between devices. Besides the ESP32, at the heart of it all is an SD card reader breakout board and the MAX98357A, which can be thought of as a combination I2S decoder and Class D amplifier. The ESP32 reads audio files from the SD card and uses an I2S audio library to send the I2S data stream to the MAX98357A (or two of them for stereo.) From there it is decoded automatically and audio gets pumped though attached speakers.

A few economical components, and only a handful of connections between them.

It’s amazing how much easier audio is to work with when one can take advantage of shuffling audio data around digitally, and the decoder handles multiple formats with an amplifier built in. You can see [XTronical]’s ESP32 player in action in the video embedded below.

Continue reading “ESP32 Becomes Music Player In Under 40 Lines Of Code”

Dremel Workstation’s New Job: Applying Threaded Inserts With Cheap Soldering Iron

Dremel has been helping people fit square pegs into round holes for years, and [concretedog] saw that the Dremel 220 Workstation — a piece of hardware similar to a drill press — could be convinced to hold a cheap soldering iron just as easily as it holds a rotary tool. A soldering iron makes an effective thermal insert tool, and the job of heating and pressing the threaded metal rings into plastic is made much easier when it can be done similar to operating a drill press. With a few modifications and a 3D-printed adapter, the thermal insert rig was born.

Whenever one is working around a design that already exists, it pays to be flexible and adjust to the unexpected. The Dremel 220 has a holder intended to clamp a rotary tool, and the original plan was to simply design and print an adapter so a soldering iron could sit in place of the rotary tool. That plan changed upon realizing that the entire rotary tool holder disconnected from the tool’s frame with a single bolt. It made much more sense to make the soldering iron replace the rotary tool holder, instead.

The resulting modified soldering iron is mounted via standoffs to a 3D-printed adapter with a copper foil heat shield. [concretedog] admits it’s not ideal from a heat management perspective, but it makes a fine prototype that seems to work well for light duty. The next step would be a metal version.

If you’re intrigued by threaded heat-set inserts, you can learn all about how to use them from Joshua Vasquez’s guide to the handy things. And should you prefer to make your own DIY press from 3D printed parts and off-the-shelf hardware, we have that covered as well.

External Battery Mod For Action Camera Does It Non-destructively

[Facelesstech] owns an SJCAM SJ4000 action camera, but the internal battery was no longer functional. Not wishing to buy a replacement and unwilling to hook up an ungainly USB cable to feed power, the solution was to design and 3D print an adapter to power the camera from a single rechargeable 14500 sized battery (which is the same size as an AA cell, and a good match for the width of the camera.)

The adapter works by mimicking the original battery, so the camera never knows the difference. A 3D-printed holder for the 14500 battery (which doubles as a GoPro compatible mount) has an extension the same size and shape of the camera’s original internal battery. The tricky part was interfacing to the power connectors buried inside the camera’s battery bay. For a solution, [Facelesstech] eventually settled on the small connectors harvested from inside a female header, using them to connect to the small blades inside the camera. We broke open a spare female 0.1″ header, shown here, to make it clear where these little pieces come from. The only other battery hardware needed are the contacts for an AA cell, but those are also easy to harvest and reuse.

The GitHub repository for the project includes STL files as well as the FreeCAD files for the parts. A video overview is embedded below.

Continue reading “External Battery Mod For Action Camera Does It Non-destructively”

Finding Perfect Part Fits With The Goldilocks Approach (and OpenSCAD)

There is something to be said for brute force or trial-and-error approaches to problems, especially when finding a solution has an empirical element to it. [Tommy] perceived that to be the case when needing to design and 3D print servo horns that would fit factory servos as closely as possible, and used OpenSCAD to print a “Goldilocks array” from which it was possible to find a perfect match for his printer by making the trial and error process much more efficient. By printing one part, [Tommy] could test-fit dozens of options.

What made doing this necessary is the fact that every 3D printer has some variance in how accurately they will reproduce small features and dimensions. A 6.3 mm diameter hole in a CAD model, for example, will not come out as exactly 6.3 mm in a 3D-printed object. It will be off by some amount, but usually consistently so. Therefore, one way around this is to empirically determine which measurements result in a perfect fit, and use those for production on that specific 3D printer.

That’s exactly what [Tommy] did, using OpenSCAD to generate an array of slightly different sizes and shapes. The array gets printed out, servos are test-fitted to them, and whichever option fits best has its dimensions used for production. This concept can be implemented in any number of ways, and OpenSCAD makes a decent option due to its programmatic nature. Interested in OpenSCAD? It will run on nearly any hardware, and you can get up and running with the basics in probably less than ten minutes.

Tic-Tac-Toe Implemented In Single Call To Printf()

[Nicholas Carlini] programmed a C implementation of two-player Tic Tac Toe, and he did it in a single call to printf(). The arguments for that single function call get mind-bendingly complex, so it may come as no surprise that it was written for The International Obfuscated C Code Contest (IOCCC).

Most of us are aware that printf() is one of those functions that is considerably more complex under the hood, and capable of far more, than it may appear to be. But did you know that it is capable of Turing-complete computation?

[Nicholas] clearly steps through the theory, so give it a read. In short, a maze of arguments handles the logic of the game while an embedded scanf() reads user input, and printing the game board is always preceded by an escape code to clear the screen.

[Nicholas] is certainly no stranger to in-depth understandings; we’ve seen his work before in demonstrating how to fool speech recognition with hidden commands, including a powerful example showing how two virtually identical-sounding audio files transcribe entirely differently.

Palm’s Mini-Mobile Phone Becomes Bike Phone

The mini-mobile phone [Jim Yang] got his hands on deserves a bit of background. Palm had the concept of a companion mobile phone, and this manifested itself in late 2018 as a cute palm-sized smartphone that one could carry around when one didn’t wish to haul along their “real” phone. This smaller and simpler phone was originally intended to share the same mobile number as one’s primary phone (though it has since been made able to work as a standalone device.)

[Jim]’s device, in use as a bike-mounted smartphone.
[Jim] got his hands on a refurbished Palm PVG100, rooted it, and shared some pictures of the internal components. The phone was not carrier-locked, but getting it up and running was still a bit more complex than plugging in a SIM card. For example, voice calls worked fine but to gain access to mobile data on the Three UK mobile network required updating the Access Point Name (APN) settings. [Jim] also rooted the Android-based phone and describes how he removed Verizon bloatware.

Palm’s companion phone idea hasn’t really caught on in a commercial sense, but in a way, [Jim] is validating the concept. After getting it up and running, he attached it to his bike with a custom mount to enjoy the benefits of having a mobile phone along without actually risking his primary device.

In case you’re wondering, this Palm is indeed the same Palm that launched the PalmPilot in 1996, whose distinctive folding keyboard accessory has shown up in past hacks.

Art of 3D printer in the middle of printing a Hackaday Jolly Wrencher logo

3D Printering: Sticky Resin Prints And How To Fix Them

After going through all the trouble of printing a part in resin, discovering it feels sticky or tacky to the touch is pretty unwelcome. Giving the model some extra ultraviolet (UV) curing seems like it should fix the problem, but it probably does not. So, what can be done?

The best thing to do with a sticky print is to immediately re-wash it in clean isopropyl alcohol (IPA) before the UV present in ambient light cures stray resin. If the part remains sticky after it is dry, more aggressive steps can be taken.

We’ll get into those more extreme procedures shortly, but first let’s understand a bit more about how resin works, then look at how that applies to preventing and removing tacky surfaces on finished prints. Continue reading “3D Printering: Sticky Resin Prints And How To Fix Them”