Inline Volume Controller - Page 1
Forum section: electronics / projects

author: CharlesSpong
author_rank: Contributor
timestamp: June 15, 2017, 07:32:24 pm
content: I am trying to make an inline volume controller that can take an input volume and provide a proportional output (0 - 100%) of the input. I need it to keep signal integrity.My eventual plan is to have this controlled by another device via electronic control, having a knob on a box and electronic control would be a bonus (perhaps a motorized pot).This possibly already exists, it must be an inline device (between amp, 100W+, and speakers), but I couldn't find one because I don't really know what to call it.Any help appreciated, a schematic of a possible idea would be excellent as I will likely want to add this circuit to another PCB.

author: cat87
author_rank: Regular Contributor
timestamp: June 15, 2017, 07:39:00 pm
content: Just to be sure what you want is correctly understood: you want the volume control to be between the ooutput of a 100W amp and the speaker? Or do you want a volume control integrated somwhow into a 100W amp?

author: CharlesSpong
author_rank: Contributor
timestamp: June 15, 2017, 07:41:03 pm
content: Yeah between the amp and speaker.EDITThinking about this more, I am thinking of using a rotary encoder for the physical control to make the software easier for displaying the current value in a web interface.

author: retrolefty
author_rank: Super Contributor
timestamp: June 15, 2017, 11:54:19 pm
content: It's called an speaker L-pad in the industry and you spec them by speaker impedance and wattage.

author: john_c
author_rank: Contributor
timestamp: June 16, 2017, 12:32:44 am
content: Yes, that can be bought. Either with encoder or with motor pot. They usually have an input select, too. Just add your own case!http://www.ebay.com/itm/162539592473http://www.ebay.com/itm/110778589140http://www.ebay.com/itm/291760856538You can't put this after the amplifier output, though. Why would you do that?

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 16, 2017, 01:18:06 am
content: I did not see any explanation of WHY you think you need to control thespeaker-levelsignal "(between amp, 100W+, and speakers)". Controlling speaker-level is extraordinary expensive and inefficient compared to controlling line-level going INTO the amplifier. And particularly so with a 100W signal power. A 100W potentiometer (or rheostat) is somewhere around $100 and the size of a chicken pot-pie.Those things went out of style a generation (or two) ago. There are much better ways of controlling levels here in the 21st century.

author: cat87
author_rank: Regular Contributor
timestamp: June 16, 2017, 06:58:48 am
content: Ideally, this sort of thing is done (volume control I mean) somewhere where the signal is still small i.e. between the input stage of the amp and the power output stage.Could you please detail a bit more why you need to adjust the full 100W output power? Maybe there are some more elegant solutions to your problem.

author: CharlesSpong
author_rank: Contributor
timestamp: June 16, 2017, 12:21:40 pm
content: The idea is to control an audio system with home automation but it needs to be put in between an audio source and the output as that means it could be used between any source and any output. I was wondering if perhaps some solution using transformers or mosfets may be possible.Something like this,http://www.ebay.com/itm/Monoprice-8243-Speaker-Volume-Controller-RMS-100W-Rotary-Type-White-/390988924939?hash=item5b08c1880b:g:11QAAOSwpdpVd1dSbut electronically controlled.

author: Zero999
author_rank: Super Contributor
timestamp: June 16, 2017, 12:53:57 pm
content: Quote from: CharlesSpong on June 16, 2017, 12:21:40 pmThe rotary controller you've posted is a transformer with a rotary switch to select different taps. You could replace the switch with relays and use the transformer part.It would be easier to hack your stereo, so the variable attenuator is before the power amplifier.

author: cat87
author_rank: Regular Contributor
timestamp: June 16, 2017, 01:04:40 pm
content: If you need this for a PA system, you could go with the thing you found on eBay. But if you want to use this for so me home Hi-Fi system, then the best method is to hack into your amp and add a simple pot, which then you can motorize. Or, you could do it with a JFET. Look for FET volume control. There are a lot of schematics out there.For hacking into you amp, can you get a hold of a schematic, or something? If not, then rip into it and take a few photos of the inside. Someone might suggest where the best place could be for inserting you hack into the system.

