It's taken me ages to get back to this, but I've found that with the "disable outputs when off" setting, the output does change in a detectable way. Using my multimeter, I can see that when it's on, the optical output has a frequency of 1413 KHz. When I switch it off, that drops to 1323 KHz (this is what I was missing when I first looked at this - with "outputs always on", this stays at 1413KHz). The 'on' frequency changes when playing (to around 1964KHz).
I'm not entrely sure how I'm going to do this, but these differences are measurable, so I could contruct something to switch the amp on/off. I'll figure something out and let you know how I get on.
Results 11 to 12 of 12
Thread: Hacking the Toslink Optical?
-
2012-07-15, 13:38 #11Junior Member
- Join Date
- Jan 2007
- Location
- London, UK
- Posts
- 9
-
2012-08-12, 05:43 #12Junior Member
- Join Date
- Jan 2007
- Location
- London, UK
- Posts
- 9
Solved (sort of)
I've got a solution to most of the goals here. I can now control an amp using the optical (or coaxial) digital output, although can do a considerably better job on modern Squeezeboxen, such as the Duet Receiver. There are some options for the Squeezebox 1, which I'll be exploring in more detail in the future, but I have a basic solution already.
The general gist of the solution is to use an Arduino as a frequency counter. It's basically watching the optical carrier frequency, and then turning a relay on or off depending on the frequency of the digital. This works very nicely for modern Squeezeboxes that have the "switch output off when off" option available in the server.
For older players, like the Squeezebox 1, the simplest, most robust solution is to watch for music being played (which causes the carrier frequency to go up to about 1700KHz), and then turning the amp off if no music has been played for some time (eg. after an hour of idle). The player does send some sort of "I'm turning off" signal when it turns off, but the signal is encoded on a short burst of lower frequency carrier signal. It's detectable, but easy to miss or mis-detect. The timeout option is potentially useful for modern players too, because it avoids the need for the server to power-down players when they're not being used.
I've tried to write this whole thing up here: http://electronicsfordogs.com/articl...ier-squeezebox
Thanks again to everyone who helped out!

Reply With Quote

