GameBoy Advance Oscilloscope & Spectrum Analyzer

One of my old projects was the creation of a module that can plug into a GameBoy Advance and act as a full-color, 2-channel oscilloscope and spectrum analyzer. Don’t laugh, it’s possible! The GBA is a powerful piece of hardware–it packs a 16.7 MHz ARM processor. I estimate that I could get the requisite FFT and visualization stuff, working entirely in software, efficient enough to operate reliably for measuring signals of frequencies up to 1 MHz.

The hardware would be a board with an ADC and some probes (or better, BNC connectors for probes) that would plug right into the cartridge bus of the GBA. The board would also contain the software program, in ROM. The whole thing might be produced in volume and be sold to people at $50 a pop.

Consider a potential market for such a device: hobbyists and especially high school students. Students can’t afford their own oscilloscope; decent ones can cost upwards of $1500, a budget model might cost $400. A color TFT display would only add to the cost! Having spectrum analysis capability would make these prices shoot through the roof. Of course, the major reason for this cost is that these scopes read signals of frequencies up to something like 1 GHz. This is overkill for most hobbyists and students, who tend to stick to audio frequencies (0-60kHz, if you want to include ultrasonics).

Many students already have a GBA; if they don’t, they can get an older model used for $30. Add $50 for this module, and that’s $80 for a 1MHz-rated O-scope and spectrum analyzer with a full-color TFT!

To prove to myself that I wasn’t crazy, in January of 2003 I created a software demo which accepts a user input of a waveform, then calculates and displays the FFT of the waveform on the screen. This demo was written using gcc and the excellent HAM library for the graphics and text output. Below are the screens from a run of my program, using Boycott Advance to emulate. Note: I actually did run this natively on the GBA hardware, off a flash cart that I burned. It worked just as in the emulator.

This is the gorgeous screen where you enter the values of your 16-point waveform. Any integer value will do. Note that I include exactly 4 periods of the waveform.

Okay, this one is hard to see, but it’s the 8-point FFT bar graph representation of the waveform. Note a giant bar at the far left denoting the DC offset of the waveform. Then note the second bar. This represents the frequency of the waveform, the major harmonic. This is 4 pixels to right. This is very good, because there are 4 periods of the waveform in our FFT window!

Check check check check it! Big values for the 0 frequency (i.e., DC offset) and big values for the 4th frequency, which is 1/(4T), which is exactly the frequency of our waveform assuming that T is the size in ‘seconds’ of our FFT window! (Of course, the use of units here is just a nice convenience to help my engineer’s mind wrap around the thing. This is pure math, but I’m wired to intuit these things in Hz and seconds. My apologies to the Fourier mathematicians out there.)

Leave a Comment