Using Halftone Images In QR Codes Without Upsetting Scanners

Although quick-response (QR) codes are rather simple monochrome affairs, adding embellishments to them is a popular activity, if only to make QR codes not stick out like a sore thumb in e.g. flashy marketing flyers. The most simple approach here is to put any regular graphic in e.g. the center of said QR code and lean on the scanner’s error-correcting features to route around the damage, but a more sophisticated approach uses halftone images that are blended with the QR code, as first demonstrated in 2013 by [Hung-Kuo Chu] et al.

A number of online halftone image QR generators exist that use the methodology in said 2013 paper to allow you to generate any mesh-up you like. Here [Jorge C. Lucero] provides a JavaScript-based version written from scratch that can run client-side. According to [Jorge] this was a weekend’s project created out of sheer curiosity.

The basic way that this algorithm works is by using each of the data modules of the QR code as a 3×3 grid of submodules, using only the center sub-module as the module’s color. The other sub-modules are thus free to be assigned a halftone color grade that creates the final module’s appearance.

Although this should generally work without leaning on the scanner’s error-correction features, an ‘enhancement’ mode is possible that enhances the image clarity at the cost of introducing some scanning errors that will require correction. Overall it provides a pretty clear improvement over simple binary image embedding, especially when higher resolution QR codes are used.

Why The ULC Audio Codec Is A Perfect Fit For The N64

Although the Nintendo 64 could deliver solid 3D graphics with assets loaded at a blistering speed from the game cartridge, audio-wise it was a bit more hampered. The main challenge here was that streaming PCM audio data from a roomy CD as on the PlayStation wasn’t an option, and using compressed audio samples was impaired by Nintendo’s refusal to open up more than the CPU for third-party codecs, leading to most N64 games using so-called ‘sound fonts’ that use sample-based tracks.

Once the N64’s RSP vector processor became available for use by developers it became possible to use MP3s without clobbering the CPU, but this was still an imperfect solution. In a recent article by [Dominic Szablewski] it is thus argued that the Ultra Low Complexity (ULC) codec might be a match made in haven for the N64 hardware.

This still uses the same modified discrete cosine transform (MDCT) as many lossy audio codecs including MP3 do, but the ULC code is designed to be extremely light-weight for decoding. [Dominic] first came across it in the form of an old Game Boy Advance demo that played a 70 kbps file with no issues on the 16 MHz ARM CPU.

Naturally the ULC codec’s creator [Aikku93] didn’t employ any unusual black magic to achieve this feat, mostly just foregoing some of the heavier elements of e.g. MP3 like splitting the signal into bands, and using a light-weight syntax to store transformed coefficients.

Here [Dominic]’s goal was to port the ULC code to work with the N64’s RSP so as to offload as  much of the decoding as possible. This required becoming extremely intimate with MIPS assembly, with [Dominic] eventually giving up and asking an LLM coding chatbot to translate bits of ULC C code to [Max Bebök]’s RSP language (RSPL) syntax instead.

The good news here is thus that the open source N64 SDK libDragon now has ULC support, just in case you want more than simple tracker-based music for your homebrew N64 game and do not feel like clobbering the RSP and CPU at the same time with something like MP3 or Ogg Vorbis.

Pitting A Modern Chess Engine On A Pentium PC Against 1996’s Deep Blue

Although premature optimization can be a really bad thing, late optimization is sometimes unavoidable because we simply didn’t know about certain algorithms yet to massively improve the solving of a problem. When the 1990s was all about beating chess grandmasters at their game, IBM went so far as to build a the Deep Blue custom super computer for it. This is what [Nicholas Carlini] managed to effectively beat using a version of the Stockfish chess engine running on an era-appropriate Pentium PC.

A common way to measure one’s skill in chess involves the Elo rating system, named after chess master and physics professor [Arpad Elo]. As a relative system, it can be used to compare different players including chess engines against each other, with IBM’s Deep Blue scoring 2700, with the modern-day Stockfish engine hitting around 3700. This makes Stockfish statistically much more likely to win against a human chess grandmaster than Deep Blue, but also raises the question of how much of this advantage is due to Stockfish running on a much faster system.

To investigate the impact here, [Nicholas] used a Pentium Pro 200 MHz system with 64 MB of RAM (Fast Page or EDO SIMMs), which would have been a rather nice system for about 1995. Two chess engines were ported to this platform, being Crafty and Stockfish. Next both engines were tweaked with the help of an LLM coding bot to see what difference various compilation flags and algorithms would make.

Based on the results it would seem that the answer is ‘yes’: this 200 MHz Pentium Pro could have likely beaten even a chess grandmaster like [Kasparov] and Deep Blue in at least a few games, though without going back in time by about thirty years we’ll never know for certain.

Header: Wilfredor, CC0

Making A Wax Motor For Micrometer-Level Control

Although not very glamorous, wax motors are a fairly common type of linear actuator. They use the thermal response of waxes and the resulting volumetric expansion or reduction to create a relatively fast, smooth, and highly predictable actuator that can work for decades. They can often be found operating valves and things like the door mechanisms of washing machines. As [BubsBuilds] demonstrates in a recent video, you can even build your own wax motor for very precise control.

Here simple paraffin wax is used, which changes in volume by 1.15 times when it goes from solid to its molten state. Calling it a ‘waxtuator’, [BubsBuilds] characterized this expansion rate over the temperature range between solid and fully molten to make it a controllable actuator. In his experiments, a gap of less than 5 µm was maintained over twelve hours, showing how precise this device can be if you can control the temperature that the wax is kept at.

One major issue is the low conductivity of paraffin wax, which as some commentators remark can be solved by mixing something like fine copper particles into the wax to increase the thermal conductivity. In the shown implementation instead multiple channels in the aluminium block are used, which are melted by a TEC element.

The wax exerts pressure on a working fluid, which then pushes on a hydraulic cylinder that can be used for whatever precise linear actuating task has to be performed. Although initially water was used as a working fluid, this posed many issues with wax-water interface compatibility and vacuum degassing.

Although ethylene glycol makes for a better working fluid, this proved to be its own hassle. With the water-wax version a displacement sensor was thus used to measure and calibrate the whole setup. The electronics used to control the TEC in combination with the current temperature and displacement are a story in itself, but essential for making this device work.

While not something we often see tackled in the DIY space, we’ve covered a few teardowns of commercial units over the years.

Continue reading “Making A Wax Motor For Micrometer-Level Control” →

Germanium diode

From Germanium To Diamond: The Many Shapes Of Semiconductors

It seems fair to say that semiconductor technology has been one of the most influential inventions in human history. Practically overnight it turned human technology from being large, cumbersome and power-hungry into an increasingly sleeker, more power-efficient and much more capable form. It has become practically impossible at this point to imagine modern society without semiconductor technology.

That said, we didn’t always use today’s silicon-based semiconductor technology, and although silicon-based semiconductors are exceedingly versatile and adaptable, they do have their limitations. The past years we have seen for example gallium-nitride semiconductors make big inroads in power switching technology, and more exotic forms like diamond-based semiconductors keep making their tantalizing appearances.

In this article we’ll take a look at how we ended up at silicon as the default for semiconductor technology, as well as why we may want to consider moving to other materials.

Continue reading “From Germanium To Diamond: The Many Shapes Of Semiconductors” →

Using A Cheap DC Motor To Make A Go-Kart Go

Where Archimedes said that he could move the Earth given a large enough lever and a suitable fulcrum, [Current Concept] decided that he could give his own spin on this quote by swapping the lever and fulcrum for a tiny $1 DC brushed motor and a very large gearing ratio.

In addition to 3D printing a compound gearbox with the requisite 1,243:1 gear ratio, the video also covers the joys of getting a ‘Craigslist special’ go-kart for about the same price as the electric motor and having to undo many very special modifications.

With that done, the newly printed gearbox was installed, along with the single DC motor to drive it all. This actually managed to propel the go-kart, at a pace that would impress even a snail, so for the next phase instead of a single motor a total of fourteen were used, all adding their tiny bit of torque into the gearbox.

Although one has to keep in mind that the gearbox and chain mechanism will also take its slice of the provided energy along with other inefficiencies, one still cannot beat the laws of physics. Much like Archimedes’ lever powered by a piddly human, the conversion of RPM into torque for these small motors was never going to get you that zippy go-kart experience.

Which isn’t to say that someone shouldn’t totally put some BLDC motors to the task and see how fast a go-kart can be made to move using those and an optimized gearbox.

Continue reading “Using A Cheap DC Motor To Make A Go-Kart Go” →

Detecting An Eight Magnetic Pole State Using Chiral Phonons

The idea that magnetism doesn’t necessarily always have a dipolar configuration is not a new one, but it’s not an easy theory to find evidence for. Most recently a team of scientists at the University of Toronto used a new method involving vibrational energy in the form of phonons to find evidence for an octupolar magnetic order.

In the associated paper in Physical Review Letters (paywalled, arXiv version) by [Ruairidh Sutcliffe] et al. we can find more details on this method and what their findings may mean for various fields. Naturally, this is a quantum-level phenomenon that requires Raman spectroscopy to be detectable via said phonons.

The materials investigated here are also somewhat exotic, ranging from actinides like NpO2 to transition metal oxides like Sr2MgReO6, while having on common strong spin-orbit coupling. Where the phonons come into play is that they can be used to indirectly measure crystal lattice distortions due to the pseudo-angular momentum assigned to the phonons. This generates pseudo-chiral phonons which then show up in the Raman spectroscopy.

Although finding evidence for octopolar magnetic order is interesting in itself, this way to measuring a crystal lattice’s structure makes for another fascinating research tool that can be used to study many similar phenomenon.

These quantum-level magnetic states could conceivably be used for anything from sensors to magnetic data storage, though any such research is unlikely to be commercialized any time soon.