Pi Pico Powers Parts-Bin Audio Interface

USB audio is great, but what if you needed to use it and had no budget? Well, depending on the contents of your parts bin, you might be able to use [Veyniac]’s Pico-Audio-Interface as a free (and libre! It’s GPL3.0) sound capture device.

In the project’s Reddit thread, [Veyniac] describes needing audio input for his homemade synth, but having no budget. Necessity being the mother of invention, rather than beg borrow or steal a device with a working sound card, he hacked together this lovely device. It shows up as a USB Audio Class 2.0 device so should work with just about anything, and offers 12-bit resolution and 4x oversampling to try and deal with USB noise with its 2-channel, 44.1 kHz sample rate.

Aside from the Pico, all you need is an LM324 op-amp IC and a handful of resistors and capacitors — [Veyniac] estimates about $10 to purchase the whole BOM. He claims that the captured audio sounds okay in his use, but can’t guarantee it will  be for anyone else, noise being the fickle beast that it is. We figure that sounding “Okay” has got to be pretty good, given that you usually get what you pay for — and again, [Veyniac] did build this in a cave with a box of scraps. Well, except for the cave part. Probably.

While the goal here was not to rival a commercial USB sound card, we have seen projects to do that. We’re quite grateful to [Omadeira] for the tip, because this really is a hack. If you, too, want a share of our undying gratitude (which is still worth its weight in gold, despite fluctuations in the spot price of precious metals), send in a tip of your own.

Screenshot of Pi Pico RMBK simulator

Fission Simulator Melts Down RP2040

We’ve seen a lot of projects based on the Pi Pico, but a nuclear reactor simulation is a new one. This project was created by [Andrew Shim], [Tyler Wisniewski] and another group member for Cornell’s ECE 4760 class on embedded design (which should silence naysayers who think the Pi Pico can’t be a “serious” microcontroller), and simulates the infamous soviet RMBK reactor of Chernobyl fame. 

The simulation uses a 4-bit color VGA model. The fission model includes uranium fuel, water, graphite moderator, control rods and neutrons. To simplify the math, all decayed materials are treated identically as non-fissile, so no xenon poisoning is going to show up, for example. You can, however, take manual control to both scram the reactor and set it up to melt down with the hardware controller.

The RP2040’s dual-core nature comes in handy here: one core runs the main simulation loop, and the main graphic on the top of the VGA output; the other core generates the plots on the bottom half of the screen, and the Geiger-counter sound effect, and polls the buttons and encoders for user input. This is an interesting spread compared to the more usual GPU/CPU split we see on projects that use the RP2040 with VGA output.

An interesting wrinkle that has been declared a feature, not a bug, by the students behind this project, is that the framebuffer cannot keep up with all the neutrons in a meltdown simulation. Apparently the flickering and stuttering of frame-rate issues is “befitting of the meltdown scenario”. The idea that ones microcontroller melts down along with the simulated reactor is rather fitting, we agree. Check it out in a full walkthrough in the video below, or enjoy the student’s full writeup at the link above.

This project comes to us via Cornell University’s ECE 4760 course, which we’ve mentioned before. Thanks to [Hunter Adams] for the tipoff. You may see more student projects in the coming weeks.

 

Fujitsu Proprietary Keyboard Goes PS/2 With A Pico

One of our favorite retro-computing YouTubers, [Clint] from LGR, found himself a very interesting Fujitsu keyboard while thrift store shopping. It was a beautiful unit, but confusing, as this keyboard comes with an 8-pin DIN connector. A 5-pin DIN plug or 6-pin Mini-DIN would be easy to work with, but what was this odd connection? Turns out the Fujitsu N860-2500-T111 came with an Olympus CV-100 Video Processor, which was designed for medical imaging, potentially among other uses. And as often happened with old specialized hardware, the keyboard used a proprietary protocol for sending keystrokes.

[Clint] put out a call for anyone that could help him build an adapter, and [Andy] from Element14 answered the call. But this problem requires more than an adapter, mainly because the Fujitsu doesn’t have key rollover. It’s one key at a time, and that just doesn’t work for the sort of things [Clint] shows off on LGR. So, the electronic guts of the keyboard were removed, to be replaced with a Raspberry Pi Pico, wired directly to the keyboard matrix.

Continue reading “Fujitsu Proprietary Keyboard Goes PS/2 With A Pico”

The Pi Pico board on top of a white box with an Ethernet jack, with a sensor module plugged onto the Pico's pin headers. A black MicroUSB and a green Ethernet cable are connected to this device.

An Elegant Ethernet Library For Your Next RP2040 Project

