USB Volume Controller - Potentiometer Based

5,904

136

18

Posted in Technology3D-Printing

Introduction: USB Volume Controller - Potentiometer Based

About: I am just a bit of electrons orbiting around neutrons and protons

In this instructable i will show you how to make simple but effective USB volume controller.

What sets it apart from other such devices is that it is potentiometer based. But what does this mean? That means it has a scale and can be set to, for example, to 50% max volume by rotating it to the middle. As for the encoder based volume controllers, you can only turn them left to decrease volume or right to increase it, which means you never know what volume level are you at.

It also connects to your computer via USB and controls Windows internal sound level. Some other devices connect between the speakers and PC's Jack output. It means that you can have only one device connected and if for some reason your Windows sound level is set to 0 you won't be able to use it.

Step 1: Parts

Here are all of the parts you will need for this project:

  • Arduino Pro Micro,
  • 10kΩ potentiometer (like the one in the picture),
  • 6mm heatsink - not necessary but I have one left from my Raspberry Pi so why not using it?,
  • M3 12mm bolt, washer and self-locking nut,
  • some heat-shrink tubing and rubber bands,
  • a few bigger nuts - they will add some weight,
  • Micro USB cable,
  • 3D printed parts.

and various tools (soldering iron, glue, etc.).

Step 2: Design

The project was designed in Fusion 360 to ensure all parts will fit together nicely. They also don't require support material.

Step 3: 3D Printing

Now it is time to 3D print necessary components. The .STL files can be downloaded below or from my thingiverse site.

None of the parts require supports, just rotate them in an orientation seen in the picture.

Step 4: Electronics

Electronic circuit is quite simple. All you need to do is to connect potentiometer to Arduino.

Potentiometer's left and right pins should go to VCC and GND on your board. It's middle pin goes to Arduino analog pin A1.

Firstly solder wires to Arduino pins, than put heat-shrink tubes over them.

Bend them so that they match potentiometer pins order and solder them.

Afterwards heat the tubes to prevent any shortage on solder joints.

Also check out this amazing instructable: https://www.instructables.com/id/Make-Beautiful-Solder-Joints/

Step 5: Base

Now let's put electronics into it's place.

The first thing is to put one of the bigger nuts to the slot below Arduino board. Secure it with some superglue to prevent any vibrations.

Then use potentiometer's included screw to hold it in place for now and slide arduino in place. It can be secured from the back with one of 3D printed parts. Next put M3 nut from the other side and screw everything together. Don't forget to put a washer below M3 bolt.

Then stick heatsink on top of Arduino microcontroller, be careful because it can't touch any metal parts around main integrated circuit - it may short a circuit. Place a clip on top of it to hold it more firmly - I don't trust this double sided tape!

The next thing will be to put all of big nuts into corresponding slots, glue can be added to them at this point.

When you're happy with it slide the black part on top and screw everything using nut from potentiometer. Also place washer below it and add some superglue so it won't unscrew itself over time.

Step 6: Knob

Slide in 4 nuts to their slots and fix them in place with some superglue or 2 component epoxy.

Put the knob on the shaft and secure it there with glue. Make sure that it isn't rubbing against the bottom part of the device.

Step 7: Where Is the Middle?

Determinating the position of the scale (in the bottom piece) and the indicator (in the top cover) is quite simple.

Firstly rotate top half all the way to the left and put on the top cover so that indicators on both parts match but don't push it to the end yet. Then rotate it right and check if the parts match. If not, adjust top cover position. At the end put some superglue underneath the cover and push it to the bottom.

Again, make sure it isn't rubbing against the bottom.

Step 8: Program

I've made a simple program for the Arduino. It uses HID library to connect to your PC through it's micro USB port.

The only thing you have to download is HID-Project library for arduino. Just open Arduino IDE, select Sketch tab and Include Library > Manage Libraries. Then a window will pop up. Type HID-Project in the search bar and install HID-Project by NicoHood.

Next select Arduino Leonardo board and your port and flash it with the code included in this step.

Step 9: Done!

Just like that you made nice and reliable usb volume controller!

I encountered some problems with the Windows volume changing but i managed to solve all of them and the final version works very reliable. The addition of steel nuts makes it feel very premium as well :)

I hope you like my Instructable, feel free to leave me a comment!

Microcontroller Contest

This is an entry in the
Microcontroller Contest

