Pong Gets The Boot

You might be surprised to find out that [Akshat Joshi’s] Pong game that fits in a 512-byte boot sector isn’t the first of its kind. But that doesn’t mean it isn’t an accomplishment to shoehorn useful code in that little bitty space.

As you might expect, a game like this uses assembly language. It also can’t use any libraries or operating system functions because there aren’t any at that particular time of the computer startup sequence. Once you remember that the bootloader has to end with two magic bytes (0x55 0xAA), you know you have to get it all done in 510 bytes or less.

This version of Pong uses 80×25 text mode and writes straight into video memory. You can find the code in a single file on GitHub. In the old days, getting something like this working was painful because you had little choice but reboot your computer to test it and hope it went well. Now you can run it in a virtual machine like QEMU and even use that to debug problems in ways that would have made a developer from the 1990s offer up their life savings.

We’ve seen this before, but we still appreciate the challenge. We wonder if you could write Pong in BootBasic?

Hackers Can’t Spend A Penny

We aren’t here to praise the penny, but rather, to bury it. The penny, and its counterparts, have been vanishing all around the world as the cost of minting one far outweighs its value. But hackers had already lost a big asset: real copper pennies, and now even the cheaply made ones are doomed to extinction.

If you check your pockets and find a pre-1982 penny, it’s almost all copper. Well, 95% of its slightly-more-than-3-gram heft is pure copper. Since then, the copper penny’s been a fraud, weighing 2.5 g and containing only a 2.5% copper plate over a zinc core. During WWII, they did make some oddball steel pennies, but that was just a temporary measure.

Continue reading “Hackers Can’t Spend A Penny”

Tech In Plain Sight: Pneumatic Tubes

Today, if you can find a pneumatic tube system at all, it is likely at a bank drive-through. A conversation in the Hackaday bunker revealed something a bit surprising. Apparently, in some parts of the United States, these have totally disappeared. In other areas, they are not as prevalent as they once were, but are still hanging in there. If you haven’t seen one, the idea is simple: you put things like money or documents into a capsule, put the capsule in a tube, and push a button. Compressed air shoots the capsule to the other end of the tube, where someone can reverse the process to send you something back.

These used to be a common sight in large offices and department stores that needed to send original documents around, and you still see them in some other odd places, like hospitals or pharmacy drive-throughs, where they may move drugs or lab samples, as well as documents. In Munich, for example, a hospital has a system with 200 stations and 1,300 capsules,  also known as carriers. Another medical center in Rotterdam moves 400 carriers an hour through a 16-kilometer network of tubes. However, most systems are much smaller, but they still work on the same principle.

Continue reading “Tech In Plain Sight: Pneumatic Tubes”

The King Of Rocket Photography

If you are a nerdy kid today, you have your choice of wondrous gadgets and time wasters. When we were nerdy kids, our options were somewhat limited: there was ham radio, or you could blow things up with a chemistry set. There were also model rockets. Not only were model rockets undeniably cool, but thanks to a company called Estes, you could find ready-to-go kits and gear that made it possible to launch something into the heavens, relatively speaking. But what about photographic proof? No live streams or digital cameras. But there was the Estes AstroCam 100. [Bill Engar] remembers the joy of getting film from your rocket developed.

Of course, photography was another nerdy kid staple, so maybe you did your own darkroom work. Either way, the Astrocam 110 was a big improvement over the company’s earlier Camroc. In 1965, if you wanted to fly Camroc, you had to cut a 1.5-inch piece of film in a darkroom and mount it just to get one terrible black-and-white photo. Or, you could buy the film canisters loaded if you had the extra money, which, of course, you didn’t.

Continue reading “The King Of Rocket Photography”

An AI By Any Other Name

While there are many AI programs these days, they don’t all work in the same way. Most large language model “chatbots” generate text by taking input tokens and predicting the next token of the sequence. However, image generators like Stable Diffusion use a different approach. The method is, unsurprisingly, called diffusion. How does it work? [Nathan Barry] wants to show you, using a tiny demo called tiny-diffusion you can try yourself. It generates — sort of — Shakespeare.

For Stable Diffusion, training begins with an image and an associated prompt. Then the training system repeatedly adds noise and learns how the image degenerates step-by-step to noise. At generation time, the model starts with noise and reverses the process, and an image comes out. This is a bit simplified, but since something like Stable Diffusion deals with millions of pixels and huge data sets, it can be hard to train and visualize its operation.

The beauty of tiny-diffusion is that it works on characters, so you can actually see what the denoising process is doing. It is small enough to run locally, if you consider 10.7 million parameters small. It is pretrained on Tiny Shakespeare, so what comes out is somewhat Shakespearean.

Continue reading “An AI By Any Other Name”

If It Ain’t Broke… Add Something To It

Given that we live in the proverbial glass house, we can’t throw stones at [ellis.codes] for modifying a perfectly fine Vornado fan. He’d picked that fan in the first place because, unlike most fans, it had a DC motor. Of course, DC motors are easier to control with a microcontroller, and next thing you know, it was sporting an ESP32 and a WiFi interface.

The original fan was surprisingly sparse inside. A power supply, of course, and just a tiny PCB for a speed control. Oddly, it looks like the speed control was just a potentiometer and a 24 V supply. It wasn’t clear if the “motor” had some circuitry in it to do PWM control or not. That seems likely, though.

Regardless, the project opted for a digital pot IC to maintain compatibility. One nice thing about the modification is that it replaces the existing board with the same connectors. So if you wanted to revert the fan to normal, you simply have to swap the boards back.

Now the fan talks to home automation software. Luckily, there’s still nothing wrong with it. We love seeing bespoke ESPHome projects. Even if your fan has WiFi, you might not like it communicating with Big Brother.

Precision Current Sources By The Numbers

It isn’t unusual to expect a precisely regulated voltage in an electronic project, but what about times when you need a precise current? Over on EDN, prolific [Stephen Woodward] explains how to use a precision Zener diode to get good results. [Stephen] takes you through the math for two topologies and another circuit that uses a pair of bipolar transistors.

You might wonder why you need a precise current source or sink. While it is nice to drive things like LEDs with a constant current, you probably don’t need ultra-precise currents. However, charging a capacitor with a constant current produces a very nice linear voltage ramp. When you use a resistor to bias collector current in a bipolar amplifier, you are just poorly imitating a constant current source, too. That’s just two of many examples.

Continue reading “Precision Current Sources By The Numbers”