Project: TuneControl May 14, 2016 TuneControl Several years ago I built a device to help with managing my iTunes library. Fast forward to 2016, and it’s still incredibly useful. Unlike days gone by, I don’t have to dig up my iTunes window every time I want to change tracks, pause the music, or rate a song. The only catch is that it’s a tethered USB device, and only useful when I’m at the computer. And that’s no longer good enough. TuneConsole II: Electric Boogaloo With my new home came a lot of additional space. I no longer spend most of my time at the computer, squirreled away in an unobtrusive corner. Every time I sit on my couch and listen to music, I get annoyed that I can’t just reach over and hit a button to control it. The answer to this is obvious: I need a portable, wireless version of the TuneConsole. I’m going to call it TuneControl. The idea is simple enough: build a device with mostly the same functionality, but which works over WiFi and TCP/IP. Add a rechargeable battery, package it up in a nice case, and it’ll be done. As with the previous iteration (and aside from the networking), it’s not a terribly complicated device. Of course, my experience with the original version suggests that a few additional features would be nice: Volume control. Ability to select a different playlist. Ability to select which AirPlay device is active. The first two should be simple enough, but the last one I’m not sure about. I’m also looking at trying to build this without having to run anything additional on the computer hosting iTunes, so that limits the possibilities somewhat. It’ll depend on whether the iTunes remote protocol supports enumerating and selecting output devices. I’m not holding my breath. The Difficult Bits While the device overall is simple enough, some things aren’t going to be as easy as one would like. The primary example is the network connection. I’d like to have IPv6 support for future proofing, but I’ve yet to find a WiFi module that has an IPv6 stack built in. That means I’m going to have to handle it on the microcontroller, which increases the complexity. Recharging the batteries is another issue. Simple NiCd or NiMH chargers shouldn’t be too difficult, but I’m leaning toward Lithium Ion or Lithium Polymer batteries. Those tend to catch fire if they’re recharged incorrectly. I’ll have to find a charging solution that I’m comfortable with. And then there’s the buttons. I really like lighted pushbuttons, but the simple truth is that they’re incredibly expensive. The lighted buttons for the original TuneConsole accounted for more than $25 of the cost (and there’s only six of them!). I’m currently leaning toward a custom solution, but we’ll see where that goes. I don’t mind spending some money on the prototype, but I’d like for others to be able to build the thing without breaking the bank. Did I mention that this will be open source from the ground up? The Current Plan I’ve been thinking about this ever since I moved here, and I have a pretty solid idea of what components I’ll probably need: ARM Cortex-M3, or thereabouts. Currently leaning toward the STM32 line. A WiFi module (yet to be determined), but probably not ESP8266. EPD or OLED display. Custom buttons (both lighted and otherwise) Possibly a capacitive touch slider for volume; still thinking about this. USB port for charging and firmware update, and maybe to configure the WiFi network (I don’t have WPS on my current router). The display is giving me the biggest headache, to be honest. The one in the current unit draws ~150mA just for the backlight, so it’s not really an option if I want decent battery life. I’m leaning heavily toward EPD (otherwise known as electronic paper), but finding information and appropriate hardware has proven a bit more difficult than I expected. On the software side, I’m looking at: A full-blown RTOS (currently leaning toward Contiki since it supports both IPv4 and IPv6). The DACP protocol for control and status, which will eliminate the extra software on the Mac side. Possibly support SNMP for device monitoring. This would let my Zabbix instance alert me if it needs recharging. …? Yeah, that’s about as far as I’ve gotten. Over the course of the next however many weeks, I’ll start to piece all this together. The last one only took a month or two to get right, but I was also unemployed at the time, so this might take a bit longer. I’m hopeful that it won’t take too long, though. Nothing here is rocket science, and most of the software components already exist. Stay tuned for more.