New Part News: Raspberry Pi Cuts Out The Middleman

Raspberry Pi has just announced that they’ll be selling their RP2040 microcontroller chips by the reel, directly to you, at a decent discount.

About a year ago, Raspberry Pi released its first piece of custom silicon, the RP2040 microcontroller. They’ve have been selling these chips in bulk to selected customers directly, but have decided to open up the same deals to the general public. If you’re looking for 500 chips or more, you can cut out the middleman and save some serious dough.

Because the RP2040 was a clean-slate design, it uses a relatively modern production process that yields many more processors per silicon wafer, and it has been essentially spared from the chip crisis of 2020-2021. According to CEO Eben Upton, they’ve sold 1.5 million in a year, and have wafers in stock for 20 million more. You do the math, but unless you’re predicting the chip shortage to last in excess of 12 years, they’re looking good.

A pair of RP2040-based USB microphones

Mico Is A USB Microphone Based On A Pi Pico

When [Mahesh Venkitachalam] was experimenting with machine learning for audio applications on a Raspberry Pi, he found himself looking for a simple USB microphone. A cheap one was easy to find, but the sound quality and directionality left much to be desired. A large, studio-quality mic would be overkill, so [Mahesh] decided to simply build exactly what was needed: a compact, yet high-quality USB microphone that he called Mico.

The sensing device is a MEMS microphone that outputs a pulse density modulated (PDM) signal. There are chips available to directly interface such a microphone to a USB port, but [Mahesh] found them difficult to work with and therefore settled on something he knew already: the Raspberry Pi Pico platform. Luckily, someone had already figured out how to read out a microphone and present a USB device to a PC, so all that was needed was to put all the bits together into a convenient form factor.

The great thing about the Pico platform is that its main controller chip, the RP2040, is available as a separate component. [Mahesh] designed a sleek little PCB that holds the RP2040 along with the MEMS microphone and a USB connector. The end result looks tidy enough that it might have come out of a mass-produced gizmo. Those don’t usually come with full schematics and source code, but the Mico does: everything is available on its GitHub page for anyone to re-use and improve.

You can judge the sound quality for yourself in the video embedded below. If you like DIY USB microphones, you’re in luck: we’ve featured one based on an STM32 as well as a beautiful recreation of a studio-quality mic.

Continue reading “Mico Is A USB Microphone Based On A Pi Pico”

A Trackball So Good You Can’t Buy It

The projects we feature on Hackaday are built to all standards, and we’d have to admit that things have left our own benches as bundles of wire and tape. Sometimes we see projects built to such a high standard that we’re shocked that they aren’t a high-end manufactured product, such as [jfedor2]’s two-ball trackball project. It combines a pair of billiard balls and a couple of buttons with a beautifully-designed 3D-printed case that looks for all the world as though it came from a premium peripheral brand.

Inside are a pair of PMW3360 optical sensors on PCBs mounted with a view into the billiard ball sockets, and for which the brains come courtesy of an RP2040 microcontroller. There are five PCBs in all, each having a set of purpose-built stand-offs to hold it. The result appears to be about as good a trackball as you’d hope to buy, except of course that you can’t. All the files to make your own are in the GitHub repository though, so all is not lost.

Over the years we’ve brought you a variety of trackball designs, including at least one other build using a billiard ball.

Prepare For Wildfire Season With An Air Quality Monitor

For some reason, wildfire seasons in Australia, North America, and other places around the world seem to happen more and more frequently and with greater and greater fervor. Living in these areas requires special precautions, even for those who live far away from the fires. If you’re not sure if the wildfires are impacting your area or not, one of the tools you can build on your own is an air quality meter like [Costas Vav] shows us in this latest build.

The air quality indicator is based around an Adafruit Feather RP2040 which is in turn based on the 32-bit Cortex M0+ dual core processor. This makes for a quite capable processor in a small package, and helps accomplish one of the design goals of a rapid startup time. Another design goal was to use off-the-shelf components so that anyone could easily build one for themselves, so while the Feather is easily obtained the PMS5003 PM2.5 air quality sensor needed to be as well. From there, all of the components are wrapped up in an easily-printed enclosure and given a small (and also readily-available) OLED screen.

[Costas Vav] has made all of the files needed to build one of these available, from the bill of materials to the software running on the Pi-compatible board to the case designs. It’s a valuable piece of technology to have around even if you don’t live in fire-prone areas. Not only can wildfire smoke travel across entire continents but simple household activities such as cooking (especially with natural gas or propane) can decimate indoor air quality. You can see that for yourself with an army of ESP32-based air quality sensors.

Raspberry Pi Pico Used As A Transputer

You can’t fake that feeling when a $4 microcontroller dev board can stand in as cutting-edge 1980s technology. Such is the case with the working transputer that [Amen] has built using a Raspberry Pi Pico.

