Controlling volume of an amplifier..


+ Reply to Thread
Results 1 to 34 of 34
  1. #1

    Default Controlling volume of an amplifier..

    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

  2. #2
    T.Jackson's Avatar
    T.Jackson Guest

    Default

    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.

  3. #3
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    886

    Default

    Two things you can look into

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

  4. #4
    T.Jackson's Avatar
    T.Jackson Guest

    Default

    http://www.analog.com/en/prod/0,,761...5228%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
    Last edited by T.Jackson; - 14th December 2007 at 11:32.

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358

    Default

    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...

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    All good points Melanie, in some previous project i used those ALPS motorized pot.
    http://www3.alps.co.jp/WebObjects/ca.../RMP_RK271.PDF
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,099

  8. #8
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    well yes and no, but yeah they're good for most case.

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

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  9. #9
    Join Date
    Jul 2003
    Posts
    2,358

    Default

    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

  10. #10
    T.Jackson's Avatar
    T.Jackson Guest

    Default

    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.

  11. #11
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    choice of quality components as well... really hard to please a real HI-FI customer ears...myself include.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  12. #12

    Default

    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

  13. #13
    T.Jackson's Avatar
    T.Jackson Guest

    Default

    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

  14. #14
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,099

    Default

    Quote Originally Posted by mister_e View Post
    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.

    Quote Originally Posted by Melanie View Post
    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!

    Quote Originally Posted by T.Jackson View Post
    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

  15. #15
    T.Jackson's Avatar
    T.Jackson Guest

    Default

    Quote Originally Posted by Ioannis View Post
    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.

  16. #16
    Join Date
    Jul 2003
    Posts
    2,358

    Default

    Quote Originally Posted by Ioannis View Post
    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...

  17. #17
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,099

    Default

    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!

  18. #18
    Join Date
    Dec 2003
    Location
    Storrs, Ct.
    Posts
    91

    Default My two cents.

    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.
    Attached Images Attached Images    

  19. #19
    Join Date
    Oct 2004
    Posts
    448

    Default

    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

  20. #20
    Join Date
    Oct 2004
    Posts
    448

    Default

    Realised as soon as I sent the earlier post...

    The DS1869 is a single channel device.

    Sorry for the irrelevant info.

    Anand

  21. #21
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,099

    Default

    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

  22. #22
    Join Date
    Apr 2008
    Posts
    13

    Default Controlling Volume Control of an AMP

    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.
    Attached Images Attached Images

  23. #23
    Join Date
    Apr 2008
    Posts
    13

    Default

    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.
    Attached Images Attached Images

  24. #24
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,099

    Default

    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

  25. #25

    Default

    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.
    Tim Barr

  26. #26
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    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.
    Last edited by mister_e; - 9th June 2008 at 21:03.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  27. #27
    Join Date
    Apr 2008
    Posts
    13

    Talking

    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.
    Attached Images Attached Images   

  28. #28
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,099

    Default

    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

  29. #29
    Join Date
    Feb 2010
    Posts
    6

    Default My solution after some years

    Quote Originally Posted by Ioannis View Post
    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.
    Attached Images Attached Images    

  30. #30
    Join Date
    May 2010
    Location
    Chile
    Posts
    25

    Default

    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).
    Attached Images Attached Images
    "If at first doesn't work, kicking it wont help either"

  31. #31
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,099

    Default

    TV chips are not (usually) Hi-Fi parts!

    Ioannis

  32. #32
    Join Date
    May 2010
    Location
    Chile
    Posts
    25

    Default

    Quote Originally Posted by Ioannis View Post
    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..
    "If at first doesn't work, kicking it wont help either"

  33. #33
    Join Date
    Mar 2013
    Posts
    1

    Default Re: Controlling volume of an amplifier..

    Quote Originally Posted by abidr View Post
    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.

  34. #34
    Join Date
    May 2012
    Posts
    3

    Default Re: Controlling volume of an amplifier..

    Hi joe.
    You can solve the problem just using a single chip.Just use PT2253B.

    Thanks
    LOOSHA

Similar Threads

  1. Replies: 10
    Last Post: - 17th February 2012, 07:19
  2. Amplifier Interference Issue
    By Art in forum General
    Replies: 20
    Last Post: - 9th March 2010, 04:30
  3. Audio Amplifier
    By The Master in forum Off Topic
    Replies: 19
    Last Post: - 20th August 2008, 09:45
  4. pt2258+16f877 how can i use for 5.1 volume control ?
    By whyliving in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 26th January 2008, 17:51
  5. Volume Control On Piezo
    By Peter1960 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 13th August 2007, 04:34

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts