PDA

View Full Version : Controlling volume of an amplifier..



joseph Degorio
- 14th December 2007, 09:18
Hi PICspert!
I'm new to electronics and programming, please guide me where to start on how to control the volume of an amplifier. The amplifier has volume knob already but I want to create two button switch that will increase and decrease the volume.

Thanks in advance,
joe

T.Jackson
- 14th December 2007, 10:08
That's an interesting question -- I have thought about this in the past...

Two orthodox solutions;

1. Discrete IC (yes they do exist)
2. Chain of switchable attenuation resistors

With the resistors, ideally you'll need to formulate something that translates into db. Better still; have the LCD or LED displays show the attenuation level in db. At the end of the day, a lot digital circuits that control audio attenuation induce two undesirable effects into the signal...

1. Harmonic distortion
2. Crossover distortion (bad channel separation)

For superior audio quality; hard-to-beat the good'ol humble POT. Watch out for bandwidth too. I think some of these circuits make an otherwise excellent preamplifier mediocre.

Jerson
- 14th December 2007, 11:11
Two things you can look into

Digital potentiometer (you may find some with pushbutton inputs)
Multiplying DAC (a little more intricate)

T.Jackson
- 14th December 2007, 12:30
http://www.analog.com/en/prod/0,,761_797_AD5228%2C00.html
looks interesting. Wonder though how it would effect the .002% harmonic distortion figure on my amplifier. Some DVD players have a distortion figure as much .05% (not necessarily the cheaper ones either)

see; http://siliconchip.com.au/cms/A_109464/article.html

Melanie
- 14th December 2007, 17:55
If it's Lo-Fi, then some Digital Circuitry can be added - there's plenty out there to chose from.

If it's Hi-Fi, then Digital and semiconductors should be avoided due to inherent junction noise. Then do what everyone else does... nail a gear-wheel to the shaft of your Pot and bolt-on a motor.

This isn't exactly rocket science. Until earlier this year, when I just couldn't be bothered wiping fingerprints off black facias anymore, I had a Pioneer Hi-Fi which I bought when I was a teenager that did exactly that... and guess what... the shiny silver TEAK with en-suite DAB and USB port that replaced it, does exactly the same.

But I remember an old uncle that had a Rigonda (USSR) Gramophone from the 1950's/60's (600 layers of laquer producing mirror-finish wood) that ran on valves, steam and things that got hot. Now this had been manufactured at least 20 years before I ever set foot on this planet with not only motorised volume but also motorised tuning as well. As a kid I'd press the AGC button and watch the dial rotate tune into the nearest FM station all on it's own... spooky stuff... Kinda like Captain Scarlets Mysterons...

mister_e
- 14th December 2007, 18:17
All good points Melanie, in some previous project i used those ALPS motorized pot.
http://www3.alps.co.jp/WebObjects/catalog.woa/PDF/E/Potentiometer/MetalShaft/RMP_RK271/RMP_RK271.PDF

Ioannis
- 14th December 2007, 20:07
Have a look at:

PGA2310, PGA2320, PGA 2311, PGA4311

http://focus.ti.com/docs/prod/folders/print/pga2310.html
http://focus.ti.com/docs/prod/folders/print/pga2311.html
http://focus.ti.com/docs/prod/folders/print/pga2320.html
http://focus.ti.com/docs/prod/folders/print/pga4311.html

Very very hi-fi!

Ioannis

mister_e
- 14th December 2007, 22:26
well yes and no, but yeah they're good for most case.

VCA such as SSM2164 produce better results.. well for much sensitive ears...

Melanie
- 15th December 2007, 01:59
Actually this got me thinking... about the earliest known occurance of Remote-Control of a Hi-Fi (or Lo-Fi)... - and I've managed 1957/58... That's FIFTY YEARS AGO!!!! All done with steam, mirrors and bits of string (wire!).

http://www.radiopagajiba.latbs.lv/RRR/festival.htm

T.Jackson
- 15th December 2007, 02:21
Have a look at:

PGA2310, PGA2320, PGA 2311, PGA4311

http://focus.ti.com/docs/prod/folders/print/pga2310.html
http://focus.ti.com/docs/prod/folders/print/pga2311.html
http://focus.ti.com/docs/prod/folders/print/pga2320.html
http://focus.ti.com/docs/prod/folders/print/pga4311.html

Very very hi-fi!

Ioannis

They're very good figures for thd (total harmonic distortion) Willing to bet that PCB layout would play a key role in obtaining them though.

mister_e
- 15th December 2007, 02:37
choice of quality components as well... really hard to please a real HI-FI customer ears...myself include.

joseph Degorio
- 15th December 2007, 10:15
Hi all,
I appreciate your responce and I thank you for the ideas you shared... Its enough for me to start to do researching.

Thanks again,
joe

T.Jackson
- 15th December 2007, 10:43
Throw a few things together on a piece of vero board, couple of lines of code in a 16f628 (my favorite pic), hookup a source input and give your ears a whirl. Worst that can happen is it doesn't work as good expected, dust yourself off and try again :)

