Training A Transformer With 1970s-era Technology

Although generative language models have found little widespread, profitable adoption outside of putting artists out of work and giving tech companies an easy scapegoat for cutting staff, their their underlying technology remains a fascinating area of study. Stepping back to the more innocent time of the late 2010s, before the cultural backlash, we could examine these models in their early stages. Or, we could see how even older technology processes these types of machine learning algorithms in order to understand more about their fundamentals. [Damien Boureille] has put a 60s-era IBM as well as a PDP-11 to work training a transformer algorithm in order to take a closer look at it.

For such old hardware, the task [Damien Boureille] is training his transformer to do is to reverse a list of digits. This is a trivial problem for something like a Python program but much more difficult for a transformer. The model relies solely on self-attention and a residual connection. To fit within the 32KB memory limit of the PDP-11, it employs fixed-point arithmetic and lookup tables to replace computationally expensive functions. Training is optimized with hand-tuned learning rates and stochastic gradient descent, achieving 100% accuracy in 350 steps. In the real world, this means that he was able to get the training time down from hours or days to around five minutes.

Not only does a project like this help understand these tools, but it also goes a long way towards demonstrating that not every task needs a gigawatt datacenter to be useful. In fact, we’ve seen plenty of large language models and other generative AI running on computers no more powerful than an ESP32 or, if you need slightly more computing power, on consumer-grade PCs with or without GPUs.

Line Power With No Transformer

Normally, when you want a low DC voltage from the AC line, you think about using a transformer of some kind. [RCD66] noticed that an AC monitor meter must have some sort of power supply but had no transformers in sight. That led to an exploration of how those work and how you can use them, too. You can watch the work in the video below.

Sensibly, there is a transformer in the test setup — an isolation transformer to make it safe to probe the circuit. But there’s no transformer providing voltage changes. Isolation is important even if you are taking apart something commercial that might be trasformerless.

The circuit is simple enough: it uses a capacitor, a resistor, and a pair of diodes (one of them a zener diode). He uses this basic circuit to drive simple regulators with input and output filter capacitors. We’ve seen many variations on this design over the years.

You can’t draw a lot of power through this arrangement. But sometimes it is all you need. However, this is pretty dangerous, as we’ve discussed before. Be sure you understand exactly what the risks are before you decide to build something like this.

Continue reading “Line Power With No Transformer”

Schematic of a circuit

Hacking Flux Paths: The Surprising Magnetic Bypass

If you think shorting a transformer’s winding means big sparks and fried wires: think again. In this educational video, titled The Magnetic Bypass, [Sam Ben-Yaakov] flips this assumption. By cleverly tweaking a reluctance-based magnetic circuit, this hack channels flux in a way that breaks the usual rules. Using a simple free leg and a switched winding, the setup ensures that shorting the output doesn’t spike the current. For anyone who is obsessed with magnetic circuits or who just loves unexpected engineering quirks, this one is worth a closer look.

So, what’s going on under the hood? The trick lies in flux redistribution. In a typical transformer, shorting an auxiliary winding invites a surge of current. Here, most of the flux detours through a lower-reluctance path: the magnetic bypass. This reduces flux in the auxiliary leg, leaving voltage and current surprisingly low. [Sam]’s simulations in LTspice back it up: 10 V in yields a modest 6 mV out when shorted. It’s like telling flux where to go, but without complex electronics. It is a potential stepping stone for safer high-voltage applications, thanks to its inherent current-limiting nature.

The original video walks through the theory, circuit equivalences, and LTspice tests. Enjoy!

Continue reading “Hacking Flux Paths: The Surprising Magnetic Bypass”

Investigating Electromagnetic Magic In Obsolete Machines

Before the digital age, when transistors were expensive, unreliable, and/or nonexistent, engineers had to use other tricks to do things that we take for granted nowadays. Motor positioning, for example, wasn’t as straightforward as using a rotary encoder and a microcontroller. There are a few other ways of doing this, though, and [Void Electronics] walks us through an older piece of technology called a synchro (or selsyn) which uses a motor with a special set of windings to keep track of its position and even output that position on a second motor without any digital processing or microcontrollers.

Synchros are electromagnetic devices similar to transformers, where a set of windings induces a voltage on another set, but they also have a movable rotor like an electric motor. When the rotor is energized, the output windings generate voltages corresponding to the rotor’s angle, which are then transmitted to another synchro. This second device, if mechanically free to move, will align its rotor to match the first. Both devices must be powered by the same AC source to maintain phase alignment, ensuring their magnetic fields remain synchronized and their rotors stay in step.

While largely obsolete now, there are a few places where these machines are still in use. One is in places where high reliability or ruggedness is needed, such as instrumentation for airplanes or control systems or for the electric grid and its associated control infrastructure. For more information on how they work, [Al Williams] wrote a detailed article about them a few years ago.

Continue reading “Investigating Electromagnetic Magic In Obsolete Machines”

Hackaday Links Column Banner

Hackaday Links: January 26, 2025

Disappointing news this week for those longing for same-hour Amazon delivery as the retail giant tapped the brakes on its Prime Air drone deliveries. The pause is partially blamed on a December incident at the company’s Pendleton, Oregon test facility, where two MK30 delivery drones collided in midair during light rain conditions. A Bloomberg report states that the crash, which resulted in one of the drones catching fire on the ground, was due to a software error related to the weather. As a result, they decided to ground their entire fleet, which provides 60-minute delivery to test markets in Arizona and Texas, until a software update can be issued.

Continue reading “Hackaday Links: January 26, 2025”

Open-Source Robot Transforms

Besides Pokémon, there might have been no greater media franchise for a child of the 90s than the Transformers, mysterious robots fighting an intergalactic war but which can inexplicably change into various Earth-based object, like trucks and airplanes. It led to a number of toys which can also change shapes from fighting robots into various ordinary objects as well. And, perhaps in a way of life imitating art, plenty of real-life robots have features one might think were inspired by this franchise like this transforming quadruped robot.

Called the CYOBot, the robot has four articulating arms with a wheel at the end of each. The arms can be placed in a wide array of positions for different operating characteristics, allowing the robot to move in an incredibly diverse way. It’s based on a previous version called the CYOCrawler, using similar articulating arms but with no wheels. The build centers around an ESP32-S3 microcontroller, giving it plenty of compute power for things like machine learning, as well as wireless capabilities for control or access to more computing power.

Both robots are open source and modular as well, allowing a range of people to use and add on to the platform. Another perk here is that most parts are common or 3d printed, making it a fairly low barrier to entry for a platform with so many different configurations and options for expansion and development. If you prefer robots without wheels, though, we’d always recommend looking at Strandbeests for inspiration.

Electrical Steel: The Material At The Heart Of The Grid

When thoughts turn to the modernization and decarbonization of our transportation infrastructure, one imagines it to be dominated by exotic materials. EV motors and wind turbine generators need magnets made with rare earth metals (which turn out to be not all that rare), batteries for cars and grid storage need lithium and cobalt, and of course an abundance of extremely pure silicon is needed to provide the computational power that makes everything work. Throw in healthy pinches of graphene, carbon fiber composites and ceramics, and minerals like molybdenum, and the recipe starts looking pretty exotic.

As necessary as they are, all these exotic materials are worthless without a foundation of more familiar materials, ones that humans have been extracting and exploiting for eons. Mine all the neodymium you want, but without materials like copper for motor and generator windings, your EV is going nowhere and wind turbines are just big lawn ornaments. But just as important is iron, specifically as the alloy steel, which not only forms the structural elements of nearly everything mechanical but also appears in the stators and rotors of motors and generators, as well as the cores of the giant transformers that the electrical grid is built from.

Not just any steel will do for electrical use, though; special formulations, collectively known as electrical steel, are needed to build these electromagnetic devices. Electrical steel is simple in concept but complex in detail, and has become absolutely vital to the functioning of modern society. So it pays to take a look at what electrical steel is and how it works, and why we’re going nowhere without it.

Continue reading “Electrical Steel: The Material At The Heart Of The Grid”