Close
0%
0%

SomaFM Badge

An electronic badge created for the folks behind SomaFM.

Similar projects worth following
There's rarely a day that goes by where SomaFM isn't playing somewhere in my house, so I thought the least I could do to show my appreciation was create an electronic badge for their DJs to wear at DEF CON.

Below you'll find not only information about the final badge, but a look back at how it was designed and built in time for this year's DEF CON.

Note that all logos and imagery were used with permission from SomaFM.

SomaFM Badge V2 Notes.pdf

Short manual for operating the badge. Includes information on customizing the images on the display.

Adobe Portable Document Format - 2.00 MB - 08/10/2024 at 03:36

Preview

  • DEF CON Debut

    Tom Nardi08/10/2024 at 03:17 0 comments

    Six completed badges arrived at the SomaFM studio in San Francisco on August 1st, and were distributed among the DJs. Early reports are they have been a big hit, and gotten some attention from attendees -- perhaps that's how you've found yourself reading this page right now.

  • Final Assembly

    Tom Nardi08/10/2024 at 02:22 0 comments

    I felt confident that V2 of the badge would be good enough to ship off to SomaFM HQ, but by the time the new PCBs came in, it was the beginning of July -- just about three weeks before DEF CON 32. Amazing how quickly 6 months can get away from you.

    Luckily, the assembly was pretty simple. The first step was to place the SMD components and reflow the board on a hotplate. Afterwards I'd solder on the power button, connect a battery to the test pads, and then use a jumper to bring the MOSFET pin high. This would allow me to quickly test if all the LEDs were working, which was arguably the most critical part of the whole thing.

    From there, I'd solder on the two tact buttons, the RP2040 Zero, and the LCD module. At this point I could plug the badge into the computer to flash the firmware and quickly go through the different functions on the badge to make sure everything was working.

    The next step was to squirt on the hot glue "diffuser". At first I made the mistake of trying to physically smooth out the glue as it dried, which ended up making a mess. But quickly I realized that the glue stayed liquid enough to find its own level, I just had to get the right amount onto the board before it started setting up.

    Finally, I would solder on the battery holders and SAO connectors. This would be the first time the badge would be powered by the batteries, so I would go through and test everything again just to double-check the assembly. I'd also plug a couple of SAOs in to make sure they were getting juice.

    At the last minute (literally right before I packed them for shipping), I decided to put black duct tape over the dried glue. While I'm not 100% thrilled with the solution, without the tape, the badge would throw a lot of red light back towards the user and I was worried how that would look.

  • Badge V1 -- Mistakes Were Made

    Tom Nardi08/10/2024 at 00:48 0 comments

    The first version of a PCB almost always has some issues that can be improved on, but in this case, V1 of the badge was a real dog.

    I'd love to tell you that this was some clever "development version" that has the RP2040 Zero in a socket on the front for easy debugging....but no. I just never flipped its footprint to the backside of the board, and since I didn't have any 3D model assigned for it in KiCAD, it was never obvious in the board previews. Oops.

    But wait, it gets better!

    Not only did I have the pin layout for the MCU inverted, I also managed to flip around the clock and data pins for the display. 

    But while this version of the badge obviously needed some work, it did give me something to develop the firmware on while I was working on the V2 layout. It also showed that using clear hot glue to spread out the light from the LEDs would work nicely -- though that being said, I did decide to double the number of LEDs on V2 of the badge to provide more even illumination.

  • Display Surgery

    Tom Nardi08/10/2024 at 00:19 0 comments

    Usually, it's not necessary to use the Chip Select (CS) pin on ST7789 displays to drive them, so the pin isn't broken out on the 1.3 inch model. Unfortunately, I soon found out that whatever software workarounds allow for this with other libraries is specifically not supported in CircuitPython. The only solution (at least currently) was to physically modify each display.

    The process is fairly well documented elsewhere, so I won't go over it in great detail here. But basically the steps are:

    1. Remove the display ribbon cable
    2. Cut the trace connecting the CS pin to ground
    3. Re-install ribbon cable
    4. Solder jumper wire to CS pin

    It's not a complex procedure, thankfully. But fiddling with soldered ribbon cables is never any fun, and the work was fine enough that I had to break out the microscope.

    Here you can see what the cut trace should look like:

    Once the ground connection has been cut and the pin is floating, the jumper connects it to the microcontroller:

    Now after the jumper wire is connected, there's a few different ways you could go. One idea would be to simply run the wire back to a GPIO pin on the chip. But in this case, I ended up taking over the backlight pin (BLK) in the display module's header to keep things neat. This does obviously mean you lose the ability to control said backlight, but that wasn't something I planned on doing anyway.

    The final result looks like this:

    In the end, the process wasn't terrible. But it was an unexpected detour, and did add some additional problems. For instance, since I couldn't test the displays until after the modification was made, I ended up wasting time working on a couple duds that had dead pixels.

  • Picking a Python

    Tom Nardi08/07/2024 at 05:56 0 comments

    While it wouldn't be my choice for low-latency applications, I have to admit that using MicroPython on the Supercon 2023 badge was a real eye opener. It made it much easier for attendees to hack and modify the system as they didn't need to mess around with some ponderous toolchain, plus the idea that the source code lives on the badge is really cool.

    Now, I wasn't sure if the folks at SomaFM would ever want to hack around with the software on this badge. But just in case, I wanted to make it as easy to do as possible. So I took it a step further and decided to put CircuitPython on the RP2040. During the CircuitPython Hack Chat we did with Adafruit back in 2023, I was impressed with many of the usability tweaks they made and the rationale behind them. Really love the idea that you don't need anything more advanced than a text editor and an OS that supports USB Mass Storage to run your code on the hardware.

    Looking back, I'm still happy with this decision. Especially when I found out Adafruit already wrote a library for doing slideshows, which essentially meant 85% of the firmware was already written for me. But the decision to go with CircuitPython did have an unexpected side effect that I was about to run into. It didn't sink the project (obviously) but it did make things quite a bit harder, and really ratcheted up the last minute uncertainty.

  • Refining the Concept

    Tom Nardi08/06/2024 at 05:15 0 comments

    My first thought was to simply scale up the SAO design. The three LEDs used to illuminate the cutout in the rear of the PCB would no longer be enough of course, so I would double that to six. Combined with using clear hot glue as a diffuser (as described by TwinkleTwinkie), I hoped that would be enough to evenly illuminate the larger logo. With six LEDs, I reasoned the badge could be powered by a pair of CR2032 coin cells to keep things simple.

    But I didn't get much farther with this idea before finding it a bit too boring. It would barely count as an electronic badge if it just lit up a few LEDs. My next thought was to add two SAO ports to the top to spice things up. This would make the badge a little more interesting (though admittedly, thanks to the SAOs and not my own work), but I figured at that point the coin cells were out of the question. So I switched over to a pair of AAs in series to provide 3V -- a bit lower than I'd like, but it's worked well enough for the Supercon badges...

    I got a little farther with this version, but then lost steam again. I still didn't think the idea was worth the time and expense of actually designing and building it. There needed to be a hook.

    Suddenly it hit me: the most visually interesting thing about SomaFM is the unique art for each channel, so why not show those on the badge? I already had a rough OpenSCAD render of the badge to get an idea of how large I wanted the logo to be, so I went in and started trying out different sized displays to see what would compliment the overall layout. I eventually settled on something in the 1.2 to 1.5 inch range, and then further narrowed that down to the 1.3 inch ST7789.

    Naturally, showing images on a display now meant some kind of microcontroller would be involved. Again taking inspiration from Supercon badges of the past, I figured just soldering an RP2040 dev board onto the badge would be the path of least resistance. I didn't need WiFi, and wanted USB-C, so that pointed me to the Waveshare RP2040 Zero.

    I started plugging 3D models of the various bits of hardware into my OpenSCAD render to get an idea about clearances and that sort of thing, and pretty soon I found myself looking at a proper badge. Now I just had to build it.

  • Origin of the Species

    Tom Nardi08/05/2024 at 05:10 0 comments

    The final stages of this project came together quickly, so there wasn't time to document things until the dust settled. Now that the badges have shipped out, I'll wind back the block a bit and explain how this project got started and go over some of the highs (and lows...) along the way.

    Usually it's tricky to determine exactly when and how a project pops into my head, but in this case, the exact moment was documented. On January 6th, I made a post on Mastodon showing off a concept I was working on -- a badge Simple Add-on (SAO) that used right angle 1204 SMD LEDs to backlight the exposed fiberglass substrate of a PCB.  The idea was that you could make SAOs with different logos/icons just by changing the front copper layer. 

    As an example, I used the logo for SomaFM and tagged their Mastodon account. This got some attention on the post, and eventually General Manager Rusty Hodge commented on it. We went back and forth for a few messages, and at one point he mentioned that he'd always wanted to have an electronic badge for SomaFM DJs to wear when they went to events such as DEF CON.

    Admittedly, it doesn't take much to get me headed down a rabbit hole in the first place. But in this case, I saw a unique opportunity to give something back -- there's rarely a day that I don't have SomaFM playing in the background, and if there was something I could do to show my appreciation for everything they do, I was eager to dive in.

View all 7 project logs

Enjoy this project?

Share

Discussions

Ben Combee wrote 08/29/2024 at 16:21 point

As a SomaFM fan, this is VERY COOL.  I was hoping it actually played the stations for a moment, but you'd need a PicoW or ESP32 board for that.  Could possibly pair to BT headphones rather than do a speaker amp if going in that direction.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates