Tuesday, November 18, 2025

Zarphield Says...

While grappling with the daily existential crisis that modern life has devolved into, I wrote an app in Python that sits on my desktop and spits out a fusion of quotes by 80's cat icon Garfield and swinging space pirate Zaphod Beeblebrox. This is Zarphield. Feed him lasagna, Earth man.



 

Monday, November 17, 2025

Psuedo Spectrum Analyzer

Earlier this year I acquired two Elegoo MEGA2560 kits through Facebook market place. These kits are excellent entry points into the Arduino maker space. They come with boards and enough components and modules to keep the average nerd busy for awhile. Lately I've been looking at some of the modules that I didn't have strong thoughts on what to utilize them for and have started brainstorming ideas build some unique things. One of the modules in particular, the sound sensor module, got my attention. This module has a built in microphone and can be used for a variety of applications, such as a sound activated trigger or to capture audio for processing. After reading up on the module (this is one of the odd ball modules included in the kit that doesn't have a readily available board number associated with it), I decided to pair it with an old favorite of mine, the MAX7219 8x8 LED display. I used the MAX7219 to great effect in the cable box I built a couple of weeks ago and I love this one, in particular because it's super easy to get it working with an Arduino board and looks super cool in action. My goal was to create a sort of "spectrum analyzer" like you might see in older hi-fi stereo equipment racks. When I was a kid I had a spectrum analyzer program that I ran on my beloved Tandy Color Computer 2 that accepted input via a set of stereo RCA cables and displayed a dancing set of colorful bars that pulsed to the audio it was fed. This version would be much simpler. I would use the microphone from the sound sensor to listen for audio from the room it was setup in, and process the audio via a UNO R3 board, segmenting the sound into degrees of volume, and then display these lines of differing audio strength signals on the MAX7219.


 

Wiring up the components (the sound sensor and the MAX7219 display) was very straightforward. Both components are labeled clearly which pins do what (i.e. VCC, ground, etc.) unlike a couple of modules I've encountered in these kits (looking squarely at you DHT11 Temperature and Humidity Module). One everything was wired up it really was just a matter of getting the sketch pulled together to get the setup to capture the audio, "rank" the volume levels, and then display the results in an understandable way. There are essentially 6 steps in this process:

1. Read sound from microphone.

The sound sensor outputs and analog voltage that changes with the sound. It can output digital, but I ran into some issues getting that to reliably be read, so I opted for the easy route with analog output. The sound ranges in value from 0-1023.

 int raw = analogRead(micPin);

2. Compare the sound to a dynamic baseline.

A baseline is used to represent the normal quite noise in the room. This gives us the difference between the current sound and the background. The sketch allows the baseline to adapt over time, which keeps the analyzer stable, even if the room becomes noiser over time.

 int diff = abs(raw - baseline);

baseline = (baseline * 98 + raw * 2) / 100; 

3. Convert sound level into bar height.

The difference is scale into a value from 0-8, matching the height of the MAX7219's 8x8 matrix.

int level = diff / 8; 

4. Scroll the display to the left.

The entire display is shifted one column to the left. This is meant to mimic the way a real spectrum analyzer scrolls over time.

 scrollLeft();

5. Draw the new bar on the right side.

The new sound level becomes a vertical bar in the far right column. Each LED row is turned on or off depending on the bar height.

 drawColumn(level);

6. Update and refresh the MAX7219 display.

The display is updated all at once for a smooth animation.

 matrix.control(MD_MAX72XX::UPDATE, MD_MAX72XX::ON);

Results 

The result is a series of bars of different heights, continually scrolling to the left, with the bar height continually reacting to the volume of the sound it picks up. I can't really call this an actual spectrum analyzer, since there is only one sensor monitoring the room and not a series devoted to the various frequencies across the audio spectrum, but it still looks pretty cool. 


 

Tuesday, November 11, 2025

Low-Powered FM Radio Transmitter with an Arduino and Si4713

Arduino boards are fantastic and versatile for constructing a wide range of electronics projects. One of the greatest strengths are the abundance of electronic modules that are available to add project specific functionality. I picked up a Si4713 board awhile back and decided to spend some time setting it up with an Arduino to see if I could get a functional low-powered FM transmitter running. The Si4713 boards are easy to come by and relatively cheap (I think I paid well under $20 including shipping for mine from a seller on ebay), and have minimal work required to get them hooked up. They come with headers that will need to be soldered onto the board and a very thin wire that is meant to serve as an antenna (which will also need to be soldered to the board). 

The wiring between the Si4713 and the Arduino (I used an Elegoo Mega 2560 R3 I had lying around for this project) is as follows. Adjust the wiring and code as necessary depending on the model of the Arduino you use and your preferences for the reset pin.



Wiring:

VIN-5V
GND-GND
SDA-SDA (Pin 20)
SCL-SCL (Pin 21)
RST-Pin 2
GPIO1Optional (RDS interrupt)leave unconnected unless needed









You will need to install the following Adafruit libraries for the board to work: 

Adafruit_Si4713 Library

Adafruit_BusIO

Adafruit_GFX (if you want to later display station info)

I tried a couple variations on getting a functional sketch. I finally figured out that a persistent problem I was having involved the reset pin not properly resetting after the Mega has been disconnected from the power source and then rebooted. Modifying the sketch to allow for a delay to allow the pin to reset properly seemed to correct this. The updated sketch is below:

#include <Wire.h>
#include <Adafruit_Si4713.h>

#define RESET_PIN 2 // match whatever wiring you selected
Adafruit_Si4713 radio(RESET_PIN);

void setup() {
  Serial.begin(115200);
  delay(500);             // time for power to stabilise
  pinMode(RESET_PIN, OUTPUT);

  // Toggle reset: LOW -> HIGH with pauses
  digitalWrite(RESET_PIN, LOW);
  delay(50);
  digitalWrite(RESET_PIN, HIGH);
  delay(200);

  Wire.begin();
  Serial.println("Attempting to find Si4713...");

  if (!radio.begin()) {
    Serial.println("Couldn't find Si4713");
    while (1) {
      delay(500);
      Serial.println("Retrying...");
      if (radio.begin()) {
        Serial.println("Found Si4713 on retry!");
        break;
      }
    }
  }

  Serial.println("Si4713 found!");
  radio.tuneFM(10110);
  radio.setTXpower(88);
}
void loop(){}

After I verified that the transmitter was operational, I decided I needed something cool to transmit. One of my first exposures to short wave radio was listening to "numbers stations", which are famously mysterious stations that broadcast cryptic messages. I fired up Garageband and recorded some esoteric sounding number station inspired audio ala' "Stranger Things" that I could endlessly loop on my station. I grabbed a receiver capable of tuning in FM and dialed up my frequency. I don't have to tell you how cool it was to hear my message looping over the radio! I did some proximity testing, moving the radio around the room and it seems like the effective transmission distance using the basic thin wire antenna provided with the Si4713 is about 15 feet. I believe I could improve the distance by building a better antenna, such as an optimized quarter-wave antenna - which might possibly extend the reach a bit more (maybe 25-30 feet).

Some future enhancements to this little radio station I can envision include: building a better antenna, fitting everything into a suitable enclosure, and adding an old ipad shuffle for audio to make this a truly mobile radio station.
 

Sunday, November 9, 2025

Constructing a homebrew "Cable Channel" Part 2

 It's relatively easy to use a Raspberry Pi to approximate the experience of having your own custom cable television channel similar to what folks of a certain age may remember from their youth. In a previous post I went over some of the basic steps to get a Raspberry Pi 4 set up as a "retro box" that automatically plays a curated collection of movies and shows from the 1970s, including period correct public service announcements and commercials. After a couple of weeks of testing - which was essentially just letting the box run to make sure that the flow of the programing actually felt like watching period correct television - I decided that I needed to ramp things up. It wasn't good enough to just have a Raspberry Pi that played old movies and commercials. Any modern computer can do that. This needed to actually have the entire aesthetic of a classic 1970s cable channel. It needed to dress the part.

That's where eBay comes back. Some quick searching and I was able to locate an untested cable box circa early 80's for parts/repair that had a buy now price of only $3.81 (plus $12 for shipping). This box included a front channel display and was roomy enough to house both the Raspberry PI and an Arduino UNO (more on that below). I decided to go with the 80's style box, since the larger encloser would make it much easier to work with, and I had some ideas about utilizing the front channel display screen.

 

When the box arrive it was immediately obvious that the particular Jerrold 550 Starcom converter had lived a rough life. The was some serious damage to one corner of the plastic face plate due to what I can only attribute as "falling damage" from being dropped on a hard surface, and the unit was covered in old masking tape and 40+ years of grime. I also noticed that the unit's enclosure was secured with rivets, probably since the majority of these units were distributed by local cable companies and they didn't want to make it easy for industrious hackers to open them up to try to figure out how to get free Home Box Office. The first step was to drill out the rivets so I could take the unit apart.


 
After I parted the case out I spent some time scrubbing the case down with dish detergent and using a liberal amount of Goo Be Gone to get all that sticky tape residue cleaned up. Once everything was clean and dry, I could spend some time attending to the smashed corner of the face plate. I had a couple of options for the repair, but I decided that the easiest (and structurally most secure) fix would be to recreate the corner using Green Stuff two-part epoxy. For folks not familiar with Green Stuff, it essentially is a two-part epoxy that you mix by hand and then mold like a really rigid Play Dough into to place. It is typically used a lot when kit bashing models for games like Warhammer 40K, when you need to sculpt a custom piece, and maybe adhere a particularly tricky portion of a model together. It works well, can be easily sculpted, and takes simple water-based acryllic paint just fine. I eyeballed the amount that would be needed to recreate the missing/damaged corner, mixed it up, and then went to work sculpting the corner as best as I could. Green Stuff sets pretty quickly - typically with 5-10 minutes - so I didn't have the luxury of time here. My goal was good, not great. After the epoxy set I mixed up a fairly good approximation of the color of the faceplate using acrylic paint to blend the repair in as best as I could. Overall, I'm pretty happy with it. From across the room it's not noticeable and the Green Stuff actually made the faceplate much more sturdy that it was previous to the repair.


 
Once the plastic was repaired I started brainstorming how to use the front channel display. I immediately though about using an Arduino UNO to power a small LED screen, since I'd used that pairing to great effect on a couple of smaller projects. I suppose I could have powered the LED's from the Raspberry Pi, but to be honest it was quicker and easier for me to wire up the display to an extra UNO R3 I had and I was able to repurpose a sketch that I had written for a handheld snake game. The Pi can power the UNO via USB, and if I ever want to change the display it is super easy to do (and doesn't affect the functionality of the Pi). It also gives me to option of adding a module for a remote control if want later down the line. I played around with different text for the display, finally settling on having an asterisk gliding across the display. It looked cool and I'm a sucker for moving LED's (let's just blame that on "Knight Rider"). After some tweaks for placement and a couple of generous blobs of hot glue to hold the screen in place, I had a functioning display that I could easily modify to anything that used a basic character set.
 

 
The final stretch was just to drop the Raspberry Pi into the box and get everything secured. I cut and glued some rubber welcome mat materials to the bottom of the case to assist with giving everything a nice, non-conductive floor to mount the pieces on, and mapped out the most efficient layout to screw everything down.

 



And there it is...a working retro "cable channel" that lives inside a period correct cable box with a customizable LED front panel. Eventually I will add an Arduino remote control module that I will use to change up the front display to a couple of different visual options. I still need to come up with a reasonable plan for cable management that will allow me to plug in a mouse and keyboard into the back. I can remote into the box from another computer to add videos if I want. Overall, I'm pretty stoked on this little project. I'd like to make another one at some point using a Raspberry Pi 3 with composite video so I can easily run the signal to one of the CRT televisions I have. This is the first project I'm done that has utilized both the Raspberry Pi and the Arduino boards and I love the flexibility of having both in a build. Now it's time to watch some TV!
 

Housing a Linux computer inside a broken Atari 2600 cartridge

 I started thinking pretty soon after completing the custom cable channel project of housing a Raspberry Pi UNO into a repurposed cable box ...