A few days ago we covered a project that brought Ethernet connectivity to the Raspberry Pi Pico using little more than some twisted pair and a RJ-45 connector. It was a neat trick, but not exactly ready for widespread adoption. Looking to improve on things a bit, [tvlad1234] has taken that project’s code and rewritten it into a friendly library you can use with any RP2040 board.

In case you missed it, the initial demo did 10BASE-T transmission by bit-banging with the PIO, and was able to send UDP messages to devices on the wired LAN. It was an impressive accomplishment, but its code didn’t make it easy to build your project around it. This new library makes UDP messaging as easy as a printf, offloading all non-PIO-managed Ethernet signal work onto the RP2040’s second CPU core. The library even generates a random MAC address out of your flash chip’s serial number!

As a demonstration of the new library, [tvlad1234] has put together a simple Ethernet-connected temperature monitor using the BMP085 or BMP180 sensor connect over I2C. If you feel like you could use an Ethernet transmit-only sensor in your life, browsing the source code would be a great start.

Bit-Banged Ethernet On The Raspberry Pi Pico

Whilst the Raspberry Pi RP2040 is quite a capable little chip, on the whole it’s nothing really special compared to the big brand offerings. But, the PIO peripheral is a bit special, and its inclusion was clearly a masterstroke of foresight, because it has bestowed the platform all kinds of capabilities that would be really hard to do any other way, especially for the price.

Our focus this time is on Ethernet, utilizing the PIO as a simple serialiser to push out a pre-formatted bitstream. [kingyo] so far has managed to implement the Pico-10BASE-T providing the bare minimum of UDP transmission (GitHub project) using only a handful of resistors as a proof of concept. For a safer implementation it is more usual to couple such a thing magnetically, and [kingyo] does show construction of a rudimentary pulse transformer, although off the shelf parts are obviously available for this. For the sake of completeness, it is also possible to capacitively couple Ethernet hardware (checkout this Micrel app note for starters) but it isn’t done all that much in practice.

Inside the expedient pulse transformer.

UDP is a simple Ethernet protocol for transferring application data. Being connection-less, payload data are simply formatted into a packet buffer up front. This is all fine, until you realize that the packets are pretty long and the bitrate can be quite high for a low-cost uC, which is why devices with dedicated Ethernet MAC functionality have a specific hardware serialiser-deserialiser (SERDES) block just for this function.

Like many small uC devices, the RP2040 does not have a MAC function built in, but it does have the PIO, and that can easily be programmed to perform the SERDES function in only a handful of lines of code, albeit only currently operating at 10 MBit/sec. This will cause some connectivity problems for modern switch hardware, as they will likely no longer support this low speed, but that’s easily solved by snagging some older switch hardware off eBay.

As for the UDP receive, that is promised for the future, but for getting data out of a remote device over a wired network, Pico-10BASE-T is a pretty good starting point. We’ve seen a few projects before that utilize the PIO to generate high speed signals, such as DVI, albeit with a heavy dose of overclocking needed. If you want a bit more of an intro to all things Pico, you could do worse than check out this video series we highlighted a while back.

Self-Hosted Pi Pico Development

Older readers and those with an interest in retrocomputing may remember the days when a computer might well have booted into a BASIC interpreter. It was simultaneously a general purpose device that could run any software it would load, and also a development environment. Not something that can be said for today’s development boards which typically require a host computer on which to write code. Have we lost something along the way? Perhaps an answer to that question can be found in [lurk101]’s self-hosted development environment for the Raspberry Pi Pico.

It presents itself as a shell, with a flash file system, a port of the vi editor, and a C compiler. We might think of vi as being more at home on a UNIX-derived system, but in this case it’s a port of the vi included in BusyBox. Meanwhile the compiler comes from amacc project.

Of course, this still requires a terminal of some type which in practice will mean a host computer. But the feat is nevertheless an interesting one, and we can see that it might not be impossible given the Pico’s surprising versatility to being some of the terminal features onto the chip itself.

It’s worth noting that this isn’t the first attempt we’ve seen to put a command line interface on a development board.

IOT Garage Door Opener Makes For Excellent Beginner IOT Project

If you live in a home with a garage door opener, you may have experienced one or more inevitable moments. You pull up to your home, you press the button on the garage door opener, and… nothing. Or you can’t find the garage door opener. Or you have to mash the button repeatedly to get a response. Or… you get the idea. Thanks to [Core Electronics] however, you now have the basis for using a much better device to control your own garage door: Your phone. You can see the tutorial on the web or in video format below the break.

[Michael] at [Core electronics] was tired of dealing with the inconsistencies and inconveniences of a poorly built remote for his garage door opener. When he inspected the controller board on the garage door opener itself, he found that it was already configured to allow three buttons to be connected: Up, Down, and Stop. Continue reading “IOT Garage Door Opener Makes For Excellent Beginner IOT Project”