Smart Rack for Headphone




Introduction: Smart Rack for Headphone

This instructable shows how to make a smart rack/holder for your headphones.

By utilizing IR diodes to detect the presence of the headphones, audio can be routed to your PC speakers or to the headphones.

My headphones used to be lying around in random locations in my home office. Now they are always in the holder, and when ever I pick them up, PC speaker audio is re-routed to the headphones automatically.

The electronics is pretty simple, and could fairly easily be made solely with discrete components. To have some flexibility while making this prototype, I did however decide to use an Arduino to control things.

Step 1: Design Electronics and Software

The devices you will need to build the basics are:

  • Arduino Nano
  • A dual relay (or two single relays)
  • IR transmitter LED
  • IR receiver LED
  • Resistors (220, 470, 4K7)
  • BC547 transistor
  • 3 stereo headphone jack sockets

Assemble everything and run some experiments. My setup was pretty sensitive with respect to having the to LEDs well aligned, but then again I have made no effort whatsoever to increase the sensitivity. You can easily enhance the sensitivity by adding a transistor to the receiving LED, but for me it just was not necessary.

Example software for the Arduino can be found here:

Step 2: Solder Stuff

This first soldered version ended up rather ugly, but it works for me. If I ever make a second version, I will make sure to make it nicer.

Step 3: Make a Prototype

Going steampunk...

Using parts from an old bookshelf, cable stips, an empty jar, some scrap metal, etc. I assembled this prototype to prove the concept.

It was actually hanging of my desk for a few months until my whife ordered me to do something about it!

A friend of mine thought this was a kind of steampunk device, and that it looked kind of cool, but I have learned to listen to my wife.

Step 4: Make a 3D Model

Using Tinkercad I came up with the above design.

I have never used that software before (or any other 3D software for that matter), and gave up a few times in the process. The videos on youtube made Tinkercad usage look so easy, and finally I got it.

Step 5: 3D Print

The file from Tinkercad was fed to this 3D printer, and approximately 8 hours later I had the prototype in my hands.

Again this was my first 3D print ever, so I did need some guidance from a friend to get it going.

Step 6: Modify the Plastic Prototype

If I had spend more time with Tinkercad, I could possibly have gotten all the holes and cut-outs correct, but I gave up on that.Therefore I ended up having to do a lot of cutting and milling of the the plastic model. So make sure you have a vacuum cleaner at hand while doing this.

Step 7: Fitting Things Into the Plastic

Especially fitting the LEDs was tricky. I was unable to get them pushed through from the inside, so I ended up drilling larger holes, and pushing them in from the outside. They are not glued down on anything but they seem to remain in their position.

Step 8: What Now...

I tightened the stereo jacks well and glued down the metal plade. I know that eventually they will become loose, but for now it is OK

The pcb is simply covered by a piece of plastic (not shown), held in place by the mounting screws

Step 9: Mount the Holder

The holder is mounted under my home office table, and to be fair it looks better than the steampunk version.

The Arduino is powered through the mini USB connector, and on the pictur you can see the 3 audio cables.

This setup has been working nicely for a few months now, and I am pretty happy with the end result.

Future improvements:

  • A better 3D model, with no need for manual modifications
  • Make room for a lager PCB which can include the 3 stereo jack sockets
  • Make a proper PCB
  • Change the design so that two of the audio cables (to PC and to Speakers) are hidden under the desk. Only the headphone cable need to be visible and accessible.

Be the First to Share


    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020

    3 Discussions


    2 years ago

    I like this, but there are a couple remarks I have to make:

    - First of all the Arduino here is overkill here. A simple op-amp or comparator would have been pretty enough.

    - If you want to use the Arduino, add some functionalities: make it less sensitive to ambient light by modulating the light output, for instance (you can sample the output of the sensor with and without light to see if there is change); or you can make it controllable by the PC, or... well, it has a lot of possibilities

    - From the HW point of view, not much to say except THE FLYBACK DIODE! Whenever you use an inductive load (motor, relay, ...) you have to put a diode to let the coil discharge at shutdown. The most classical way is to put a diode (best if it is a Schottky one, but for low power even a 1N400x is better than nothing, even if it is usually slow - note: x is a number from 1 to 7; I usually use the 1N4007, since I don't find 1N4001 around and it cost almost the same) . So the diode goes in parallel with the load, in such a way tha in normal operations it does not conduct (so, in your case, the anode is connected to ground and the cathode to the collector of the transistor)


    Reply 2 years ago

    Thanks for your suggestions, especially regarding the flyback diode. I agree
    that the Arduino is overkill, but it did give me some flexibility while experimenting.


    2 years ago

    this is cool. Love this set up. thanks for sharing :D