Ioannis
- 15th December 2007, 14:35
well yes and no, but yeah they're good for most case.

VCA such as SSM2164 produce better results.. well for much sensitive ears...

Hmm, it has higher THD and is controlled by analog voltage. So a DAC is really needed. More noise source and more difficult PCB. I can assure you Steve, it is a HI-FI device. I am high fidelist myself too.


Actually this got me thinking... about the earliest known occurance of Remote-Control of a Hi-Fi (or Lo-Fi)... - and I've managed 1957/58... That's FIFTY YEARS AGO!!!! All done with steam, mirrors and bits of string (wire!).

http://www.radiopagajiba.latbs.lv/RRR/festival.htm

Very nice indeed! This is what can be called art!


They're very good figures for thd (total harmonic distortion) Willing to bet that PCB layout would play a key role in obtaining them though.

Yes, but I suppose that is a dominant rule in almost all electronics designs though. Good ground, capacitors on power lines, and seperatew analog and digital voltage sources to name a few. The vero board I can guess will not give optimum results in this case. It is not a LED test circuit...

Ioannis

T.Jackson
- 15th December 2007, 14:47
Yes, but I suppose that is a dominant rule in almost all electronics designs though. Good ground, capacitors on power lines, and seperatew analog and digital voltage sources to name a few. The vero board I can guess will not give optimum results in this case. It is not a LED test circuit...


I think star point earthing is pretty much industry standard for quality audio circuitry. Best way to avoid the dreaded earth loop.

Melanie
- 15th December 2007, 16:38
Very nice indeed! This is what can be called art!


Never mind Art - that's Engineering... I actually spent about ten minutes admiring that design... it is so way ahead of it's time it's almost uncanny...

It's not multi-channel audio, but just consider... Centre Bass Speaker (today we'll have a Centre Bass and we call it a Woofer), Centre High Range (today we have centre tweeters), Left & Right Mid-Range... all the elements of what today is 'Home Cinema'.

Motorised Turret Tuner - that's about five years ahead from when MANUAL one's were introduced into TV sets... never seen a Turret Tuner in a plain radio receiver from a western manufacturer... let alone a motorised one!

Cable Remote... Volume, Tuning and Wavechange and even Dial-Lights (how many Remotes do you have in your house with integral illumination?)... and look how THIN the cable to the Remote is... OK, it is done by wire (ie mechanical), but that's not the point.

B7G & B9A valves - when in the West most manufacturers were still fitting Octal...

The more you look at it, the more innovation you find... this is World-beating leading-edge technology of it's day - and for a domestic consumer market... it's a shame, so few people will look at that and realise what's actually there... just another square wooden box with valves inside...

Ioannis
- 19th December 2007, 13:29
It looks like the people assembling that great radio, really liked what they were doing!

Imagine to have a production of this thing made by bare hands!

ronjodu
- 18th February 2008, 05:02
I wish I had seen this thread earlier as I would have given a thumbs up for the PGA2320 Volume control chip from TI. I have one of them running my Gainclone amp and couldn't be happier with it although I don't consider myself an Audiophile by any means.
I control it with 3 pushbuttons, increase gain, decrease gain and a third for Mute, all running from a 16f876.

Here are a few pictures.
The first is the PGA in action. The thing to the left is a programming dongle I use to cram stuff into the bootloader and the heavy white wire goes to a LM34 to take the temperature of the Amp chip.

The second is of the amp itself, a dual mono.
The third is a 7 segment display I'm toying with to show gain.

ardhuru
- 21st February 2008, 07:50
Not getting into the advisability of using (or not) a semiconductor for controlling the volume, my vote goes to the DS1869 http://www.maxim-ic.com/appnotes.cfm/an_pk/168

Its perhaps the simplest a digital volume control can get and has been working flawlessly for a couple of years in one of my apps.

Regards,

Anand

ardhuru
- 21st February 2008, 08:00
Realised as soon as I sent the earlier post...

The DS1869 is a single channel device.

Sorry for the irrelevant info.

Anand

Ioannis
- 21st February 2008, 11:00
The mono-stereo is a main concern. You may use another version of the same chip or two of them. What bothers me is the quality of the chip on audio content. It seems from the specs that is good for general use from dimmers to some audio control.

OK for a low spec audio preamp. But the PGA is dedicated to Hi-Fi.

Ioannis

abidr
- 9th June 2008, 09:40
Here is my approach to control volume of any amplifier, i have used DS1802 a digital pot from Dallas Semi with buttons control. No need for a microcontroller. These are schematics and layouts of the circuit, it uses five buttons mute, up, down, right, left.
I have three boards of the same. Using one of them with amy amp , a gainclone based on OPA549 and in realtime it really rocks.

abidr
- 9th June 2008, 09:52
Here is another approach, this is a pre amp and volume controller which uses PGA2310, an IR, switch to change input (a 4 input selectors) , PIC 16F876A, 16x2 LCD and rotary encoder.
Pre is complete, I have made the software in PIC Basic Pro, these days I am testing the code, once its complete I ll try to post it at the board as a help for others.

