Even Faster Fourier Transforms On The Raspbery Pi Zero

Oftentimes in computing, we start doing a thing, and we’re glad we’re doing it. But then we realise, it would be much nicer if we could do it much faster. [Ricardo de Azambuja] was in just such a situation when working with the Raspberry Pi Zero, and realised that there were some techniques that could drastically speed up Fast Fourier Transforms (FFT) on the platform. Thus, he got to work.

The trick is using the Raspberry Pi Zero’s GPU to handle the FFTs instead of the CPU itself. This netted Ricardo a 7x speed upgrade for 1-dimensional FFTs, and a 2x speed upgrade for 2-dimensional operations.

The idea was cribbed from work we featured many years ago, which provided a similar speed up to the very first Raspberry Pi. Given the Pi Zero uses the same SoC as the original Raspberry Pi but at a higher clock rate, this makes perfect sense. However, in this case, [Ricardo] implemented the code in Python instead of C as suits his use case.

[Ricardo] uses the code with his Maple Syrup Pi Camera project, which pairs a Coral USB machine learning accelerator with a Pi Zero and a camera to achieve tasks such as automatic licence plate recognition or facemask detection. Fun!

An AMD GPU plugged into an ATX PSU and Raspberry PI CM4

Raspberry Pi With Some Serious Graphical Muscle

[Jeff Geerling] routinely tinkers around with Raspberry Pi compute module, which unlike the regular RPi 4, includes a PCI-e lane. With some luck, he was able to obtain an AMD Radeon RX 6700 XT GPU card and decided to try and plug it into the Raspberry Pi 4 Compute Module.

While you likely wouldn’t be running games with such as setup, there are many kinds of unique and interesting compute-based workloads that can be offloaded onto a GPU. In a situation similar to putting a V8 on a lawnmower, the Raspberry Pi 4 pulls around 5-10 watts and the GPU can pull 230 watts. Unfortunately, the PCI-e slot on the IO board wasn’t designed with a power-hungry chip in mind, so [Jeff] brought in a full-blown ATX power supply to power the GPU. To avoid problems with differing ground planes, an adapter was fashioned for the Raspberry Pi to be powered from the PSU as well. Plugging in the card yielded promising results initially. In particular, Linux detected the card and correctly mapped the BARs (Base Address Register), which had been a problem in the past for him with other devices. A BAR allows a PCI device to map its memory into the CPU’s memory space and keep track of the base address of that mapped memory range.

AMD kindly provides Linux drivers for the kernel. [Jeff] walks through cross-compiling the kernel and has a nice docker container that quickly reproduces the built environment. There was a bug that prevented compilation with AMD drivers included, so he wasn’t able to get a fully built kernel. Since the video, he has been slowly wading through the issue in a fascinating thread on GitHub. Everything from running out of memory space for the Pi to PSP memory training for the GPU itself has been encountered.

The ever-expanding capabilities of the plucky little compute module are a wonderful thing to us here at Hackaday, as we saw it get NVMe boot earlier this year. We’re looking forward to the progress [Jeff] makes with GPUs. Video after the break.

Continue reading “Raspberry Pi With Some Serious Graphical Muscle”

A wall clock with exposed circuit boards

Drunk Wall Clock Uses Convoluted Circuits To Display Time

Here at Hackaday we can never get enough of odd clocks, and we’re delighted to see [Dan O’Shea]’s creation called the Wifi-Telnet-FPGA-NTSC Drunk Wall Clock. That mouthful is an accurate description of what it does: at the heart of the device is an ESP32 that uses WiFi to connect to a Raspberry Pi. It then telnets into the system, logs in, and requests the current time using the Linux date command. So far, so ordinary.

The “FPGA” part is where it gets weirder: the ESP32 is hooked up to a VGA1306 board. This is a little PCB with an FPGA that emulates an OLED display and outputs the image to a VGA connector. [Dan] could have simply hooked up a VGA display to this, but instead went for another layer of complexity by converting the VGA signal to something resembling composite video, using nothing more than three resistors. The resulting “NTSC” signal is then fed into a small TFT display that shows the time.

The clock got its “drunk” label because the process of repeatedly running the date command and parsing its output is slow and prone to hiccups, resulting in a display where the seconds advance in a somewhat unsteady manner. This fits well with the overall aesthetic of the clock, which consists of a heap of PCBs held together with cable ties and electrical tape. Mounted on a round panel of recycled wood, it makes a beautiful wall ornament for any hacker lab.

We love projects like this that accomplish a simple task in a convoluted way, and there’s no shortage of needlessly complicated clocks, whether physically drawing the time or using machine-learning data. But if you simply like your clocks with their electronics exposed, check out this free-form LED clock or this neat circuit sculpture clock.

Continue reading “Drunk Wall Clock Uses Convoluted Circuits To Display Time”

Dynamicland Makes The Whole Building The Computer

Every once is a while a research project comes along that has the potential to totally shake up computing and what it even means to interact with a system. The project Dynamicland.org, is a result of [Bret Victor]’s research journey over the years, looking into various aspects of human computer interaction and what it even means to think like a human.

One of the overhead projectors tied to a realbox
In Realtalk, paper is your programming medium

Dynamicland is an instantiation of a Realtalk ecosystem, deployed into a whole building. Tables are used as computing surfaces, with physical objects such as pieces of paper, notebooks, anything which can be read by one of the overhead cameras, becoming the program listing, as well as the user interface. The camera is associated with a projector, with the actual hardware hooked into so-called ‘Realboxes’ which are Linux machines running the Realtalk software. Separate Realboxes (and other hardware such as a Raspberry Pi, running Realtalk) are all federated together using the Realtalk protocol, which allows communication from hardware in the ceiling, to any on the desk, and also to other desks and computing surfaces.

