Sand Drawing Table Inspired By Sisyphus

In Greek mythology, Sisyphus was a figure who was doomed to roll a boulder for eternity as a punishment from the gods. Inspired by this, [Aidan], [Jorge], and [Henry] decided to build a sand-drawing table that endlessly traces out beautiful patterns (or at least, for as long as power is applied). You can watch it go in the video below.

The project was undertaken as part of the trio’s work for the ECE4760 class at Cornell. A Raspberry Pi Pico runs the show, using TMC2209 drivers to command a pair of NEMA17 stepper motors to drag a magnet around beneath the sand. The build is based around a polar coordinate system, with one stepper motor rotating an arm under the table, and another panning the magnet back and forth along its length. This setup is well-suited to the round sand pit on top of the table, made with a laser-cut wooden ring affixed to a thick base plate.

The trio does a great job explaining the hardware and software decisions made, as well as showing off how everything works in great detail. If you desire to build a sand table of your own, you would do well to start here. Or, you could explore some of the many other sand table projects we’ve featured over the years.

Continue reading “Sand Drawing Table Inspired By Sisyphus”

Audio Localization Gear Built On The Cheap

Most humans with two ears have a pretty good sense of directional hearing. However, you can build equipment to localize audio sources, too. That’s precisely what [Sam], [Ezra], and [Ari] did for their final project for the ECE4760 class at Cornell this past Spring. It’s an audio localizer!

The project is a real-time audio localizer built on a Raspberry Pi Pico. The Pico is hooked up to three MEMS microphones which are continuously sampled at a rate of 50 kHz thanks to the Pico’s nifty DMA features. Data from each microphone is streamed into a rolling buffer, with peaks triggering the software on the Pico to run correlations between channels to determine the time differences between the signal hitting each microphone. Based on this, it’s possible to estimate the location of the sound source relative to the three microphones.

The team goes into great deal on the project’s development, and does a grand job of explaining the mathematics and digital signal processing involved in this feat. Particularly nice is the heatmap output from the device which gives a clear visual indication of how the sound is being localized with the three microphones.

We’ve seen similar work before, too, like this project built to track down fireworks launches. Video after the break.

Continue reading “Audio Localization Gear Built On The Cheap”

Simon Says With An RP2040

The team of [Michael] and [Chimdi] from Cornell’s Designing with Microcontrollers (ECE 4760) Fall 2023 session designed a version of Simon Says on an RP2040 which they call Pico Says. It uses UDP packets over WiFi to communicate between the players, and supports VGA graphics for output. Each player’s hardware consists of a Pico W module plus a control panel containing the four LEDs and buttons ( red, green, yellow, and blue ) plus send and reset buttons.

For purposes of this lab, the modules were build on a solderless breadboard and used perfboard for the control panels. They weren’t entirely happy with their choice of UDP because they experienced frequent datagram dropouts in the noisy environment of the microcontroller lab. They also planned to implement sound effects, but ran out of time after spending too much time on the WiFi implementation, and had to drop that feature. In the end, however, they wrapped up their project and demonstrated a working game. We can only speculate whether this bonus lesson in resource management was intended by [Dr. Hunter Adams] or not.

Two ECE 4760 course references are highlighted in the write-up that helped them jump-start the project: the UDP and VGA examples for the Pico. These are good links to put in your RP2020 toolbox for future projects, in addition to the ECE 4760 course home page itself. We’ve covered several of these projects recently, as well as the curriculum switch from the Microchip PIC32MX-based Microstick II to the RP2040 last Spring.

Continue reading “Simon Says With An RP2040”

Audio Synthesizer Hooked Up With ChatGPT Interface

ChatGPT is being asked to handle all kinds of weird tasks, from determining whether written text was created by an AI, to answering homework questions, and much more. It’s good at some of these tasks, and absolutely incapable of others. [Filipe dos Santos Branco] and [Edward Gu] had an out of the box idea, though. What if ChatGPT could do something musical?

They built a system that, at the press of a button, would query ChatGPT for a 10-note melody in a given musical key. Once the note sequence is generated by the large language model, it’s played out by a PWM-based synthesizer running on a Raspberry Pi Pico.

Ultimately, ChatGPT is no musical genius. It’s simply picking a bunch of notes from a list that are known to work together melodically; that’s the whole point of musical keys. It would have been wild if it generated some riffs on the level of Stairway to Heaven or Spontaneous Devotion, but that might be asking for too much.

Here’s the question, though. If you trained a large language model, but got it to digest sheet music instead of written texts… could it learn to write music in various genres and styles? If someone isn’t working on that already, there’s surely an entire PhD you could get out of that idea alone. We should talk!

In any case, it’s one of the more creative projects from the ever-popular ECE 4760 class at Cornell. We’ve featured a bunch of projects from the class over the years, and noted how the course now runs on the RP2040. Continue reading “Audio Synthesizer Hooked Up With ChatGPT Interface”

Cornell Updates Their MCU Course For The RP2040

The School of Electrical and Computer Engineering at Cornell University has made [Bruce Land]’s lectures and materials for the Designing with Microcontrollers (ECE 4760) course available for many years. But recently [Bruce], who semi-retired in 2020, and the new lecturer [Hunter Adams] have reworked the course and labs to use the Raspberry Pi Pico. You can see the introductory lecture of the reworked class below.

Not only are the videos available online, but the class’s GitHub repository hosts extensive and well-documented examples, lecture notes, and helpful links. If you want to get started with RP2040 programming, or just want to dig deeper into a particular technique, this is a great place to start.

From what we can tell, this is the third overhaul of the class this century. Back in 2012 the course was using the ATmega1284 AVR microcontroller, and in 2015 it switched to the Microstick II using a Microchip PIC32MX. Not only were these lecture series also available free online, but each has been maintained as reference after being replaced. One common thread with all of these platforms is their low cost of entry. Assuming you already have a computer, setting up the hardware and software development environment for these modules costs less than the price of a pizza dinner, a fact no doubt appreciated by the ECE department’s budget director.

We’ve covered this course before back in 2015 when it first changed. Another free online course on embedded system design is from [Prof James Conrad] at UNC Charlotte, based on the Renasas RX63N microcontroller — the UNC Charlotte team drove development of the autonomous vehicle project we covered back in 2009. If you know of other online embedded systems classes, let us know in the comments below.

Continue reading “Cornell Updates Their MCU Course For The RP2040”

RP2040 DMA Hack Makes Another ‘CPU Core’

[Bruce Land] of Cornell University will be a familiar name to many Hackaday readers, searching the site for ‘ECE4760′ will bring up many interesting topics around embedded programming. Every year [Bruce] releases yet more of the students’ work out into the wild to our great delight. This RP2040-based project is a bit more abstract than some previous work and shows yet another implementation of an older hack to utilise the DMA hardware of the RP2040 as another CPU core. While the primary focus of the RP2040 DMA subsystem is moving data between memory spaces, with minimal CPU intervention, the DMA control blocks have some fairly complex behaviour. This allows for a Turing-complete CPU to be implemented purely with the DMA hardware and a sprinkling of memory.

The method ties up three of the twelve DMA channels, and is estimated to have a similar performance to ‘an Arduino’ but [Bruce] doesn’t specify which one of the varied models that could be. But who cares anyway? Programming the CPU is a matter of leveraging the behaviour of the hardware, which is all memory mapped and targetable by the DMA. For example, the CPU can waggle GPIO pins by using the DMA to write values to the peripheral address space. The basic flow can be seen in the image above. DMA0 is used as the program counter, which points DMA1 to an array of DMA control blocks, a sequence of which codes for some of the ‘opcodes’ of the CPU model. DMA0 chains to (hands over control to) DMA1 which reads the control blocks and configures itself accordingly. DMA1 performs whatever data move is programmed, chains to DMA2, which in turn reprograms the DMA0 program counter to point to the next block in the list to be executed by DMA1.

Continue reading “RP2040 DMA Hack Makes Another ‘CPU Core’”

Team Scores Big Points With Pinball Final Project

For their final project in [Bruce Land]’s class on designing with PIC32 microcontrollers, [Sujith], [Julia] and [Andrew] wanted to do something fun. And what could be more fun than bending to the electromechanical siren song of the pinball machine?

This machine looks great, and as you can see in the demo video after the break, it plays and sounds great, too. We particularly like the boomerang obstacle and the game state-driven LED strip. The more points you score, the brighter they go. We also like that this machine combines traditional scoring methods with a few really clever ones, like the boomerang target near the top and the scoring triggers made from copper tape.

The team started by designing the heart of any pinball machine, the flippers. Though we have seen car door lock actuators used in homebrew machines, the team went with traditional solenoids to drive them. Unfortunately the solenoids caused a lot of interference, but the team got around it with filter capacitors and aluminium foil Faraday cages around the wires.

If all this pinball talk has your circuits lit up, why not try making your own machine? Continue reading “Team Scores Big Points With Pinball Final Project”