Ioannis
- 9th June 2008, 12:28
Hi abidr,

nice project with the PGA device.

As I am lacking inputs for the many audio sources I have now (Mini disks, CD players, tuners, Tape cassete recorders, Phono, Pc, Mac etc) I need a pre-amplifier with many inpusts but also have the ability to send a selected input to a recording device independently. I need to have at least 3 outputs for recording while listenting to a 4th input. A little complicated and many relays but I think I will manage it. It will complement your design nicely!

Ioannis

falingtrea
- 9th June 2008, 18:55
Heh, for controlling volume, I would figure out a way to drive the volume knob with a servo. Less issues with audio quality that way. :)

mister_e
- 9th June 2008, 21:59
Nah.. no need for servo... there's some motorized pot and faders already available on the market. Penny & Giles are the really first that spring to mind (for faders). Almost sure that ALPS do some as well.

abidr
- 10th June 2008, 05:32
Ioannis:
I think what you have mentioned is not very difficult to achieve, but for that you ll need a bigger PIC like 16F877A and probably two ULN chips. I intend to make an input selector with a simpler PIC like 16F84A, but insted of relays I would like to use something like MPC507A or if I want to complicate circuitary I ll use something like SSM2404.
Here are a couple of PICs of the populated pre amp its a very small size PCB like 4.5x4.5 Inches.

Ioannis
- 10th June 2008, 08:26
Both chips look nice although MPC507A does not refer any distortion in audio range.

But I think the relay solution gives much better results in whole (crosstalk, distortion etc).

Ioannis

davesatu
- 20th June 2010, 07:22
Both chips look nice although MPC507A does not refer any distortion in audio range.

But I think the relay solution gives much better results in whole (crosstalk, distortion etc).

Ioannis

I agree with the posts here regarding the noise introduced by digital volume/balance controls. Have used many but mainly the Dallas DS1809 stereo chip. No matter what you do with support circuitry including the suggested bridge there is still a lot of noise if your aim is top quality sound.

So I went back to normal pots. Used Alps with motors for both volume and balance. There seems to be a move not to include a balance control for various sonic reasons. I find it essential as my recordings vary all over the place and I like the vocal "middle sweet spot". I have now settled on the circuit here - it's about try 7 I guess. Simple but good.

For my new tube pre-amp all functions and the two displays are controlled by a single 16F877 PIC. This is what it controls.

1. Ten second countdown via LED on startup to let tubes warm up prior to turning selected input on.
2. Selectable start Input default or you can code to save to start with off selected.
3. Seven push buttons for Input up/down, Volume up/down, Balance left/right plus Mute. These plus a display/buzzer on/off and standby system on/off are also available from the remote control.
4. Five stereo line inputs via relays. Three Line outputs.
5. Current Input number selected is displayed on a 7 segment LED. When the mute button is pressed the current input is turned off until reactivated. During this time the input is flashing.
6. Alert buzzer which can be programmed to do just about anything.
7. And now the good stuff. There are two other 7 segment LED's which are multiplexed to display at least at the moment a dB volume level as the default. Press a button and the current balance will be displayed. This can then be adjusted from L1-9 to R1-9 until the display says what you want. Seconds later the volume level returns.

All this is done in just one small PIC. Quite amazing. But I must tell you there are no pins left!

I spent a bit of time here to hopefully repay a little the advice received from this Forum over some years. Thanks Guys! - Happy to help if the info here is not enough.

El_AMPo
- 18th December 2010, 07:44
Been there, found this guy:

AN5262

It's a tv volume control IC. Really cheap, really nice and linear at work. Just connect it to a R2R DAC or similar and you're done (if you find the spare part that is).

Ioannis
- 18th December 2010, 20:16
TV chips are not (usually) Hi-Fi parts!

Ioannis

El_AMPo
- 19th December 2010, 05:51
TV chips are not (usually) Hi-Fi parts!

Ioannis

He didn't ask for hifi, anyway for hifi better stay with the motorized pot.
Or turn all your broadcast to digital (probably their source is digital so no point in DAC->super wire->super pot) but well audiphiles want to fight that war, i'm neutral.. ;)

smartufo
- 14th March 2013, 04:43
Ioannis:
I think what you have mentioned is not very difficult to achieve, but for that you ll need a bigger PIC like 16F877A and probably two ULN chips. I intend to make an input selector with a simpler PIC like 16F84A, but insted of relays I would like to use something like MPC507A or if I want to complicate circuitary I ll use something like SSM2404.
Here are a couple of PICs of the populated pre amp its a very small size PCB like 4.5x4.5 Inches.
Very good design Abidr.Please tell me what the IR code of your remote control (Sony,Philips..) and which compiler for your project.Thanks.

loosha
- 17th May 2014, 05:15
Hi joe.
You can solve the problem just using a single chip.Just use PT2253B.

Thanks
LOOSHA