Remote for Tangara?
#1
Rainbow 
Hey!

I'm an avid music enjoyer with a passion for electronics. I am in love with my old iPod classic, and I think Tangara is a really cool project!

Recently, though, I was designing a small device for my iPod, and I started thinking if it might be possible to implement the same thing with Tangara.



Basically, there was a product for the original iPod, called the "Radio Remote". (by the way, I'm more talking about the later model with the 30-pin connector) It was a small device that would plug into the iPod, and then on the other end of the cable was a small clip, much like an iPod shuffle. The clip had a bunch of buttons on it for controlling music playback, like skipping or rewinding songs, playing or pausing the track, and increasing or decreasing the volume.

I still use my iPod daily, yet a lot of the time it's in my pocket and annoying to pull out if I want to, say, change the volume or skip tracks. I used to have an Apple remote, but I lost it a bit ago, and when I started searching for a new one, I found that they were both rare and expensive.

After looking into it some, it seems that the remote communicates with the iPod over a simple serial interface, and so for the past few days, I've been working on designing an open-source replacement.

[Image: image.png?ex=66b84418&is=66b6f298&hm=a1c...7e95aea74&][Image: image.png?ex=66b84431&is=66b6f2b1&hm=220...1092f3713&][Image: image.png?ex=66b84448&is=66b6f2c8&hm=541...1820f6beb&]
[Image: image.png?ex=66b84463&is=66b6f2e3&hm=a31...d9ef5bfc7&][Image: image.png?ex=66b8446f&is=66b6f2ef&hm=0b7...30f923761&]
(some 3D designs for the device case, as well as some 3D models of the PCB)


I haven't yet ordered the parts or created a functional prototype yet, but I was talking with a friend, and I thought:

What if this device, or a redesign of it, could also be made to work with the Tangara?


At this point, my design is intended to interface over serial, but it wouldn't be hard at all to modify it to communicate over something like I2C or SPI. However, one concern I have is how to actually connect it to the Tangara. As far as I can tell, the only external interfaces are the USB-C port and the headphone jack. 

As such, I was wondering if it might be possible to expose a simple interface of some sort on some USB-C pins? I'm not very knowledgeable on USB-C, but I have heard that it is possible to send messages on the CC lines, and that the iPhone for example can have the SBU pins configured for serial communication.


I'm really sorry if this post is hard to follow, I'm not very good with words, especially in longer posts like this. But to summarise, I'm developing a wired external playback control remote for the iPod, and I'm wondering if it's possible to make it work with Tangara.

Thanks to whoever reads this post!
  Reply
#2
This seems cool. Reminds me of Minidisc that used to have remotes inline with the headphones. I never had a MD player but really wanted one (I was stuck on CD and MD was too expensive), always seemed cool to me to skip songs without taking the player out.

One of the benefits of Bluetooth is exactly this, but I never really liked trying to press my headphones. This would be cool if it worked, although I've gotten used to taking my mp3 player out of my pocket.
  Reply
#3
(2024-08-10, 09:06 AM)Habmala Wrote: This seems cool. Reminds me of Minidisc that used to have remotes inline with the headphones. I never had a MD player but really wanted one (I was stuck on CD and MD was too expensive), always seemed cool to me to skip songs without taking the player out.

Thanks! I'm hoping this can be helpful for many people, if I can get it to work.

(2024-08-10, 09:06 AM)Habmala Wrote: One of the benefits of Bluetooth is exactly this, but I never really liked trying to press my headphones. This would be cool if it worked, although I've gotten used to taking my mp3 player out of my pocket.

I...really do not like Bluetooth. I strongly prefer wired almost all of the time, and as such, the Bluetooth solution isn't for me.
  Reply
#4
Yeah, Bluetooth is the way these things are typically done unfortunately. Some headphones have those janky little inline controls, but they're often quite limited (and Tangara doesn't have the hardware to support them anyway).

I do think you could make a device like you're describing that works well with Tangara tho! Tangara literally already exposes a USB serial console over the USB-C port; we mostly use it for some special development/debugging commands, but you can also get access to a Lua environment over this console that includes all the usual system bindings. This is how, for example, Hailey's companion app (https://github.com/haileys/tangara-companion) is able to change Tangara's volume (screenshot here https://hails.org/@hailey/111889509622928744)

The main roadblock you'll encounter is your little remote/dongle/thing will need to be able to self-power, as Tangara doesn't provide 5V over its USB port. But that should be a pretty easy solve!

Another option that might help that I've been meaning to explore, is using wired headphone output for audio, but a Bluetooth connection just for remote control. Could be a really nice way to get the best of both worlds!
  Reply
#5
(2024-08-11, 11:16 PM)jacqueline Wrote: I do think you could make a device like you're describing that works well with Tangara tho! Tangara literally already exposes a USB serial console over the USB-C port; we mostly use it for some special development/debugging commands, but you can also get access to a Lua environment over this console that includes all the usual system bindings. This is how, for example, Hailey's companion app (https://github.com/haileys/tangara-companion) is able to change Tangara's volume (screenshot here https://hails.org/@hailey/111889509622928744)

Niiice! I had no idea a serial interface was already exposed lol
Since that's the case, this should be really easy to make work!

(2024-08-11, 11:16 PM)jacqueline Wrote: The main roadblock you'll encounter is your little remote/dongle/thing will need to be able to self-power, as Tangara doesn't provide 5V over its USB port. But that should be a pretty easy solve!

Ah, damn. I was hoping that power would be accessible over the USB port, but ah well. I could likely implement a battery into my remote thingy, however chances are it'll probably be a tad janky.

(2024-08-11, 11:16 PM)jacqueline Wrote: Another option that might help that I've been meaning to explore, is using wired headphone output for audio, but a Bluetooth connection just for remote control. Could be a really nice way to get the best of both worlds!

oooo yea that sounds interesting! It's probably possible to use a low power ESP32 or Nordic chip to handle that, and it'd have the benefit of being wireless.
  Reply
#6
(2024-08-11, 11:16 PM)jacqueline Wrote: I do think you could make a device like you're describing that works well with Tangara tho! Tangara literally already exposes a USB serial console over the USB-C port; we mostly use it for some special development/debugging commands, but you can also get access to a Lua environment over this console that includes all the usual system bindings. This is how, for example, Hailey's companion app (https://github.com/haileys/tangara-companion) is able to change Tangara's volume (screenshot here https://hails.org/@hailey/111889509622928744)

I am Not Smart™

So I misunderstood this message at first. I thought you were saying that a raw UART interface was exposed on the USB-C pins, i.e. a TX and RX pin. Naturally, this isn't the case.

The chip I'm using in my remote is an ATtiny1616, a cheap, low-power chip that works fine for my needs. It's plenty capable of standard serial communication, but USB communication is far outside its abilities.

Combining this with the need for a battery, and honestly it would probably just make more sense to design an entirely different device that operates over Bluetooth and can control playback.
  Reply
#7
Ahh yes, that would be an issue. I think in theory you might actually be able to get the SAMD to speak UART over those pins by mapping them to SERCOM5 instead of the USB peripheral, but I don't think that's a super good idea (since you'd lose the regular USB interface). Still, slow-speed USB is a lot more achievable than you might think with very cheap microcontrollers!
  Reply
#8
No power over USB possible with firmware changes?
  Reply
#9
(2024-08-20, 07:59 PM)mspl Wrote: No power over USB possible with firmware changes?
AFAIK this would require hardware changes, see here.
  Reply


Forum Jump: