Raspberry Pi RP2040: Hands-On Experiences From An STM32 Perspective

The release of the Raspberry Pi Foundation’s Raspberry Pi Pico board with RP2040 microcontroller has made big waves these past months in the maker community. Many have demonstrated how especially the two Programmable I/O (PIO) state machine peripherals can be used to create DVI video generators and other digital peripherals.

Alongside this excitement, it raises the question of whether any of this will cause any major upheaval for those of us using STM32, SAM and other Cortex-M based MCUs. Would the RP2040 perhaps be a valid option for some of our projects? With the RP2040 being a dual Cortex-M0+ processor MCU, it seems only fair to put it toe to toe with the offerings from one of the current heavyweights in the 32-bit ARM MCU space: ST Microelectronics.

Did the Raspberry Pi Foundation pipsqueak manage to show ST’s engineers how it’s done, or should the former revisit some of their assumptions? And just how hard is it going to be to port low-level code from STM32 to RP2040? Continue reading “Raspberry Pi RP2040: Hands-On Experiences From An STM32 Perspective”

Making Minty Fresh Music With Markov Chains: The After Eight Step Sequencer

Step sequencers are fantastic instruments, but they can be a little, well, repetitive. At it’s core, the step sequencer is a pretty simple device: it loops through a series of notes or phrases that are, well, sequentially ordered into steps. The operator can change the steps while the sequencer is looping, but it generally has a repetitive feel, as the musician isn’t likely to erase all of the steps and enter in an entirely new set between phrases.

Enter our old friend machine learning. If we introduce a certain variability on each step of the loop, the instrument can help the musician out a bit here, making the final product a bit more interesting. Such an instrument is exactly what [Charis Cat] set out to make when she created the After Eight Step Sequencer.

The After Eight is an eight-step sequencer that allows the artist to set each note with a series of potentiometers (which are, of course, housed in an After Eight mint tin). The potentiometers are read by an Arduino, which passes MIDI information to a computer running the popular music-oriented visual programming language Max MSP. The software uses a series of Markov Chains to augment the musician’s inputted series of notes, effectively working with the artist to create music. The result is a fantastic piece of music that’s different every time it’s performed. Make sure to check out the video at the end for a fantastic overview of the project (and to hear the After Eight in action, of course)!

[Charis Cat]’s wonderful creation reminds us of some the work [Sara Adkins] has done, blending human performance with complex algorithms. It’s exactly the kind of thing we love to see at Hackaday- the fusion of a musician’s artistic intent with the stochastic unpredictability of a machine learning system to produce something unique.

Thanks to [Chris] for the tip!

Continue reading “Making Minty Fresh Music With Markov Chains: The After Eight Step Sequencer”

Magic Pyramids Blink Eternal With The Power Of The Sun

Without knowing it, we’ve spent years watching [Jasper Sikken] piece together an empire of energy harvesting equipment, and now he’s putting the pieces together into wonderful creations. His recently finished solar harvesting pyramids are mesmerizing objects of geometric perfection we’d love to see glinting in the sun.

These solar harvesting pyramids are well described by their name. Each one contains a PCBA around 30mm on a side with a solar energy harvester built around the dedicated AEM10941 IC, a single solar cell, and a very bright green LED. [Jasper] calculates that the solar cell will charge the super capacitor at 20uA at with just 200 lux of light (a level typical for casual indoor spaces) letting it run indefinitely when placed indoors. Amazingly with the LED blinking for 15ms every 2 seconds it will run for 21 days in complete darkness. And that’s it! This is a software-free piece of hardware which requires no input besides dim light and blinks an LED indefinitely.

Small PCBA, large capacitor

What about that super capacitor? It’s called a Lithium Ion Capacitor (LIC) and is a hybrid between a typical rechargeable lithium battery and an electrolytic capacitor, offering extremely high capacity in a convenient two leg through hole form factor. This one is a whopping 30 Farad at 3.8 V, and we first saw it when [Jasper] won the Hackaday Earth Day contest last month. Check out that link if you want to know more about their uses and how to integrate them.

For more detail about all of the components of the solar pyramid we need only turn to the Hackaday archives. In December 2019 [Tom Nardi] wrote about building a cheap degassing system for making some very familiar looking resin pyramids. And before that [Donald Papp] brought us another familiar piece of the pyramid when he wrote up a different 1″ x 1″ solar harvesting system that [Jasper] designed.

Check out the video after the break to see what one of these gems looks like from all sides. And for many more experiments leading up the final pyramid check out the logs on the Hackaday.io page.

Continue reading “Magic Pyramids Blink Eternal With The Power Of The Sun”

Otters Deliver A High Power Stationary Audio Experience

Our favorite raft of otters is back at it again with another display of open source audio prowess as they bring us the OtterCastAmp, the newest member of the OtterCast family of open source audio multitools. If you looked at the previous entry in the series – the OtterCastAudio – and thought it was nice but lacking in the pixel count or output power departments then this is the device for you.

