Author Topic: Digital Volume Control  (Read 2412 times)

0 Members and 1 Guest are viewing this topic.

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,154
  • Helpful? 110
Digital Volume Control
« on: September 17, 2008, 08:04:33 PM »
I've searched the forum and found this post http://www.societyofrobots.com/robotforum/index.php?topic=4460.0 which is kind of related.

I, too, have a signal coming in from, say, an NE555. Assume its just a continuous tone for the purpose of this post.
This is linked to a loud speaker via a simple transistor (don't need an amplifier as the 555 is already giving me an input of 0 to 5v).

But what I need to do is be able to control the volume via the mcu.

So I could use PWM and an RC network to create a voltage - but am not sure if there are chips out there to turn the voltage into a volume ctrl.

Have Googled and found chips like the AD5220, Max5400, Max5401 which are variable resistance pots. However: they seem to be aimed more at TV remotes ie increment/decrement the volume based on pressing a button. I could maybe do this by outputting pulses BUT I want to do it very quickly and am not sure they could do that ie the volume could need to change from zero to max and back again in a millisecond or so. I can't afford the time to keep incrementing the volume from Mute to Loudest and back to Mute.

So maybe the PWM + RC network, ie a DAC, may seem the best solution. Does anyone know how I could this, or know of a chip (an amplifier with a gain of 1 say) that can allow me to change the gain from 0% to 100% very quickly?
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
Re: Digital Volume Control
« Reply #1 on: September 18, 2008, 12:48:30 AM »
I got a ready schematics for you...
here:
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,154
  • Helpful? 110
Re: Digital Volume Control
« Reply #2 on: September 18, 2008, 04:34:37 PM »
Thanks. That looks good. Any chance you could upload a slightly better image as some of its a bit tricky to read. Also - do you know what the Greek text says?
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
Re: Digital Volume Control
« Reply #3 on: September 20, 2008, 06:35:26 AM »
I got a better image:

http://users.ntua.gr/el01741/MyWebPage/Contructions/digital/DigiVolume/Schematic.gif

The schematics are made by Dimitris Piperidis and since I know him personally I can not forget to mention him...

And I'll make a quick translation of what is written...

First:  The input signal must to extend the range of 0V to 5V (peak to peak).
Second:  The output signal is the same with the input signal (except from being 180o degrees phase changed) when 100% duty cycle is applied... You can
NOT drive a speaker out of this circuit unless you have the right amplifier.
Third: Should you place the 100nF caps as close as you can to the Attiny power supply or what else controller you use...
Best if you place such caps close to the other two ICs power supplies too...

Best Regards, Lefteris
Greece
« Last Edit: September 20, 2008, 06:39:37 AM by TrickyNekro »
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,154
  • Helpful? 110
Re: Digital Volume Control
« Reply #4 on: September 26, 2008, 10:13:54 PM »
Man that CA3080 is very hard to find a supplier for (here in the UK). Non-ROHS etc.

Is there another equivalent?
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,154
  • Helpful? 110
Re: Digital Volume Control
« Reply #5 on: September 30, 2008, 08:14:33 PM »
In-fact I cannot find ANYONE who supplies it (forget Digikey etc as they charge me a fortune for postage unless I spend $200, and then I have to pay customs on top).

So I'm afraid the circuit is a 'no go'.

I've found other digital potentiometer chips but don't think they will work as they have one input for direction (ie volume up or down) and another 'step' input that bumps the value up/down. So kinda made for TV/Stereo remote control.

Anyone else got any other chips to offer?

Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline WebbotTopic starter

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,154
  • Helpful? 110
Re: Digital Volume Control
« Reply #6 on: September 30, 2008, 08:18:40 PM »

I guess what I'm looking for is something that I can use to apply an Attack-Decay-Sustain-Release (ADSR) volume envelope - so if anyone has any MIDI/MOOG experience.......... Or knows of a sound chip?
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here

data_list