Pitch Sequencer Turns Tascam Tape Deck Into Instrument

The cool thing about magnetic tape is that by varying the speed at which you play it back, you can vary the pitch of the output. [Issac] decided to take advantage of this, executing a fancy digitally-controlled pitch mod on his Tascam Porta 02 tape deck.

The build uses a Raspberry Pi Pico, which employs PWM to control the speed of the tape drive’s motor. This is achieved with the use of an NPN transistor driven by the PWM output of the Pico. This allows accurate control of motor speed, and thus pitch.

With that sorted out, the project was fleshed out with an OLED screen and a rotary encoder. These allow various patches or scripts to be run on the Pico, controlling the motor speed of the tape player in various ways. With a bit of work, [Issac] was also able to create a function that converted MIDI note values into PWM values that determine various motor speeds.

The natural thing to do next was to put in a tape with a looping sample at a set pitch, and then vary it in a sequence controlled by the Pico. The 8 steps of the sequence can be manually set with the rotary control, and in future, [Issac] even plans to add a real MIDI input, allowing the system to act as a monophonic synth.

If you prefer other routes to pitch shifting shenanigans, check out this project. Video after the break.

Continue reading “Pitch Sequencer Turns Tascam Tape Deck Into Instrument”

A square PCB with a Raspberry Pi Pico mounted in the middle

Identify Radioactive Samples With This DIY Gamma-Ray Spectrometer

If you’re a radiation enthusiast, chances are you’ve got a Geiger counter lying around somewhere. While Geiger counters are useful to detect the amount of radiation present, and with a few tricks can also distinguish between the three types of radiation (alpha, beta and gamma), they are of limited use in identifying radioactive materials. For that you need a different instrument called a gamma-ray spectrometer.

Spectrometers are usually expensive and complex instruments aimed at radiation professionals. But it doesn’t have to be that way: physics enthusiast [NuclearPhoenix] has designed a hand-held gamma spectrometer that’s easy to assemble and should fit in a hobbyist budget. It outputs spectral plots that you can compare with reference data to identify specific elements.

A PCB with a sensor wrapped in black tape
The scintillator and sensor are wrapped in black tape to block out ambient light.

The heart of the device is a scintillation crystal such as thallium-doped sodium iodide which converts incoming gamma rays into visible light. The resulting flashes are detected by a silicon photomultiplier whose output is amplified and processed before being digitized by a Raspberry Pi Pico’s ADC. The Pico calculates the pulses’ spectrum and generates a plot that can be stored on its on-board flash or downloaded to a computer.

[NuclearPhoenix] wrote a convenient program to help analyze the output data and made all design files open-source. The hardest part to find will be the scintillation crystal, but they do pop up on auction sites like eBay now and then. We’ve featured an Arduino-based gamma spectrometer before; if you’ve always wanted to roll your own scintillators, you can do that too. Continue reading “Identify Radioactive Samples With This DIY Gamma-Ray Spectrometer”

A Pi Pico connected to a MYIR Z-turn board with a set of jumper wires

Need A JTAG Adapter? Use Your Pico!

JTAG is a powerful interface for low-level debugging and introspection of all kinds of devices — CPUs, FPGAs, MCUs and a whole lot of complex purpose-built chips like RF front-ends. JTAG adapters can be quite obscure, or cost a pretty penny, which is why we’re glad to see that [Adam Taylor] from [ADIUVO] made a tutorial on using your Pi Pico board as a JTAG adapter. This relies on a project called XVC-Pico by [Dhiru Kholia], and doesn’t require anything other than a Pi Pico board itself — the XVC-Pico provides both a RP2040 firmware implementing the XVC (Xilinx Virtual Cable) specification and a daemon that connects to the Pico board and interfaces to tools like Vivado.

First part of the write-up is dedicated to compiling the Pico firmware using a Linux VM. There’s a pre-built .uf2 binary available in the GitHub repo, however, so you don’t have to do that. Then, he compiles and runs a daemon on the PC where the Pico is connected, connects to that daemon through Vivado, and shows successful single-stepping through code on a MYIR Z-turn board with a Xilinx XC7Z020. It’s worth remembering that, if your FPGA’s (or any other target’s) JTAG logic levels are 1.8V or 2.5V-based, you will need a level shifter between it and the Pi Pico, which is a board firmly in the 3.3V realm.

You just cannot beat the $3 price and the ease of setup. Pi Pico is shaping up to be more and more of a hardware multi-tool. Just a month ago, we covered how the Pico can work as a logic analyzer. A lot of that, we have the PIO peripherals to thank for — an assembly of state machines that even let you “bitbang” high-speed interfaces like DVI. If you’re interested in how PIO functions, there are some good write-ups around here. Lacking a Pi Pico, you can use this board’s bigger sister to interface with JTAG, too.

OpenMower: Open Source Robotic Lawn Mower With RTK GPS

Robotic mowers are becoming a common sight in some places, enabled by the cost of motors and the needed control electronics being much lower, thanks to the pace of modern engineering. But, in many cases, they still appear to be really rather dumb, little more than a jacked up bump-and-go with a spinning blade. [Clemens Elflein] has taken a cheap, dumb mower and given it a brain transplant based around a Raspberry Pi 4 paired up with a Raspberry Pi Pico for the real time control side of things. [Clemens] is calling this OpenMower, with the motivation to create an open source robot mower controller with support for GPS navigation, using RTK for extra precision.

The donor robot was a YardForce Classic 500, and after inspection of the control PCB, it looks like many other robot mower models are likely to use the same controller and thus be compatible with the openmower platform. A custom mainboard houses the Pi 4 and Pico, an ArduSimple RTK GPS module (giving a reported navigational accuracy of 1 cm,) as well as three BLDC motor drivers for the wheels and rotor. Everything is based on modules, plugging into the mainboard, reducing the complexity of the project significantly. For a cheap mower platform, the Yardforce unit has a good build quality, with connectors everywhere, making OpenMower a plug and play solution. Even the user interface on top of the mower was usable, with a custom PCB below presenting some push buttons at the appropriate positions.

OpenMower mainboard

Motor control is courtesy of the xESC project, which provides FOC motor control for low cost, interfacing with the host controller via a serial link. This is worth looking into in its own right! On the software side of things, [Clemens] is using ROS, which implements the low level robot control, path planning (using code taken from Slic3r) as well a kinematics constraints for object avoidance. The video below, shows how simple the machine is to operate — just drive it around the perimeter of lawn with a handheld controller, and show it where obstacles such as trees are, and then set it going. The mower is even capable of mowing multiple lawns, making the journey between them automatically!

Robotic mower projects are not new around here, here’s the mysterious TK with an interesting take, another using RTK GPS for good (or possibly bad) and quite probably the jankiest one we’ve seen in a while, which uses a LoRa base-station to transmit RTK corrections. We’d recommend keeping well away from that last one.

Continue reading “OpenMower: Open Source Robotic Lawn Mower With RTK GPS”

the RP2040 stamp

Putting The RP2040 On A Stamp

In the electronics world, a little one-inch square board with castellated edges allows a lot of circuitry to be easily added in a small surface area. You can grab a prepopulated module, throw it onto your PCB of choice, and save yourself a lot of time routing and soldering. This tiny Raspberry Pi 2040 module from [SolderParty] ticks all those boxes.

With all 30 GPIO broken out, 8MB of onboard flash, and a NeoPixel onboard, you have plenty to play with on top of the already impressive specs of the RPi2040. Gone are the days of in-circuit programmers, and it uses a UF2 bootloader to make it easy B to transfer new images over USB. Rust, MicroPython, Arduino, and the PicoSDK are all development options for code. All the KiCad files, BOM, schematics, and firmware are up on GitHub under a CERN license for your perusal pleasure. They’ve helpfully included footprints as well as a reference carrier board design.

It is a handy little project that might be good to keep in mind or just use as a reference design for your efforts. We have a good overview of the RPi2040 from an STM perspective. If you’re curious about what you could even use this little stamp for, why not driving an HDMI signal?

DOOM Comes To The RP2040

To the point of being a joke, it seems like DOOM is adapted to run on everything these days. So it was only natural that we would see it ported to the RP2040 by [Graham Sanderson], the tiny chip powering the Raspberry Pi Pico.

You might be thinking, what’s different about this port? There have been 55 articles about DOOM here on Hackaday, showing it running on everything from web checkboxes to desk phones. The RP2040 has 256 K of RAM, two decently clocked processor cores, and 2 MB of flash, so it’s not the most constrained platform ever to have DOOM run it. But [Graham] also set some very lofty goals: all nine levels needed to be playable, faithful graphics and music, multiplayer, and it would output to VGA directly. It should play just like the original. DOOM has a demo that is stored as a sequence of input events. They form excellent regression tests as if the character gets stuck or doesn’t make it to the end; then you’re not accurate according to the original code.

There are two big problems right out the gate. First, a single level is larger than the 2 MB storage that the RP2040 has. And to drive the 320×200 display, you either need to spend a lot of your CPU budget racing the beam or allocate a vast amount of RAM to framebuffers, making level decompression much harder.

A default compression scheme wouldn’t cut it because it needed a high compression ratio and random access since decompressing into RAM wasn’t an option. However, carefully optimizing and compressing the different data structures yielded great results. Save game files are given a similar treatment to ensure they fit into the remaining flash after all the levels (34k).

The result is fantastic, and it supports DOOM, Ultimate DOOM, and DOOM II. The write-up goes into far more detail than we could here; enjoy the read. If you decide to make a day trip to the depths of Hell on your own Pi Pico, be sure to let us know in the comments.

Continue reading DOOM Comes To The RP2040″

Screenshot of Pulseview showing capture and decode of some digital channels

Need A Logic Analyzer? Use Your Pico!

There’s a slew of hardware hacker problems that a logic analyzer is in a perfect position to solve. Whether you’re trying to understand why an SPI LCD screen doesn’t initialize, what’s up with your I2C bus, or determine the speed of an UART connection, you’ll really want to have a logic analyzer on hand. People have been using a Pi Pico as a logic analyzer in a pinch, and now [pico-coder] has shared a sigrok driver that adds proper support for a Pico to beloved tools like Pulseview.

The specs offered are impressive. Compared to the $10 “Saleae” clone analyzers we are so used to, this thing boasts 21 digital channels with up to 120 MHz capture speed, 3 ADC channels at up to 500 KHz, and hardware-based triggers. The GitHub repository linked above stores the driver files out-of-tree, but provides build instructions together with an easily flash-able uf2 firmware. It’s likely that you’ll soon see this driver in a stock Pulseview installation, however, given the submitter-friendly attitude we’ve witnessed on the sigrok mailing list. However, if you need a logic analyzer ASAP, you should follow the caringly offered quickstart guide.

We’ve covered Pulseview being used in combination with cheap accessible analyzers before — a must-watch if you need to get yourself up to speed on the value they provide to a hobbyist. If an oscilloscope is what you need and a smartphone is what you have, perhaps you’ll enjoy the Scoppy firmware for the Pico.

We thank [mip] for sharing this with us!