author: kalel
author_rank: Frequent Contributor
timestamp: June 16, 2017, 01:28:54 pm
content: Quote from: CharlesSpong on June 16, 2017, 12:21:40 pmI guess he is looking for a way not to modify the amplifier, as to be able to use this device on any amplifier.

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 16, 2017, 02:28:55 pm
content: Audio power amplifiers are so inexpensive (i.e. CHEAP) here in the 21st century, it would be much easier (and cheaper) to use a separate power amp for each speaker and do all the source selection and level control at line-level where it is equally trivial to do with logic.Using a single big power amplifier and controlling speaker-level was done back in our grandparent's era because good audio power amps were expensive. It is 2017. We are not constrained by those ancient limitations any more.

author: tooki
author_rank: Super Contributor
timestamp: June 16, 2017, 04:26:56 pm
content: Why not just get an AV receiver with RS-232 port for automation? That'll probably end up cheaper than hacking something together, if you value your time. (If you don't need HDMI, then you can get a used high-end AV receiver for peanuts.)

author: CharlesSpong
author_rank: Contributor
timestamp: June 16, 2017, 06:11:40 pm
content: Quote from: kalel on June 16, 2017, 01:28:54 pmYou are right I don't want to have to modify an amp as that makes it difficult to change to another amp.Cat87 - Do you think this could be a suitable schematic with a little modification for 100W,http://freecircuitdiagram.com/2012/01/11/voltage-controlled-attenuator-volume-control-using-fet/

author: cat87
author_rank: Regular Contributor
timestamp: June 16, 2017, 07:58:18 pm
content: QuoteActually, I was refering to the JFET as a way to control the input voltage, not the full 100W.You can make that work, but remeber you have to dissipate a lot of power (up to the 100W point) on you active device(s). That means tha if the FET is left to its own devices, it'll start behaving diferently once it heats up.Something that has the JFET in the feedback loop of an op-amp is going to (maybe) keep the whole thing from overheating.Basically, instead of having the Gate cnnected to the wiper of a trimmer, you connect the output of an op-amp to it. Then, in series with the source of the FET, you place a current sensing resistor (1 Ohm or less) and connect the inverting input of the op-amp between the resistor and source of the FET. The drain will basically be you Signal In pin.Then you connect your control voltage to the non-inverting input i.e. your control knowb will change the voltage on the non-inverting pin.Now this is just for you to get a general idea of things. This is still kind of a crude way to do things, but I think it's better and less combersome than a transformer and will likely have a better response regarding how the music will sound. And just to make things clear, you'll need to parallel more devices for it to handle up to 100W. If all else fails, you'll at least have a nice heater for the winter time

author: Zero999
author_rank: Super Contributor
timestamp: June 16, 2017, 08:30:32 pm
content: Quote from: CharlesSpong on June 16, 2017, 06:11:40 pmJust to clarify things here: are you talking about an amplifier in isolation or a full blown stereo system with CD player, radio, turntable etc.?If it's just the amplifier, then it's easy to add an electronic volume control to the input, as mentioned above. You can probably also get mixers which can be remote controlled, allowing both the volume and signal source to be selected.If you're talking about a stereo then that makes things more difficult. Does it have an IR remote control? If so, it's usually easy to reverse engineer the codes, build an IR remote and connect it to your computer.Failing both of the above, you'll have to modify the stereo in some way or add the volume control afterwards. Rather than messing around with multi-tapped transformers or rheostats, add a fixed attenuator and filter (to get rid of any RF if it's class D) to the output of the amplifier or simply use the headphone socket, if available, and then another power amplifier which can be designed for remote control.

author: viperidae
author_rank: Frequent Contributor
timestamp: June 16, 2017, 09:30:40 pm
content: Seems like a terrible is to me. Shorting the output of an amplifier to reduce the volume is never going to be good.

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 16, 2017, 11:53:38 pm
content: Quote from: CharlesSpong on June 16, 2017, 06:11:40 pmNominated for the WORST IDEA OF THE YEAR.Although it is only June, so who knows?@CharlesSpong controlling audio levels at SPEAKER LEVEL is aREALLY TERRIBLE IDEA!Please consider a realistic solution.