The Amp is fundamentally a very similar device to the OtterCastAudio. It shares the same Allwinner S3 Cortex-A application processor and runs the same embedded Linux build assembled with Buildroot. In turn it offers the same substantial set of features and audio protocol support. It can be targeted by Snapcast, Spotify Connect or AirPlay if those are your tools of choice, or act as a generic PulseAudio sink for your Linux audio needs. And there’s still a separate line in so it source audio as well.

One look at the chassis and it’s clear that unlike the OtterCastAudio this is not a simple Chromecast Audio replacement. The face of the OtterCastAmp is graced by a luscious 340×800 LCD for all the cover art your listening ear can enjoy. And the raft of connectors in the back (and mountain of inductors on the PCBA) make it clear that this is a fully fledged class D amplifier, driving up to 120W of power across four channels. Though it may drive a theoretical 30W or 60W peak across its various outputs, with a maximum supply power of 100W (via USB-C power delivery, naturally) the true maximum output will be a little lower. Rounding out the feature set is an Ethernet jack and some wonderfully designed copper PCB otters to enjoy inside and out.

As before, it looks like this design is very close to ready for prime time but not quite there yet, so order at your own risk. Full fab files and some hints are linked in the repo mentioned above. If home fabrication is a little much it looks like there might be a small manufacturing run of these devices coming soon.

The ARMv9 ISA, And What It Can Do For You

The number of distinct ARM Instruction Set Architectures (ISA) versions has slowly increased, with Arm adding a new version every few years. The oldest ISA version in common use today is ARMv6, with the ARMv6 ISA (ARM11) found in the original Raspberry Pi SBC and Raspberry Pi Zero (BCM2835). The ARMv6 ISA was introduced in 2002, followed by ARMv7 in 2005 (start of Cortex-A series) and ARMv8 in 2011. The latter was notable for adding 64-bit support.

With ARMv7 being the first of the Cortex cores, and ARMv8 adding 64-bit support in the form of AArch64, what notable features does ARMv9 bring to the table? As announced earlier this year, ARMv9’s focus appears to be on adding a whole host of features that should improve vector processing (vector extensions, or SVE) as well as digital signal processing (DSP) and security, with its Confidential Compute Architecture (CCA).

In addition to this, ARMv9 also includes all of the features that were added with ARMv8.1, v8.2, v8.3 and so on. In essence, this makes an ARMv9-based processor theoretically capable of going toe-to-toe with the best that Intel and AMD have to offer.

Continue reading “The ARMv9 ISA, And What It Can Do For You”

Forth Module The Size Of A Stick Of Gum

Australian engineer [John Catsoulis] developed a small module called the Scamp2 dedicated to running Forth. The focus of his Udamonic project was not only to highlight Forth, but to make a module which was easy to use and doesn’t require any IDE on your computer. According to the website, these modules have found their niche in education as well as rapid prototyping for product development. His site has some good resources, including several Scamp/Forth example applications such as a model train controller or adding a real-time clock module.

The core of the module is a Microchip PIC24F64GB202 MCU with 64K Flash and 8K RAM. Of this, Forth takes up only 20K of Flash and 2K of RAM. [John] is using FlashForth, a version of Forth which came from [Mikael Nordman] at the University of Queensland almost ten years ago. FlashForth has been implemented on a wide variety of PIC and AVR ATmega processors and has apparently developed quite a following in Australia and elsewhere.

We estimate from the photo that the Scamp is about 80 mm long, just slightly longer than a standard piece of MIL-A-A-20175A Type II chewing gum ( 73 mm ). You can use it as-is, or with the header pins installed, the Scamp can be plugged into a breadboard for easy hacking. Regarding the interfacing of Scamp to other equipment, [John] says “Writing software to use other hardware is very easy, and fun.” We like his attitude.

Here is some more information from his Hackaday.io project page, and he also has a Tindie site. If you want a good overview of using Forth in embedded systems, check out Forth: The Hacker’s Language by our own Forth-guru [Elliot Williams]. Thanks to [Stephen Walters] for sending in the tip.

Continue reading “Forth Module The Size Of A Stick Of Gum”

[Ken Shirriff] Picks Apart Mystery Chip From Twitter Photo

It’s no secret that the work of [Ken Shirriff] graces the front pages of Hackaday quite frequently. He’s back again, this time reverse engineering a comparator chip from a photo on Twitter. The mysterious chip was decapped, photographed under a microscope, and subsequently posted on the internet with an open call to figure out what it did.

[Ken] stepped up, and at first glance, it was obvious that most of the chip is unused, and there appeared to be four copies of the same circuit. After identifying resistors and the different transistor types, [Ken] found differential pairs.

Differential pairs form the heart of most op-amps, and by chaining them together, you can get a strong enough signal to treat it as a logic signal. Based on the design and materials, [Ken] estimates the chip is from the 1970s. Given that it appears to be ECL (Emitter-Coupled Logic), it could just be four comparators. But there are still a few things that don’t add up as two comparators have additional inverted outputs. Searching the part number offered few if any clues, so this will remain somewhat a mystery.

We’ve covered [Ken’s] incredible chip sleuthing before here, such as the Sharp EL-8 from 1969.