Share

    Recommendations

    • Woodworking Contest

      Woodworking Contest
    • Casting Contest

      Casting Contest
    • Make it Move Contest

      Make it Move Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    18 Comments

    > 10kΩ potentiometer

    Something tells me it's the worst part you could use. First, it's cheapest cr@p you can buy from China - quality here is important, since you need proper position, not eventual jumps.

    Second, it has sliding parts (cheap, remember?), what mechanically means "just wait until it breaks soon".

    I think better could be to use rotary encoder, which also has rounding, but not sliding(!) part.

    And of course, I never repeat this project just because I have no 3D printer! (like most of us) Better if you give idea what can be used from garage rubbish. :)

    And since I did myself similar thing (but with sliding potentiometer), I soon found it boring. What about MOUSE with rotary encoder? :) I know it's already made by MS, but f*** 'em, greedy pandas hardly will sell it for $10.

    3 replies

    The description defines why a rotary encoder was not used ! Don't buy the "cheapest cr@p" from China, buy quality components if you don't want "eventual jumps and waiting til it breaks"...

    This is a great tutorial , thanks for posting it.

    This potentiometer actually works quite nice. Arduino reads it's position with 1024 steps accuracy, which indeed creates some jumps, but i am mapping it to 51 steps which reduces all of them. I bought my from local store and it's lifespan is a lot longer than rotary encoder's.

    It has sliding parts inside but they are spring loaded and even if they wear out a bit they will still work. Encoders on the other hand have metal gear inside with piece of metal sliding(!) around it and it wears out a lot faster, i was forced once to buy a new mouse because of the broken wheel driving me mad when scrolling. The only time when i broke a potentiometer was when i put a screwdriver right through it (smal SMD one from stepper drivers).

    As for 3D printed parts you can just order them from the internet or buy a cheap 3D printer from China for your garage.

    And of course, if you want to build it with encoder and no 3D printed parts you can find a lot of tutorials on how to do that on YouTube or even here on Instructables.

    I hope you soon will build whatever volume controller you like yourself!

    I didn't know you could control the internal volume of the computer, I took apart an old speaker and use its potentiometer/amp to control the volume of my headphones, externally.

    But do you actually need to know the volume level you're at, it's either too low, just right, or too loud, the number means nothing. After all so many people, feel uncomfortable when their TV volume isn't at an even number. This conversation on whether that's moral or not should be muted.

    Kind of a bummer though that it needs an Arduino though.

    5 replies

    Yes, it's actually very useful to a lot of us to know where in its range that volume control is. If you only play music files for entertainment while you do something else, the rest of this doesn't apply.

    But for someone who edits video and sound, there are going to be multiple volume settings and it's helpful to know where each of them are set at a glance. For example, levels for each track in the software, overall editing software level and Windows sound system level, plus any external volume controls like on amplifiers for speakers. I'm always annoyed at having to get Windows volume to pop up so I can see where it is set. Everything else I can tell quickly without interrupting my workflow. OK, except my current speakers. I can't see the line on the volume knob because Yamaha placed it on the top and at the back edge so when the desktop speakers are tilted back I'm always grabbing the speaker to turn it over enough to see the volume indicator, cause it matters to me.

    True, I didn't think of that. But unfortunately most of the Youttube videos I watch have the audio levels balanced horribly, AKA low quality mic recording a voice over for a video with loud music, and tablesaws that make me go deaf... A bit of an exaggeration, but I wish everyone was like that!

    For some reason it is just better for me to have min and max sound level defined and not only + and - volume.

    Thanks for your comment!

    The usual sort of pots like the one you pictured come in two flavors: linear taper and audio taper. I am guessing you used linear taper. Did you consider using audio taper?

    1 reply

    That is true, i used lnear one. I wonder how audio taper would work, but i am not sure if Windows itself isn't working kinda like it. Maybe i will try that at some point.
    Thanks for a great idea!

    Definitely a cool project, I've often thought of making something similar, and might use this as a stepping stone to creating my own!

    1 reply

    Very well done. Those designs are well put together and the final product looks good. Thanks for sharing!

    1 reply

    Lovely. I have a similar device built with encoder with momentary switch that I use for frame movement and playing (using for controlling Adobe Premiere) in video editing. It's a Griffin Powermate. Not sure if you can get them anymore but this would be an excellent alternative if you could change function from volume to whichever. Much like the Griffon Powermate can do via the windows drivers.

    1 reply

    In the HID-Project Arduino library you indeed can change the function to any key or even mouse movement. I believe that even multiple key combinations are possible but only with standard keyboard keys, you can't just add 200 new buttons :)