One of the redeeming qualities of many modern cheap keyboards is the built-in volume control buttons. But this is Hackaday, and many of us (and you) have Model Ms or newfangled mechanical keyboards that only have the essential keys. Those multimedia buttons only adjust the system volume anyway. We would bet that a lot of our readers have sweet sound systems as part of their rig but have to get up to change the volume. So, what’s the solution? Build a color-changing remote USB volume knob like [Markus] did.
Much like the Instructable that inspired him, [Markus] used a Digispark board and a rotary encoder. The color comes from a WS2812 LED ring that fits perfectly inside a milky plastic tub that once held some kind of cream. When the volume is adjusted, the ring flashes white at each increment and then slowly returns to whatever color it’s set to. Pushing the button mutes the volume.
The components are pretty lightweight, and [Markus] didn’t want the thing sliding all over the desk. He took an interesting approach here and filled the base with the lead from a shotgun round and some superglue. The rotating part of the button needed some weight too, so he added a couple of washers for a satisfying feel. Be sure to check out the demonstration after the break.
Digispark board not metal enough for you? Here’s a volume knob built around a bare ATtiny85 (which is the same thing anyway).
Into. the wonderful…
At first i thought that was the music from the old amiga game gods but i think im wrong now :)
Very well recognized! With the children in bed, I had to keep the levels way down :) Strictly speaking it’s “Gods rmx” from Parsec.
I want to build one of these with a linear pot.. So I can set volume exactly and not wait for visual feedback
Actually setting one of the LEDs to, say, red, to indicate the volume level, would be a good idea. Like the little mark on a volume knob. Would take barely any code adding.
To both of you: You cannot implement this, because you can only send increment/decrement commands (NOT set absolute values), and you don’t know the absolute position at which the computer’s volume is currently set (there’s no way to ask the computer).
The current volume can be stored into flash.
On power up the control can send as many down steps as there are (the maximum) and then increment back up to the desired level.
That only works if nothing else adjust the volume.
If you use a custom protocol instead of simply HID (or using usb-serial) and an application on the computer would allow you to set volume to specific levels.
It doesn’t *only* work if nothing else adjusts the volume. It’s an absolute reference because the lowest setting the PC supports is zero – it cannot go into negative numbers.
If you use a custom protocol then you have to write a custom driver.
Or send the set to zero with every adjustment.
> Or send the set to zero with every adjustment.
Yes, this would sound super bad.
> It doesn’t *only* work if nothing else adjusts the volume.
He ment you would be into the unknown, if the volume would be changed by something else *after* you perform your “zero-reference-calibration”.
In theory one can come up with kind of a solution, but in practice it does not work when only using it as a HID keyboard device.
Well I’m going to give it a go anyway and find out for myself what works.
At USB speed a cal and then inc the vol back up should be so fast that it’s not audible.
Would love to hear if you can find a good solution.
> At USB speed a cal and then inc the vol back up should be so fast that it’s not audible.
I doubt that.
1. Even *very* short times with low volume are audible as anoying clicks.
2. The shortest poll-interval for HID is 1 ms, which is not so short in the above sense.
3. V-USB only implements USB low-speed, so for faster USB communication you have to use something with dedicated USB hardware.
@RÖB, would be interested to see if it’s possible
@[Markus Gritsch]
Quote: “1. Even *very* short times with low volume are audible as anoying clicks”
Yes this is the make or break of it all
Quote: “2. The shortest poll-interval for HID is 1 ms, which is not so short in the above sense”
This is the interesting part. A USB Keyboard still uses the “AT” keyboard protocol. This protocol was made when the CPU was like 4MHz so it has some old and useful features.
Firstly *while* the communication to the host is timed synchronously with the keyboard and under control of the host … initiation of the sequence was asynchronous so the keyboard can initiate a transfer at will.
Because of the limitations of the historical slow CPU speed, there is a buffer on the host end.
I should be able to fill this buffer so that one poll from the host system can do all needed.
Quote: “3. V-USB only implements USB low-speed, so for faster USB communication you have to use something with dedicated USB hardware”
Well I can always bit bang USB in assembly or find a chip with a hardware implementation.
Some of the Atmel chips have hardware USB so I should still be able to get away with using the ‘duino environment (IDE). Not sure on this one though.
Did you have a go at this solution?
I bought the hardware (a DigiSpark) and I downloaded a newer version of the Ardiono IDE and found that it would not allow me to install the libraries for the DigiSpark because they were NOT Arduino approved.
I then tried to manually install the libraries into the file tree and it still rejected them.
Then I thought, “is it worth using software from people that believe they should have the right to choose what libraries I can or cant use?”
Well the answer was a resounding “NO” and that was the last I had to do with Arduino.
Which version did You try? I have no problem using the latest 1.6.8.
I cant’ recall which version it was but it wasn’t long after this article.
For me it isn’t an issue about weather or not I can get Arduino working. I have been using this platform for many years and I have modified it to suite many other AVR’s so quite clearly I can get it working.
The problem for me is that when the Arduino.cc start adding software (or features) to their platform to control what libraries can or cannot be used, then it’s time for me to completely drop any association with Arduino on principle alone.
Can you give a reference to where such a library refusal-feature is mentioned?
Well the refusal came from an installation that is on another PC here. I will keep this in mind when (or if) I use the other system again and let you know the version. As for a reference to the feature itself – well it open source so it shouldn’t be hard to find. The other system has Windows XP on it.
“held some kind of cream” LOL
I was also inspired by the first one and now I am making one with a twist lol.
I will post it to io when it’s done.
The twist is that it doesn’t have a quadrature switch instead it uses an um perhaps … “output device” for the input. But still the same – based in a digispark. I still have set up the Arduino IDE for it.
You use a motor? Why not, nice and robust, not going to wear out any time soon.
If it’s a stepper, or a servo, and you put a bit of gearing on it, you could even have an automatic option. Do they make servos you can turn by hand freely?
Again, this has already been done. I use an old Griffen Powermate along with my IBM Model F.
Very nice. I make my own ammo at home, so I should take some shot and do this, too.
I have found that configuring keyboard preferences on all my (and my friends/families) Linux systems so that right “CTRL” and Numeric Keypad “+” increase the volume and right “CTRL” and Numeric Keypad “-” decrease the volume, is a very convenient way of controlling volume without needing a special input device.
That is going to be annoying if you want to zoom in your web browser (which I personally do more often than changing the volume)…
There’s a program called “X-mouse button control”, free, and I think the original version is for Linux, I’ve got the Windows one. Lets you redefine mouse buttons, useful if your mouse has more than 3 buttons. You can even set command pages, to have more complex controls, and you can set per-application settings, so it does different things in different programs.
I’ve set my mouse’s side buttons, previously annoyingly defaulting to browser page back / forward, to volume controls. The program can emit most mouse and keyboard inputs, including the media buttons on the more fancy keyboards. Seems like it started as a useful hack that the programmer decided to share.
It is of course utterly free. From http://www.highrez.co.uk . A free ad by a happy free customer!
Oh… except when I’m over the taskbar. Then it changes to media controls, FF, play/pause, RW. For Winamp, or anything else that keyboard media buttons work with. Set that up myself, of course.
Control-scroll, is easier perhaps for browsers.
For volume I leave the computer at a calibrated level (all bits used at max level) and use the amplifier for level. When you turn the computer down from this level you are listening to less and less bits of reproduced sound coming out of it. Hurrah for a simple voltage divider, a pot and it’s simple computation with no data loss. Well two or four for me. Also it is not blind, you can preset it without hearing anything yet. When using a soft pot for VLC you can clip the bits at 200% on properly recorded material without knowing it.
This article has been featured before, if not one just like it.
Far as I know, reducing volume on a PC doesn’t reduce the available bits. It uses the mixer chip that comes with the sound chip (somewhere in the motherboard chips).
Maybe some horrible motherboards do it your way, but every PC I’ve looked at seems to use the Realtek embedded chipset.
Using the pre-made shell makes it look really clean and professional.
The Corsair K70, arguably the most popular mechanical keyboard, has media keys including a volume wheel.