author: Audioguru
author_rank: Super Contributor
timestamp: June 17, 2017, 01:47:15 am
content: An L-pad does not short the output of the amplifier. It is a resistance in series with the speaker and a load resistor for the amplifier.Maybe you do not want high fidelity. All good quality amplifiers have a spec called its "damping ratio". Since a speaker has resonances then the extremely low output impedance of a modern high fidelity amplifier (a damping ratio of 500 has an output impedance of 8 ohms/500= 0.016 ohms) damps the resonances. An L-pad destroys the damping ratio and causes the speaker to resonate like a bongo drum.

author: CharlesSpong
author_rank: Contributor
timestamp: June 17, 2017, 09:34:24 am
content: This device must be inline after amplification as some devices have built in amplifiers, the idea of the project is to set the volume (of the source) to max and then be able to control the volume remotely down to 0% of that source volume. (To clarifyDevice Modification IS NOT AN OPTIONas it needs to be swapped between sources).Everyone is saying this is impracticable, 100W amps are really cheap (like £10), is it possible to change the volume of the output of an amp but not at full power and then re-amplify. To clarify the line would be, Source (Built in amp) - Volume Controller - Second Amp - SpeakerWhilst I don't want it to sound like rubbish the sound I am doing this with is not exactly audiophile grade, getting this to work is more important than $1,000,000 audio.Thanks for all your help so far.

author: Delta
author_rank: Super Contributor
timestamp: June 17, 2017, 12:57:23 pm
content: K.I.S.S.Simply build a 50metre extension on your listening room, build motorised trollies for your speakers, and connect them via slipring equipped winches.Encoders on the trollies could be used with an MCU to enable the winches to spool in/out as the speaker trollies move.Et voilà, with the speakers at 50m = minimum volume, driving them closer will increase the volume to the desired level.Hydraulic or pneumatic motors could be used if electrical noise is a concern, with the HPU or compressor installed outwith the listening room (maybe build a small machinery room annex on your 50m extension)This simple and elegant solution leaves you with your amplifier completely unmodified, and avoids the insurmountable engineering challenge of selecting and attenuating line level bloody signals.

author: Audioguru
author_rank: Super Contributor
timestamp: June 17, 2017, 01:03:16 pm
content: Why spend $1,000,000 for good sound when $10 sounds good if you do it correctly.A volume control goes atthe inputof a power amplifier.

author: CharlesSpong
author_rank: Contributor
timestamp: June 17, 2017, 03:52:11 pm
content: OK I concede, I will have to put up with lesser device compatibility. How would I control the volume at line level then? I needs to be remote control by this I mean IOT not IR.

author: Richard Crowley
author_rank: Super Contributor
timestamp: June 17, 2017, 05:14:43 pm
content: What does "device compatibility" mean? Does that mean you are trying to re-use some crusty old hi-fi amp you inherited from your grandfather? Have you looked at what is available on Ebay these days from China? You could have had your entire scheme implemented at a fraction of the cost of your proposed speaker-level solution.

author: tooki
author_rank: Super Contributor
timestamp: June 17, 2017, 05:50:41 pm
content: CharlesSpong, we are all dancing around in circles -- classic XY problem. Why don't you give us a clear, detailed explanation of the setup you are trying to construct (that is, tell us yourfinal goals, not the solutions you envision), including a detailed list of the constraints you must work within. Explain the problem and constraints, and let us figure out the solutions. Cuz right now, you're stuck trying to make work a terrible solution, when if we knew the entire problem set, we could probably come up with something better.You need to realize, what you want to do is analogous to controlling the speed of a car purely with the brakes, with the engine at full throttle the whole time. That uses tons of gas, and places tremendous demands on the brakes. So that's why we don't do that in cars - we modulate the engine power instead. Help us to help find you a better solution.