Realtalk itself is described as an environment for authoring and using computation media. The Realtalk system provides a language extension to Lua. Together these form a domain-specific language. Realtalk is also a kind of reactive database, which means that the emphasis is on the flow of data and connections between data producing things, and data consuming things. For a bit more explanation of how reactive programming can be used with modern relational databases, check out this article on the subject.

For a good overview of how this works in practice, from a programming perspective, checkout [Omar Rizwan]’s article about his ‘Geokit’ project. Another interesting read is the work by [Andrés Cuervo.]

Continue reading “Dynamicland Makes The Whole Building The Computer”

Useless Machine Is A Clock

Useless machines are a fun class of devices which typically turn themselves off once they are switched on, hence their name. Even though there’s no real point, they’re fun to build and to operate nonetheless. [Burke] has followed this idea in spirit by putting an old clock he had to use with his take on a useless machine of sorts. But instead of simply powering itself off when turned on, this useless machine dislodges itself from its wall mount and falls to the ground anytime anyone looks at it.

It’s difficult to tell if this clock was originally broken when he started this project, or if many rounds of checking the time have caused the clock to damage itself, but either way this project is an instant classic. Powered by a small battery driving a Raspberry Pi, the single-board computer runs OpenCV and is programmed to recognize any face pointed in its general direction. When it does, it activates a small servo which knocks it off of its wall, rendering it unarguably useless.

[Burke] doesn’t really know why he had this idea, but it’s goofy and fun. The duct tape that holds everything together is the ultimate finishing touch as well, and we can’t really justify spending too much on fit and finish for a project that tosses itself around one’s room. On the other hand, if you’re looking for a more refined useless machine, we have seen some that have an impressive level of intricacy.

Thanks to [alchemyx] for the tip!

Continue reading “Useless Machine Is A Clock”

3d printed GLaDOS home assistant

GLaDOS Voice Assistant Passive-Aggressively Automates Home

With modern voice assistants we can tell a computer to play our favorite music, check the weather, or turn on a light. Like many of us, [nerdaxic] gave in to the convenience and perceived simplicity of various home automation products made by Google and Amazon. Also like many of us, he found it a bit difficult to accept the privacy implications that surround such cloud connected devices. But after selling his Home and Echo, [nerdaxic] missed the ability to control his smart home by voice command. Instead of giving in and buying back into the closed ecosystems he’d left behind, [nerdaxic] decided to open his home to a murderous, passive aggressive, sarcastic, slightly insane AI: GLaDOS, which you can see in action after the break.

Using open source designs from fellow YouTube creator [Mr. Volt], [nerdaxic] 3d printed as much of the GLaDOS animatronic model as he was able to, and implemented much of the same hardware to make it work. [nerdaxic] put more Open Source Software to use and has created a functional but somewhat limited home AI that can manage his home automation, give the weather, and tell jokes among other things. GLaDOS doesn’t fail to deliver some great one liners inspired by the original Portal games while heeding [nerdaxic]’s commands, either.

A ReSpeaker from Seeed Studio cleans up the audio sent to a Raspberry Pi 4, and allows for future expansion that will allow GLaDOS to look in the direction of the person speaking to it. With its IR capable camera, another enhancement will allow GlaDOS to stare at people as they walk around. That’s not creepy at all, right? [nerdaxic] also plans to bring speech-to-text processing in-house instead of the Google Cloud Speech-To-Text API used in its current iteration, and he’s made everything available on GitHub so that you too can have a villainous AI hanging on your every word.

Of course if having GLaDOS looming isn’t enough, you could always build a functional life size Portal turret or listen to the radio on your very own Portal Radio.

Continue reading “GLaDOS Voice Assistant Passive-Aggressively Automates Home”

Breadboard containing speech synthesis chip

RPi Python Library Has Retro Chiptunes And Speech Covered

The classic SP0256-AL2 speech chip has featured a few times on these pages, and if you’ve not seen the actual part before, you almost certainly have heard the resulting audio output. The latest Python library from prolific retrocomputing enthusiast [Nick Bild] brings the joy of the old chip to the Raspberry Pi platform, with an added extra trick; support for the venerable AY-3-8910 sound generator as well.

The SP0256-AL2 chip generates vaguely recognisable speech using the allophone system. Allophones are kind of like small chunks of speech audio which when reproduced sequentially, result in intelligible phonemes that form the basis of speech. The chip requires an external device to feed it the allophones at a regular rate, which is the job of his Gi-Pi library.

This speech synthesis technology is based on Linear-predictive coding, which is used to implement a human vocal tract model. This is the same coding method utilized by the first generation of GSM digital mobile phones, implementing a system known as Full-Rate. Both an LPC encoder and an LPC decoder are present on the handset. The LPC encoder takes audio in from the user, breaks it into the tiny constituent parts of speech, and then simply sends a code representing the audio block, but not the actual audio. Obviously there are a few more parameters sent as well to adjust the model at the receiving side. The actual decoding side is therefore not all that dissimilar to what the AY-3-8910 and related devices are doing, except you the user have to create the list of audio blocks up-front and feed the chip at the rate it demands.

Continue reading “RPi Python Library Has Retro Chiptunes And Speech Covered”