PC Volume and Media Controller





Introduction: PC Volume and Media Controller

My PC setup includes a pair of active speakers that don't have a separate volume control. Having to navigate to the windows volume every time to set the volume setting was a bit frustrating so I wanted to come up with an easier solution.

The controller itself is just a rotary encoder that detects the direction of rotation and sends commands to PC accordingly. I also added a play/pause button. The circuit is very simple so if you wan't to add more buttons (e.g forward, backward, stop...) that can be done easily by replicating the circuit concerning the push button in the schematic.

The actual volume controlling is done by a small windows app written in C# that simulates keyboard media key presses.

Step 1: Hardware

The schematic is very simple. More buttons can be added just by replicating the circuit seen in the schematic. I assembled the circuit to a perfboard an installed it in to a small enclosure. I used a 9-core data cable to connect the Arduino and the enclosed encoder. Regarding the encoder the number of steps per revolution is not critical but anything above 10 will do fine.


Rotary encoder (for example one or another )

220 ohm resistor


3x 10k ohm resistors



Knob for the encoder


Arduino (I used a cheap copy of Arduino Nano)

Momentary push button

Step 2: Software and Arduino Code

It is also possible to program the Arduino to be a HID device so that no external app would be needed (more about the topic can be found here). But I chose to use a Windows app because I have intentions to modify the project in the near future.

The controller communicates with PC over the serial bus. I wrote a small C# program that runs in windows in the background and can be accessed from the windows notification area by double clicking. The program saves the previous settings so they don't need to be set every time. I've also set the program to run every time I boot up my operating system (instructions can be found here). I've included the C# files so that the app can be easily modified.

The Arduino code is pretty simple. The controller sends command bytes to the serial bus according to the operation (button push, encoder clockwise or encoder anticlockwise). The windows application receives the bytes and simulates key presses accordingly. I made the code as simple as possible so it'd be easy to modify.

3 People Made This Project!


  • Pocket-Sized Contest

    Pocket-Sized Contest
  • Pro Tips Challenge

    Pro Tips Challenge
  • Science of Cooking

    Science of Cooking

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




Could you please give the circuit diagram in case that i want to add 2 more buttons ex. Next/Previous? Thanks.

Great job my friend, what would be the difference in making a subwoofer volume controller for and underdash mount in my car? (Forgive my ignorance) ;)


nice work :). I tried to do it but something went wrong. When I push the button it works, but only one time, If I'll push again it doesn't work. I tried to check and change some value on the arduino code, but without success.

Can you help me?have any suggestion? by the way I tried both apps whit mute and play /pause function, same result,

thank you


You could try to monitor the serial port from the Arduino IDE to make sure that it sends out the right messages. This way you can pinpoint whether the problem is caused by the program or the Arduino.

thanks for your answer.
So I have tried with serial monitor of Arduino (even without program), first time I push the button I can see on the serial monitor the number 3 (and this is what I expect), but after the first time, the number three don't come out again, only the function "volume UP" and "volume DOWN" still work.
I Hope it was clear, sorry for my bad english.

Very useful! There is no sound buttons on my keyboard, I'm very glad to have found this project! Thank you, pertti56!

can you post it?I don t have any "skills"in coding

nice project ,can you modify the project instead of play pause to be volume mute?

Sure, with the library used it's easy to use any windows media key function. The Functionality can be changed just by altering one word in the code.

Nice project

Is it possible to use this as a volume control on windows and control for example game volume, web browser volume and skype volume separately? Is it possible to change the rotary encoder to volume sliders and with the sliders you could control separately game volume, web browser volume and skype volume? How can I change the rotary encoder to sliders and where i have to connect the sliders. Is this even a possible to change rotary encoder to volume sliders?