Intro: USB Volume Controller - Potentiometer Based
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!