For a thorough overview of the transputer you should check out [Jenny List’s] longer article on the topic but boiled down we’re talking about a chip architecture mostly forgotten in time. Targetting parallel computing, each transputer chip has four serial communication links for connecting to other transputers. [Amen] has wanted to play with the architecture since its inception. It was expensive back then and today, finding multiple transputers is both difficult and costly. However, the RP2040 chip found on the Raspberry Pi Pico struck him as the perfect way to emulate the transputer design.

The RP2040 chip on the Pico board has two programmable input/output blocks (PIOs), each with four state machines in them. That matches up perfectly with the four transputer links (each is bi-directional so you need eight state machines). Furthermore, the link speed is spec’d at 10 MHz which is well within the Pico’s capabilities, and since the RP2040 runs at 133 MHz, it’s conceivable that an emulated core can get close to the 20 MHz top speed of the original transputers.

Bringing up the hardware has been a success. To see what’s actually going on, [Amen] sourced some link adapter chips (IMSC011), interfacing them through an Arduino Mega to a computer to use the keyboard and display. The transputer architecture allows code to be loaded via a ROM, or through the links. The latter is what’s running now. Future plans are to figure out a better system to compile code, as right now the only way is by running the original INMOS compiler on DOS in a VM.

Listen to [Amen] explain the project in the first of a (so far) six video series. You can find the links to the rest of those videos on his YouTube channel.

Continue reading “Raspberry Pi Pico Used As A Transputer”

New Video Series: Raspberry Pi Pico And RP2040 Deep Dive With Uri Shaked

In case you’ve been living under a rock that doesn’t have internet access, the Raspberry Pi Foundation got into the silicon sales and microcontroller game all at once this year with the Raspberry Pi Pico. It’s small, it’s capable, and it costs a measly $4. Surely you have one or two of them by now, right? But how much do you know about what it can do?

Or maybe you don’t have one yet, but it’s on your list. In either case, you can get started learning about them right away because [Uri Shaked]’s Raspberry Pi Pico and RP2040 Deep Dive course has recently been freed from the hallowed halls of HackadayU. He even built an emulator to go with it. [Uri] is a great instructor, and we’re sure that goes double if you ever need a salsa dance teacher, which he has also mastered.

This class was held for five weeks beginning in May 2021, with each session being roughly an hour long. The only prerequisite is a basic understanding of bitwise math, but there are resources for that on the class IO page linked above.

Each class is incredibly well-organized and informative. In the first class, [Uri] begins building a living document that includes the class agenda, links to all resources used and mentioned, code examples, and assembly instructions where applicable. It’s basically a syllabus plus a whole lot more. [Uri] also spends a lot of time in the incredibly thorough 649-page data sheet for the RP2040, and a little bit of time in the much shorter Getting Started guide. If you think the data sheet is inaccessible, you’ll likely change your tune by the end of the first class after you’ve seen [Uri] use and peruse it.

Continue reading “New Video Series: Raspberry Pi Pico And RP2040 Deep Dive With Uri Shaked”

Pi Pico Game Boy Flash Cart Gets Slim RP2040 Upgrade

The story for this one starts a few months ago, when [John Green] released his PICO-GB project. His code allowed the Raspberry Pi Pico to stand in for a Game Boy cartridge, complete with a simple text menu that let the user select between ROMs that had been baked into the microcontroller’s firmware. The project was particularly notable for the fact that it was entirely a software solution; while a custom breakout cartridge made for a handy temporary solution, you could have permanently wired the Pico’s pins directly to the Game Boy’s cartridge connector if you wanted to.

PICO-GB running on the full-size Pi Pico

Then in early June, the RP2040 chip that powers the Pi Pico went up for sale in single unit quantities. That opened up the possibility of building the PICO-GB functionality into a cartridge small enough to actually fit inside the Game Boy. So [Martin “HDR” Refseth] got to work creating the slick cartridge PCB you’re seeing now.

The RP2040 is joined by a trio of Texas Instruments TXB0108 level shifters, and there’s a spot for adding a SPI flash chip. The RP2040 supports a maximum of 16 MB of external flash, but given the size of Game Boy games were generally measured in kilobytes, that shouldn’t pose much of a problem.

Looking ahead, the original PICO-GB documentation mentions enhancements like loading ROMs from SD card, as well as hardware additions like a real-time-clock for the more advanced games that supported it. We assume those concepts will become part of [Martin]’s PCB eventually, but these are still early days.

We’ve seen Game Boy cartridge emulation with a microcontroller in the past, but we’re exited to see how the unique capabilities of the Raspberry Pi Foundation’s custom silicon can improve the state-of-the-art.

[Thanks to Itay for the tip.]