Shop OBEX P1 Docs P2 Docs Learn Events
Audio volume control with the AD5220 Digital Potentiometer — Parallax Forums

Audio volume control with the AD5220 Digital Potentiometer

b_newmsb_newms Posts: 4
edited 2008-03-20 18:53 in BASIC Stamp
Is there a way to use The AD5220 Digital pot to control a mono audio signal's volume with the basic stamp? I am using the Basic stamp BS2 (rev G). I really think it can be done but I can't find info on it anywhere.

Comments

  • b_newmsb_newms Posts: 4
    edited 2008-03-14 17:33
    Hello, is anyone out there????
    I think I am going to try the " digital control of an analog op-amp" scematic on page 191 of the microcontroller cookbook 1. I have the ad5220 digital pot and a lm358n dual op-amp instaed of the DS1804 dig.pot. LM324n op-amp they call for in the book.

    I guess I'm just not sure what to do with the 1/4" audio cable. Do I put the cable's ground into the stamp ground? or leave it intact? How do I figure out the voltage carried by an audio cable? Is it too much to go straight into the dig.pot? please Help....

    ... there is also an audio amplifier scematic in the second cookbook on page 171. it looks a little different and maybe a little too complex for what I'm trying to do.
    If anyone thinks that this is stupid, please stop me! I'll wait a day or so before I start to see if anyone answers this.
    Thanks ahead of time!
  • RDL2004RDL2004 Posts: 2,554
    edited 2008-03-14 18:14
    If you're trying to adjust a speaker level signal I think you'll fry the chip. It has a 20 mA rating at up to the supply voltage (7 volts max). There may be better chips for what you want to do, but I'm not too familiar with audio electronics, so I could be wrong.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-03-15 05:04
    b_newms

    It's not "stupid."

    This device [noparse][[/noparse]AD5220] is a potentiometer with a linear taper. ·For an audio project you need a device with a logarithmic (or audio) taper.· The easiest way for you to appreciate the difference would be to build an amplifier using a log pot (the sort with a knob), adjust that around and see how that works,·and then·swap it with an equal value linear pot.

    http://focus.ti.com/lit/ds/symlink/pga2311.pdf

    Post Edit -- Link added

    Post Edited (PJ Allen) : 3/15/2008 5:17:24 AM GMT
  • RDL2004RDL2004 Posts: 2,554
    edited 2008-03-15 11:05
    PJ found one of those "better chips" I was thinking of. Also, just so you know, a linear taper potentiometer (digital or otherwise) will work just fine as an audio volume control, however the rate of change doesn't match up well with the response of the human ear. There is some good info here:

    sound.westhost.com/pots.htm#taper

    If you have any interest at all in audio electronics, you can't go wrong by reading everything at the ESP web site.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Rick
  • skylightskylight Posts: 1,915
    edited 2008-03-15 12:14
    Dont connect the pot to the amplifier output! it must go in series to the input of the amp
  • b_newmsb_newms Posts: 4
    edited 2008-03-20 18:53
    Thanks everyone, I have been looking for so long. It is really nice to get some help! [noparse]:)[/noparse]
    I'll mess around with a log pot instead.
    Any other suggestions would always help.
Sign In or Register to comment.