Shop OBEX P1 Docs P2 Docs Learn Events
Amp Switcher — Parallax Forums

Amp Switcher

SSteveSSteve Posts: 808
edited 2008-03-06 17:05 in Robotics
Sorry this post is so long, but it's my first electronics project that I designed from scratch, so I'm a little excited.

I have this hybrid home audio system. Some of it is modern home theater gear and some of it is DIY/retro. It's all routed through an Onkyo TX-SR800 home theater amp. I use it to drive the center and surround speakers. But for the left & right speakers I take a line out from the Onkyo and feed it to a customized Linear Power car stereo crossover. The high output goes to a Dynakit Stereo-70 which drives a pair of Ariel 5b speakers that I built. The low output goes to a Hafler DH-200 which drives a home-built subwoofer.

An Ariel and the subwoofer:
attachment.php?attachmentid=47463

The Linear Power crossover sends out a spike when power is applied or removed so it has to be turned on before the amplifiers and turned off after the amplifiers. But since the Dynakit is a tube amp, you have to wait about 20 seconds after turning it off before removing power from the crossover. The crossover is powered by a 12-volt lead-acid battery. When the system isn't being used the battery is connected to a charger. These were all routed through a DPDT switch. The amps were plugged into a power strip and controlled with its switch. The switches were over in the corner of the room on the floor, so turning everything on and off was an inconvenience. Besides, it can be easy for someone to flick the switches in the wrong order and potentially damage a speaker.

I decided to build something that would allow me to turn the amps and crossover on and off from my remote. I read Jon Williams' Nuts & Volts article about deciphering the Sony remote codes. I used that information to decipher the remote codes for my Onkyo. I modified his Sony-based SX program to work with my Onkyo and added the ability to cycle power with a push button. The program controls power to the amps and the 12V routing between the crossover, battery, and charger.

My electronics knowledge is sketchy at best (my background is in software). I tried to figure out how to route the 12V between the crossover, battery, and charger with MOSFETs and supporting hardware, but then I figured I had two unused slots on the RC-4 so I just used DC SSRs. When I first hooked everything up, the 12V routing didn't work--everything was always connected to everything else. But then I realized that while the AC SSR's output is non-polar, the output of the DC SSR has a positive and negative. Of course the way I initially hooked them up was the 25% chance of both of them being backwards. When I reversed them both, it worked perfectly.

The operation of the program is like this:
When the current state is off and a power on command is received (or the button is pushed):
1) Disconnect the charger and battery
2) Connect the crossover and battery
3) Turn on the amps
4) Blink the LED quickly a few times during steps 1-3 and leave it on

When the current state is on and a power off command is received (or the button is pushed):
1) Turn off the amps
2) Blink the LED slowly while waiting about 20 seconds
3) Disconnect the crossover and battery
4) Connect the charger and battery
5) Turn the LED off

The boards:
attachment.php?attachmentid=47460

Inside the box:
attachment.php?attachmentid=47466

When I first connected the amps through the SSRs, I noticed a small 60Hz hum. I connected the amps directly to the power strip and found that there was even more hum, so it turns out I actually get better sound using the SSRs!

So now the whole conglomeration can be powered on and off with one touch on the remote.

The back:
attachment.php?attachmentid=47462

In place:
attachment.php?attachmentid=47461

Schematic and source code are attached to the next post

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows

links:
My band's website
Our album on the iTunes Music Store

Post Edited (SSteve) : 6/1/2007 4:56:16 PM GMT
800 x 600 - 290K
800 x 600 - 256K
800 x 600 - 139K
688 x 800 - 126K
451 x 1250 - 334K

Comments

  • SSteveSSteve Posts: 808
    edited 2007-06-01 16:50
    Source and schematic attached.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows

    links:
    My band's website
    Our album on the iTunes Music Store
  • JonnyMacJonnyMac Posts: 9,105
    edited 2007-06-06 01:41
    You probably know that your PAUSE calls are longer than what you code says due to time spent in the ISR. If you need to create a delay that's millisecond accurate it's easy to do by adding a bit of additional code to the ISR -- download the "Stamp Applications" code from May 2007 to see how.

    Nice job on the project.
  • SSteveSSteve Posts: 808
    edited 2007-06-06 02:50
    JonnyMac said...
    You probably know that your PAUSE calls are longer than what your code says due to time spent in the ISR.
    My intention is that interrupts are disabled whenever the PowerOn and PowerOff routines are running (which is the only place I call PAUSE). That's what this does, right?
        IF powerButton = buttonDown THEN
            ' Button is pressed--toggle power
            OPTION = $0                    ' Disable interrupts
            rxCmd = 0                    ' Abort any command that was in process
            hasCmd = 0                    ' Cancel any received command
            IF powerState = 0 THEN
                PowerOn
            ELSE
                PowerOff
            ENDIF
            OPTION = $88
        ENDIF
    


    If not, please let me know because it means I don't understand the OPTION register. smile.gif In any case, I just printed out the May 2007 Stamp Applications article and will check it out.
    JonnyMac said...
    Nice job on the project.
    Thanks. I wish I had more time to devote to learning electronics. It's a lot of fun. I've been a programmer for twenty-five years or so and I've always had the most fun programming when it makes something blink, buzz, or move so microcontrollers are a blast.

    BTW, I saw you and John at the Maker Faire. I should have said hi, but I didn't have anything particularly interesting to say so I just checked out your booth for a minute.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows

    links:
    My band's website
    Our album on the iTunes Music Store
  • Justin SaneJustin Sane Posts: 35
    edited 2007-06-06 18:41
    Sweet job.

    I wonder what technique you used to label your input? I see black texts on that wooden box.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"Imagination is the one weapon in the war against reality."
    -Jules de Gaultier
  • SSteveSSteve Posts: 808
    edited 2007-06-06 18:45
    I used a Dymo Labelmaker with transparent-backed tape.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows

    links:
    My band's website
    Our album on the iTunes Music Store
  • slosjoslosjo Posts: 25
    edited 2008-03-06 15:20
    Can you elaborate on your home-built speakers?· They look very nice, what are the specs?· What drivers did you use?



    Nice work on your project
  • SSteveSSteve Posts: 808
    edited 2008-03-06 17:05
    If you click on "Ariel 5b speakers" in the original post, it'll bring you to the web page with all the details (http://www.nutshellhifi.com/Ariel.html). To be honest, I feel like they turned out to be a lot more work than they are worth. They sound nice, but they aren't mind-blowing and for the amount of time I spent woodworking I wanted mind-blowing.

    A friend helped me design the cylindrical subwoofer using a program called BassBox Pro (http://www.ht-audio.com/pages/BassBoxPro.html). The drivers are a pair of ScanSpeak 25W/8565-01s pointed at each other and wired out of phase. If you want the construction specs, I might be able to dig them up somewhere. I just did a quick look around and didn't see them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    OS-X: because making Unix user-friendly was easier than debugging Windows

    links:
    My band's website
    Our album on the iTunes Music Store
Sign In or Register to comment.