author: CharlesSpong
author_rank: Contributor
timestamp: June 17, 2017, 06:09:24 pm
content: In response to tooki's question,I have a home automation system it uses a custom web interface running on a server, their are then thin clients (Orange Pi Zero's) that contact this server.I am trying to add a new client that is able to control the audio going to a pair of speakers. Currently the audio source is a PC but I would like the option of using other devices such as a Raspberry Pi YouTube streamer or Surround Sound System (With built in amp), Both of which I already own. From what people have been saying doing this with the surround sound amp is just unrealistic so I will give up on that idea (Line level control is not suitable with Surround Sound System as it connects with a optical connection.The device must be able to do a few things:- Control audio volume from 0 - 100%. (If 0% is not attainable I would be happy with something around 5% that could just be open circuit below 5% to get down to turn off).- Must be controllable by Orange Pi Zero (Almost Identical to raspberry pi but smaller and with built in WiFi, my raspberry pi does not have WiFi)- Have rotary encoder on the device feeding orange pi zero should network be inaccessible.

author: cat87
author_rank: Regular Contributor
timestamp: June 17, 2017, 06:32:24 pm
content: Ok, so given the optical input, unless the surround system itself has a way to control the volume (from what I understand it doesn't ?) then you're pretty much stuck.Would there be a way for you to switch to another type of connection from the source to the surround system ? Like HDMI? The protocol can send audio/video and also control the volume of the audio stream digitally.

author: Zero999
author_rank: Super Contributor
timestamp: June 17, 2017, 07:29:23 pm
content: Quote from: CharlesSpong on June 17, 2017, 09:34:24 amI don't know about £10 for a decent, real 100W amplifier but that's certainly the most sensible way to do this. Digital potentiometers are inexpensive and are easy to control with a suitable microcontroller.

author: CharlesSpong
author_rank: Contributor
timestamp: June 17, 2017, 08:11:48 pm
content: This is the amp I am thinking of using,https://www.amazon.co.uk/gp/product/B01G39J6RO/ref=ox_sc_sfl_title_14?ie=UTF8&psc=1&smid=AONS7HEF348I5.A little more expensive than the £10 one I was originally considering but looks like it is higher quality.I have never heard of a digital pot, as I don't know what the required value is yet as I don't have the amp but would anyone recommend a brand / protocol.

author: Zero999
author_rank: Super Contributor
timestamp: June 17, 2017, 10:54:20 pm
content: Quote from: CharlesSpong on June 17, 2017, 08:11:48 pmThat seems reasonable. It's class D which means high efficiency, although it can cause EMI problems if it's not properly designed and connected up.QuotePlenty of information regarding digital potentiometers can be found using a search engine.The value of the potentiometer is not important, since it needs to be connected like any volume control potentiometer, on the input of the amplifier. Again, a search engine can help with this too.

author: tpowell1830
author_rank: Frequent Contributor
timestamp: June 17, 2017, 10:55:37 pm
content: I am still confused what the point is, but wouldn't Blue Tooth do this adequately? Most IoT devices, including the Home audio amp, can have a small Blue Tooth device attached if not already available on your device.

author: tooki
author_rank: Super Contributor
timestamp: June 18, 2017, 03:43:05 am
content: Quote from: CharlesSpong on June 17, 2017, 06:09:24 pmTipsy uncensored tooki here:A) your explanation is clear as mud. You still haven't really explained what you have, what you want, and what's missing to bridge the gap.Bearing that in mind, based on the fragmented information available:B) OK, so seriously, buy an AV receiver with an RS-232 automation interface on it. Ditch the existing receiver if it doesn't have RS-232. You can tell it to do whatever you need, from adjusting volume to switching inputs to whatever.Or invest in an AMX or Crestron AV control system. Assuming you can explain to their customer engineer what you actually want.

author: mfratus2001
author_rank: Contributor
timestamp: June 18, 2017, 12:14:45 pm
content: OK, I kinda understand your situation, but you keep insisting that you need to do it this way for one reason or another.Here's an idea... instead of coming to a group of clever and experienced problem-solvers with the solution and looking for how to implement it, come to us with only the problem.This stuff about Surround-sound, can't control the level, need wireless control, and so on is silly. Yes, silly.Look at it this way: The source is digital, on a computer or microcontroller. The transport medium is digital (optical fiber). The controlling module you want to add is digital. It is apparent that you don't know what is possible in the digital domain!Even if you could not modify the programming on the source end, or add a driver for software volume control, you could still use any microcontroller with streaming ins and outs to be the control you need. Loosen up and quit letting your limited experience tell you (and us) how it is to be done.Controlling the speaker output of a 100W amp with an attenuator is not practical.Thank you for revealing as much as you have, but if someone had not stopped you, you would have been on your way to spending $500 on a digitally-controlled attenuator.Now tell us why you think you need a rotary encoder. You just need control of the volume if the network fails, right?Software is the answer.

