Hackaday Links Column Banner

Hackaday Links: November 3, 2024

“It was the best of times, it was the blurst of times?” Perhaps not anymore, if this Ig Nobel-worthy analysis of the infinite monkey theorem is to be believed. For the uninitiated, the idea is that if you had an infinite number of monkeys randomly typing on an infinite number of keyboards, eventually the complete works of Shakespeare or some other famous writer would appear. It’s always been meant to be taken figuratively as a demonstration of the power of time and randomness, but some people just can’t leave well enough alone. The research, which we hope was undertaken with tongue firmly planted in cheek, reveals that it would take longer than the amount of time left before the heat death of the universe for either a single monkey or even all 200,000 chimpanzees in the world today to type the 884,647 words of Shakespeare’s complete works in the proper order.

Continue reading “Hackaday Links: November 3, 2024”

All You Need For Artificial Intelligence Is A Commodore 64

Artificial intelligence has always been around us, with [Timothy J. O’Malley]’s 1985 book on AI projects for the Commodore 64 being one example of this. With AI defined as being the theory and development of systems that can perform tasks that normally requiring human intelligence (e.g. visual perception, speech recognition, decision-making), this book is a good introduction to the many ways that computer systems for decades now have been able to learn, make decisions and in general become more human-like. Even if there’s no electronic personality behind the actions.

In the book’s first chapter, [Timothy] isn’t afraid to toss in some opinions about the true nature of intelligence and thinking. Starting with the concept that intelligence is based around storing information and being able to derive meaning from connections between stored pieces of information, the idea of a basic AI as one would use in a game for the computer opponent arises. A number of ways of implementing such an AI is explored in the first and subsequent chapters, using Towers of Hanoi, chess, Nim and other games.

After this we look at natural language processing – referencing ELIZA as an example – followed by heuristics, pattern recognition and AI for robotics. Although much of this may seem outdated in this modern age of LLMs and neural networks, it’s important to realize that much of what we consider ‘bleeding edge’ today has its roots in AI research performed in the 1950s and 1960s. As [Timothy] rightfully states in the final chapter, there is no real limit to how far you can push this type of AI as long as you have more hardware and storage to throw at the problem. This is where we now got datacenters full of GPU-equipped systems churning through vector space calculations for the sake of today’s LLM & diffusion model take on ‘AI’.

Using a Commodore 64 to demonstrate the (lack of) validity of claims is not a new one, with recently a group of researchers using one of these breadbin marvels to run an Ising model with a tensor network and outperforming IBM’s quantum processor. As they say, just because it’s new and shiny doesn’t necessarily mean that it is actually better.

Man holding brass bar stock with several polygons turned on end

Polygons On A Lathe

Most professionals would put a polygon on the end of a turned part using a milling machine. But many a hobbyist doesn’t have a mill. And if the polygon needs to be accurately centered, remounting the stock costs accuracy.

[Mehamozg] demonstrates you can turn a polygon on a lathe.

Polygons on shaft ends are surprisingly common, whether you are replacing a lost chuck key, need an angular index, or need a dismountable drive. As the video shows, you can definitely make them on the lathe.

But how the heck does this work? It seems like magic.

Lets start by imagining we disengage and lock the rotating cutter in [Mehamozg]’s setup and run the lathe. If the tool is pointed directly at the center we are just turning normally.  If we angle the tool either side of center we still get a cylinder, but the radius increases by the sin of the angle.

Now, if we take a piece of stock with a flat on it and plot radius versus angle we get a flat line with a sin curve dip in it. So if we use [Mehamozg]s setup and run the cutter and chuck at the same speed, the cutter angle and the stock angle increase at the same time, and we end up with a flat on the part.  If the cutter is rotating an even multiple of the chuck speed, we get a polygon.

The rub in all this is the cutter angle.. At first we were convinced it was varying enormously. But the surface at the contact point is not perpendicular to  the radius from center to contact. So it cancels out, we think.  But our brains are a bit fried by this one. Opinions in the comments welcomed.

We like this hack. It’s for a commonly needed operation, and versatile enough  to be worth fiddling with the inevitable pain of doing it the first time.  For a much more specialized machining hack, check out  this tool that works much the same in the other axis.

Oscillator Needs Fine-Tuning

Since their invention more than a century ago, crystal oscillators have been foundational to electronic design. They allow for precise timekeeping for the clocks in computers as well as on our wrists, and can do it extremely accurately and inexpensively to boot. They aren’t without their downsides though; a quartz watch might lose or gain a few seconds a month due to variations in temperature and other non-ideal environmental situations, but for working in the world of high-frequency circuits this error is unacceptable. For that you might reach for something like an oven oscillator, a circuit with a temperature controlled chamber able to keep incredibly precise time.

[IMSAI Guy] found this 10 MHz oven oscillator on a site selling bulk electronics at bargain basement prices. But as is unsurprising for anyone who’s used a site like this to get cheap circuits, it didn’t quite hit its advertised frequency of 10.000000 MHz. The circuit design is capable of this amount of accuracy and precision, though, thanks to some cleverly-designed voltage dividers and filtering. One of those voltage dividers allows a potentiometer to control a very narrow range of output frequencies, and from the factory it was outputting between 9.999981 and 9.9999996 MHz. To get it to actually output a 10 MHz wave with eight significant digits of accuracy, a pull-up resistor on the voltage divider needed to be swapped out.

While this was a fairly simple fix, one might wonder how an off-the-shelf component like this would miss the mark in such an obvious way but still go into production. But that’s one of life’s great mysteries and also the fun of sourcing components like this. In this case, the oven oscillator was less than $10. But these circuits aren’t always as good of a deal as they seem.

Continue reading “Oscillator Needs Fine-Tuning”

M.2 Makes An Unusual Microcontroller Form Factor

When we think of an m.2 slot in our laptop or similar, it’s usually in the context of its PCI connectivity for high-speed applications such as solid state disks. It’s a connector that offers much more than that interface though, making it suitable for some unexpected add-ons. As an example [MagicWolfi] has produced an m.2 card which contains the equivalent of a Raspberry Pi Pico.

The board itself has the familiar m.2 edge connector at the bottom, and the RP2040 GPIO lines as postage-stamp indentations round the edges. On the m.2 front is uses the USB interface as well as a UART and the I2C lines, as well as some of the interfaces we’re less familiar with such as ALERT, WAKE, DISABLE1/2, LED 1/2, and VENDOR_DEFINED.

On one level this provides a handy internal microcontroller card with which you can do all the things you’d expect from a Pi Pico, but on another it provides the fascinating possibility of the Pico performing a watchdog or other function for the host device. We would be genuinely interested to hear more about the use of the m.2 slot in this way.

If you’d like to know more about m.2, we’ve taken a look at it in more depth.

A white handheld with a centered screen and Xbox-style controllers flanking an 8" screen. Speaker grilles are visible below the controllers in the face of the device.

Beth Deck Is A Framework-Powered Gaming Handheld

DIY gaming handhelds have long been the purview of the advanced hacker, with custom enclosures and fiddly soldering making it a project not for the faint of heart. [Beth Le] now brings us a custom handheld for the beginner that can be assembled in 15 minutes and doesn’t require any soldering.

Three 3D printed panels sit on a black surface. The white back has cooling holes in it (top), a green center plate holds a Framework laptop battery (middle), and the front frame holds the speakers, controllers, and screen (bottom)

These claims might seem suspicious at first, but the fact that the build is powered by a Framework mainboard makes the dream seem attainable. Using an 8″ touchscreen and a rehoused mobile device controller, the 3D printed enclosure turns the PCB and battery into an interesting alternative to a Steam Deck.

[Beth] recommends waiting for the forthcoming revision 2 to make your own as she is working on refining the model. She also suggests printing in PC or PETG since PLA is too brittle and ABS warping can be an issue for tolerances with the pogo pins. In any case, this is definitely a project to keep your eye on if you enjoy gaming on the go.

As you know, we love Framework around here and the Cambrian Explosion of high-powered custom builds it’s enabled. This isn’t the first time we’ve seen a Framework-Powered handheld either. If you’re looking for a different form factor, we’ve also seen portable all-in-ones, keyboard PCs, and slabtops too.

White pieces on a teal and white chess board. The line of pawns shows three segmented queens in the foreground, one piece being pressed by a man's hand from above in a state between queen and pawn, and the remainder of the pawns in the background in the pawn state.

Transforming Pawn Changes The Game

3D printing has allowed the hobbyist to turn out all sorts of interesting chess sets with either intricate details or things that are too specialized to warrant a full scale injection molded production run. Now, the magic of 3D printing has allowed [Works By Design] to change the game by making pawns that can automatically transform themselves into queens.

Inspired by a CGI transforming chess piece designed by [Polyfjord], [Works By Design] wanted to make a pawn that could transform itself exist in the real world. What started as a chonky setup with multiple springs and a manually-actuated mechanism eventually was whittled down to a single spring, some pins, and four magnets as vitamins for the 3D printed piece.

We always love getting a peek into the trial-and-error process of a project, especially for something with such a slick-looking final product. Paired with a special chess board with steel in the ends, the magnets in the base activate the transformation sequence when they reach the opposite end.

After you print your own, how about playing chess against the printer? We’d love to see a version machined from metal too.

Thanks to [DjBiohazard] on Discord for the tip!

Continue reading “Transforming Pawn Changes The Game”