I'm not the first person to publish an Instructable for a USB volume control, but I think this one is about as simple and cheap as it gets, and at the same time can be extended at minimal cost to various other functions such as:

  • Mute, Play, Pause and various other media buttons
  • Keyboard LEDs such as Caps Lock, Scroll Lock and Num Lock (a kana LED is also defined for Japanese users)
  • Application launch buttons such as browser, email, calculator etc
  • Browser navigation and other application control buttons
  • Gamepad buttons
  • System buttons for functions such as Sleep, Hibernate, Wake, Power down
  • Laptop screen brightness (Windows 8/10 only)
  • Mouse buttons and movement

and many more, subject to support being provided by your operating system. Mine implements the volume and mute functions (mute by pressing the knob) and the 3 main keyboard LEDs.

Have you ever clicked on a Youtube video and then fumbled for the volume control buttons when it started playing far too loud? Older laptops used to have a physical volume control but this is rare on newer ones and on desktop computers, which is why I wanted to build this.

And how many times have you carried on typing long after accidentally hitting Caps Lock, maybe on a scrabble tile type keyboard with the Caps Lock button a bit too close to the A key, and maybe having an inadequate Caps Lock light or no light at all? That was the other reason.

I assume you'll probably use a different box and so I leave most of the mechanical details to you, Other Instructables may give you a more aesthetically pleasing product using computerised manufacturing but my objective is to concentrate on the electronics.

Step 1: What You Need

This project is built around the Arduino Pro Micro (5V version), available from Far Eastern suppliers for £2 - £3. Other ATMega 32u4 based devices could be used, but not ones based on the ATmega328 such as the Nano or Pro Mini.

You also need a 5-pin rotary encoder, which you can probably find for £0.99, and a knob to suit.

The remaining parts you may have lying around:

  • Micro USB cable
  • LEDs (if required) and a 330Ω resistor for each LED
  • 1 tactile push button switch (or more for additional functions)
  • A couple of scraps of stripboard
  • Small project box
  • Connecting wire, soldering iron, solder, wire strippers and cutters etc.
<p>can't seem to find the pro micro board definition. won't the Leonardo setup work too as it's the same processor?</p>
<p>Make sure you have a recent version of the Arduino IDE. Under Tools -&gt; Board -&gt; Boards Manager, select Type: All and search for pro micro. It should be in SparkFun AVR Boards, but you have to read the list of boards supported by the package fairly carefully to spot it.</p><p>Setting it as a Leonardo might work but if it doesn't you'll probably kill the bootloader and then have to use ISP programming. The Pro Micro (and probably Leonardo) can be a bit finicky in that respect. The Leonardo indeed uses the same processor, but there are fuse bits which set certain low level processor options and I'm not certain these are exactly the same.</p>
<p>I can only find &quot;Arduino AVR boards&quot; if i search for pro micro. IDE is 1.8.1</p>
<p>You're right - I'm sorry I'd forgotten that I'd had to install additional board descriptions from a SparkFun Github repository. This url gives you the files and very clear instructions:</p><p><a href="https://github.com/sparkfun/Arduino_Boards">https://github.com/sparkfun/Arduino_Boards</a></p><p>Have fun!</p>
<p>Big thanks! works a charm</p>
Loved the layout and presentation of your project. Very professional but clear for the beginners eye.Thanks for sharing
<p>Very nice project!!</p>
<p>nice project , and a few question , on reboot of the windows , you have to reconect the board(I made something similar and on each reboot i had to reconect the board)</p><p>can you add some rgb leds to show the precentage of the volume (e.g. from withe to blue , am a flashing red whem mute is preset, something la dj consoles)</p>
<p>I'd love to be proved wrong but as far as I can tell the media functions are write-only, i.e. like a TV remote you can change the volume or toggle the mute but the on screen display is the only indication of the volume level or mute state.</p><p>I don't have to reconnect mine - it starts up as soon as Windows powers-up the USB port. But if you connect it to a USB port that is permanently powered I suppose you might just have to reconnect it if the Arduino hadn't noticed that Windows had gone away and was coming back as a brand new session.</p>
<p>this guy made it with rgb leds https://www.instructables.com/id/PC-USB-Media-Volume-Controller-based-on-Arduino/ , i am trying to figure it out how , but i am only an electronist and not so good with &quot;coding&quot; . maybe you can take a look</p>
<p>Yes, I looked at this one. The LED colour is changed as you turn the knob but it has no way of knowing what the PC thinks the volume level is to start with. It simply colours the LED more blue as you increase the volume until it's all blue, or more red as you decrease it until it's all red. So for it to mean anything, you'd have to first turn the knob until it's all red AND the PC thinks the volume is zero in order to get it into step.</p><p>You could do the same with mine if you wanted to. It has the advantage that no drivers are required and it's OS-independant whereas his requires a programme running on the PC to change the volume, the Arduino sending it conventional keyboard hotkey combinations. </p>
<p>ok , but i don&quot;t now how to do it , that s why i ask if you could change the code and schematic</p>
<p>I'm afraid I can't undertake to do custom variants for people. Coding Arduino isn't hard and it's a lot of fun, and there are loads of Instructables and other tutorials to get you started. Read up all you can and start learning - hey, it could even lead you into a new career!</p>
<p>Are you sure of those box dimensions? Might they be 50mm x 50mm x 20mm?</p>
<p>Silly misteak ;-) Well spotted!</p>
<p>Voted! Nice work!</p>
<p>This is actually exactly what I wanted for another project I had in mind. Great job! </p>
Awesome!!! Definitely gonna vote for you!!!
<p>Good job, looks very clean!</p>

About This Instructable




Bio: You can also find me on iFixit.com and Twitter @pleriche. Volunteer with TheRestartProject.org and keen to share my knowledge and skills and do ... More »
More by p_leriche:USB Volume Control and Caps Lock LED - simple, cheap, extensible Fibreoptic Christmas Tree Upgrade Automatic cat flap monitor with intrusion detection and dissuasion 
Add instructable to: