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”

Meet Me On My Rotary Phone

We suspect kids today — and some adults — are confused about phone terminology. In today’s world, “hanging up” and “dialing,” for example, are abstract words without the physical reference that older people remember. But some people have a soft spot for the old rotary dial phones, including [Stavros], who wired a rotary phone to his computer for use on online meetings. Check out the video below.

He took an old rotary phone and wanted to program a Raspberry Pi Zero to act as a sound card and a keyboard. That way, he could connect to the meeting by picking up the handset and disconnect by hanging up. He also planned to read the dial and convert that into keyboard input.

Continue reading “Meet Me On My Rotary Phone”

WWII Secret Agents For Science

We always enjoy [History Guy]’s musing on all things history, but we especially like it when his historical stories intersect with technology. A good example was his recent video about a small secret group during the Second World War that deployed to the European Theater of Operations, carrying out secret missions. How is that technology related? The group was largely made of scientists. In particular, the team of nineteen consisted of a geographer and an engineer. Many of the others were either fluent in some language or had been through “spy” training at the secret Military Intelligence Training Center at Camp Ritchie, Maryland. Their mission: survey Europe.

Continue reading “WWII Secret Agents For Science”

Cheap Multimeter Gets Webified

[Mellow Labs] wanted to grab a multimeter that could do Bluetooth. Those are cheap and plentiful, but the Bluetooth software was, unsurprisingly, somewhat lacking. A teardown shows a stock Bluetooth module. A quick search found a GitHub with software. But then he had a fiendish idea: could you replace the Bluetooth module with an ESP32 and use WiFi instead of Bluetooth?

This was as good an excuse as any to buy a cheap logic analyzer. Armed with some logic captures, it was easy to figure out how to fake the meter into thinking a Bluetooth client was connected.

Continue reading “Cheap Multimeter Gets Webified”

Morse Code For China

It is well known that pictographic languages that use Hanzi, like Mandarin, are difficult to work with for computer input and output devices. After all, each character is a tiny picture that represents an entire word, not just a sound. But did you ever wonder how China used telegraphy? We’ll admit, we had not thought about that until we ran into [Julesy]’s video on the subject that you can watch below.

There are about 50,000 symbols, so having a bunch of dots and dashes wasn’t really practical. Even if you designed it, who could learn it? Turns out, like most languages, you only need about 10,000 words to communicate. A telegraph company in Denmark hired an astronomer who knew some Chinese and tasked him with developing the code. In a straightforward way, he decided to encode each word from a dictionary of up to 10,000 with a unique four-digit number.

Continue reading “Morse Code For China”