author: john_c
author_rank: Contributor
timestamp: June 18, 2017, 10:33:32 pm
content: Buy a separate DAC for your stereo receiver - optical in, line level out. Now everything is at line level. Go back to those ebay links I gave you. If we look at the second one (because it has decent photos), then we can see "VOLUME CON" on the main board. This is where you'll be able to hook up your GPIO to the Raspberry Pi or whatever.I disagree that you still haven't adequately explained the problem. It's clear enough to me.

author: john_c
author_rank: Contributor
timestamp: June 18, 2017, 10:36:26 pm
content: Quote from: tooki on June 18, 2017, 03:43:05 amThat's also a good suggestion.

author: cat87
author_rank: Regular Contributor
timestamp: June 19, 2017, 06:03:22 am
content: QuoteQuoteOk, so if that's the amp you're going to buy, where's the actual optical interface? is there another pre-amp in front of the actual amp? Or did you throw away the entire optical interface idea? The set-up isn't all that clear right now.

author: CharlesSpong
author_rank: Contributor
timestamp: June 19, 2017, 04:11:33 pm
content: Thinking about it, I still need the optical for my surround sound system but for only around £20 I can convert optical to analog and then back after changing volume as cat87 and john_c suggested.I am going to go ahead an get the amp I found off amazon, an try Hero999's suggestion of a digital pot I will report back with progress, thanks again for all of the suggestions.

author: Bassman59
author_rank: Super Contributor
timestamp: June 19, 2017, 05:41:45 pm
content: Quote from: CharlesSpong on June 17, 2017, 06:09:24 pmFor what it's worth, I built up a small remote volume control box based on the TI PGA2320 stereo volume-control chip and a Silicon Labs C8051F314 micro. It has both a rotary encoder and an IR receiver for volume control. It works well.The PGA2320 has SPI input, so it can be controlled by your favorite micro or board which has such a bus. It requires +/-15 V and +5 V supplies. The PGA2311 requires only +/- 5V supplies. The PGA4311 is a four-channel version of the 2311. Remember to buffer the input of each channel.

author: tooki
author_rank: Super Contributor
timestamp: June 20, 2017, 02:26:40 am
content: Quote from: CharlesSpong on June 19, 2017, 04:11:33 pmThis is lunacy.If it's actually surround on the optical interface, then it's either Dolby Digital or DTS format, neither of which are handled by typical DACs.Converting digital to analog and back is silly. Why not reduce the volume in the digital domain, if you're hell-bent on doing it DIY?I still think this is nutso crazy. AV receivers are designed to do all of this. To make it computer controlled, you either use one with a proper RS-232 automation interface, or mimic it by sending IR commands to a cheaper model. (You control volume by starting every control startup with enough "volume down" commands to get it from 100% to zero, then send "volume up" commands to get it where you want. ) If I understand you correctly, you are literally just building an automation interface yourself, literally exactly what AMX and Crestron are specialized in.

author: john_c
author_rank: Contributor
timestamp: June 20, 2017, 05:13:28 am
content: Quote from: tooki on June 20, 2017, 02:26:40 amOP can confirm, but I had assumed 2 channels because he wants to be able to plug in any old source.QuoteIt doesn't go back to digital. Not sure what you're talking about there. A digital potentiometer IC is a mixed-signal device.And again, what he asked for was something that could work with different sources. And one current source is a S/PDIF output.edited to add: one thing that is lunacy, is ordering a new amp when you already have one. @CharlesSpong, you're not planning to use both amps in some way are you?

author: CharlesSpong
author_rank: Contributor
timestamp: June 20, 2017, 03:44:54 pm
content: You are correct john_c, I am not planning on using both amps.Thanks for pointing that out tooki I believe it is Dolby Digital, that was only a side objective though, I may have to consider a digital method for that if it turns out to be Dolby.My new amp has been ordered and should arrive tomorrow.UPDATEMy new amp has arrived and sounds great, I know am now working on the amp to allow me to replace the pot with a digital variant.