Searching \ for '[EE]: digital volume for tones' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=digital+volume+tones
Search entire site for: 'digital volume for tones'.

Exact match. Not showing close matches.
PICList Thread
'[EE]: digital volume for tones'
2002\03\20@011704 by Richard Sloan

flavicon
face
Lets say you are generating some tones into a mono headphone, what could be used to give say 32 levels of volume and also function as the headphone driver? Any ideas?

I am thinking along the lines of 5 IO lines on a PIC processor adjusting in and out resistors on some type of opamp?

Ideas?

Richard.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\03\20@014624 by Pic Dude

flavicon
face
Was also thinking about this recently for the automotive MP3 player
I'm working on, cause I haven't yet found any PC104 SBC's with a
4-channel output sound card.  Best thought was to use a VCA
(Voltage-Controlled Amp), and have the I/O lines run a D/A
converter for setting the control voltage.  VCA could be a chip
(I'm still looking for one), or a basic op-amp circuit.  D/A can
probably be a resistor network (R/2R) as precision here is not
critical.

However, if your code is manually generating tones, you could also
think of scaling the output audio signal before outputting it.

Cheers,
-Neil.


{Original Message removed}

2002\03\20@030608 by Archmage

picon face
Well first question is are you generating square waves or sine waves
If you want the quick and dirty answer you can use Pulse width Modulation

Example ( this is a 4 level but you can expand it ) Output on a single line

Volume level 1 = ~___~___~_______________~___~___~_______________
Volume level 2 = ~~__~~__~~______________~~__~~__~~______________
Volume level 3 = ~~~_~~~_~~~_____________~~~_~~~_~~~_____________
Volume level 4 = ~~~~~~~~~~~~____________~~~~~~~~~~~~____________

A Higher Tone in Valume 2
= ~~__~~__________~~__~~__________~~__~~__________
A Lower Tone in Volume 2
= ~~__~~__~~__~~__~~__~~_______________________~~__>

_ = 0  ~ = High

You now use a small Cap to filter the higher frequencies that this trick
will produce
To write the code will require a little planning with some loops

If you need a Sign wave thats another trick


Archmage

PS before people ask i gave allot of detail for the newbies, Hey i found out
about this mailing list from a high school kid that make robots for fun, who
knows what kind of people are lurking in this list

PSS and for my bad spelling : Bad Spellers of the World Untie

{Original Message removed}

2002\03\20@034606 by Alan B. Pearce

face picon face
>I am thinking along the lines of 5 IO lines on
>a PIC processor adjusting in and out resistors
>on some type of opamp?

Use an I2C or SPI controlled potentiometer. Check out Maxim for the sort of
devices designed for use in cell phones. You may find a complete
controllable amp that will do what you want.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\03\20@093233 by Scott Dattalo

face
flavicon
face
On Wed, 20 Mar 2002, Richard Sloan wrote:

> Lets say you are generating some tones into a mono headphone, what
> could be used to give say 32 levels of volume and also function as the
> headphone driver? Any ideas?
>
> I am thinking along the lines of 5 IO lines on a PIC processor
> adjusting in and out resistors on some type of opamp?
>
> Ideas?

Questions: What range of frequencies? Which PIC?

My first suggestion would be phase accumulators and a sine wave table. The
phase accumulators allow you to vary the frequency of the sine wave. The
level can be controlled with a gain factor (i.e. multiply the sine wave by
a number).

To generate the actual signal you'll need a DAC. The simplest DAC is the
PIC's PWM output. You didn't say which PIC you're using, but I assume it's
an 'F628. If you're choosing an inferior PIC, then there are software
solutions that exist too.

Check out
http://www.dattalo.com/technical/software/software.html

For sine wave tables, phase accumulators, and single cycle resolution
software PWM routines.

Scott

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\03\20@205544 by peter cousens

flavicon
face
If you have line in/out signal levels ( ~ 1v @ 600Ohms)

A quick 'n dirty way of remote controlling volume that I have used in
the past (with great success) is to use an LDR (LDR's for stereo) with a
small 6Volt grain of wheat lamp sandwiched between them and shoved into
some cable insulation and driven direct from an I/O pin

The attack /decay times are slow and are well suited for audio and the
signal is also Opto isolated so no problem with earth loops.

Because the response time is slow you could PW modulate the lamp at very
slow rate, 10Hz would be your lower limit


{Original Message removed}

2002\03\21@011615 by Kelly Kohls

picon face
Another possibility...... TI/Burr-Brown PGA2310..... It's a Stereo Audio
Volume Control.  Provides gain/attenuation from +31.5dB to -95.5dB with
0.5dB steps. Standard three-wire serial control.  Great part, I'm presently
using two of them in a project.  Hope this helps.

Kelly Kohls, N5TLE
Dallas, TX
http://www.qsl.net/n5tle/
There's never enough time to do it right, but plenty of time to do it over.

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spam_OUTlistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2002\03\22@123613 by Olin Lathrop

face picon face
> A quick 'n dirty way of remote controlling volume that I have used in
> the past (with great success) is to use an LDR (LDR's for stereo) with a
> small 6Volt grain of wheat lamp sandwiched between them and shoved into
> some cable insulation and driven direct from an I/O pin
>
> The attack /decay times are slow and are well suited for audio and the
> signal is also Opto isolated so no problem with earth loops.
>
> Because the response time is slow you could PW modulate the lamp at very
> slow rate, 10Hz would be your lower limit

Is there any reason you didn't use an LED instead of an incandescent?  The
LED would take less current for the same brightness, is more rugged, should
last much longer, and is probably cheaper.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, .....olinKILLspamspam@spam@embedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu


2002\03\23@080146 by peter cousens

flavicon
face
The LDR's that I used (square ~10mm x10mm) were far more sensitive to
incandescent than led (never tried the more exotic colors) and required
no tricky alignment. I just put them in a sleeve with the LDR leads
coming out of one end and the bulb leads the other,
The bulb sandwiched between the two (stereo)
The units were designed for line in/out insertion so getting the LDR
resistance down to a reasonable level didn't take much current. I used 12 Volt lamps and never ran them at over 8 volts if I remember
correctly.
Over four years of making them I never had a bulb failure that I can
remember. I must have made 400 to 500 units
My customers were beach front café's who would be fined $$ for not
having a disco licence if the music was too loud (required to draw the
customers).
Sorry no PIC involved just a car alarm rx and keyring tx for the lookout
waiting to spot the inspectors making their nightly rounds Just two levels, full or low level (user adjustable with a pot mounted
on the rx box)
The decay (if set to full mute) sounded like the normal fade out of a
song ending
> A quick 'n dirty way of remote controlling volume that I have used in
> the past (with great success) is to use an LDR (LDR's for stereo) with
a
> small 6Volt grain of wheat lamp sandwiched between them and shoved
into
> some cable insulation and driven direct from an I/O pin
>
> The attack /decay times are slow and are well suited for audio and the
> signal is also Opto isolated so no problem with earth loops.
>
> Because the response time is slow you could PW modulate the lamp at
very
> slow rate, 10Hz would be your lower limit

Is there any reason you didn't use an LED instead of an incandescent?
The
LED would take less current for the same brightness, is more rugged,
should
last much longer, and is probably cheaper.


********************************************************************
Olin Lathrop, embedded systems consultant in Littleton Massachusetts
(978) 742-9014, .....olinKILLspamspam.....embedinc.com, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\03\23@122241 by Bob Barr

flavicon
face
On Sat, 23 Mar 2002 11:56:18 -0000, peter cousens wrote:

<snip>

>My customers were beach front café's who would be fined $$ for not
>having a disco licence if the music was too loud (required to draw the
>customers).

Before I read the next sentence, here I was thinking you'd use a mic
to monitor the level and keep it within legal limits.
How silly of me. Good one. :=)

Regards, Bob

>Sorry no PIC involved just a car alarm rx and keyring tx for the lookout
>waiting to spot the inspectors making their nightly rounds
--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\03\24@170515 by David Duffy

flavicon
face
> > A quick 'n dirty way of remote controlling volume that I have used in
> > the past (with great success) is to use an LDR (LDR's for stereo) with a
> > small 6Volt grain of wheat lamp sandwiched between them and shoved into
> > some cable insulation and driven direct from an I/O pin
> >
> > The attack /decay times are slow and are well suited for audio and the
> > signal is also Opto isolated so no problem with earth loops.
> >
> > Because the response time is slow you could PW modulate the lamp at very
> > slow rate, 10Hz would be your lower limit

Olin asked:
>Is there any reason you didn't use an LED instead of an incandescent?  The
>LED would take less current for the same brightness, is more rugged, should
>last much longer, and is probably cheaper.

The lamp has a slow response time - the LED hasn't. With the LED, you would
hear the 10Hz PWM. The incandescent lamp smooths it out nicely ! (LPF)
Regards...

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2002\03\24@192835 by peter cousens

flavicon
face
-----Original Message-----
From: pic microcontroller discussion list
[PICLISTspamspam_OUTMITVMA.MIT.EDU] On Behalf Of David Duffy
Sent: 24 March 2002 22:13
To: @spam@PICLISTKILLspamspamMITVMA.MIT.EDU
Subject: Re: [EE]: digital volume for tones

> > A quick 'n dirty way of remote controlling volume that I have used
in
> > the past (with great success) is to use an LDR (LDR's for stereo)
with a
> > small 6Volt grain of wheat lamp sandwiched between them and shoved
into
> > some cable insulation and driven direct from an I/O pin
> >
> > The attack /decay times are slow and are well suited for audio and
the
> > signal is also Opto isolated so no problem with earth loops.
> >
> > Because the response time is slow you could PW modulate the lamp at
very
> > slow rate, 10Hz would be your lower limit

Olin asked:
>Is there any reason you didn't use an LED instead of an incandescent?
The
>LED would take less current for the same brightness, is more rugged,
should
>last much longer, and is probably cheaper.

The lamp has a slow response time - the LED hasn't. With the LED, you
would
hear the 10Hz PWM. The incandescent lamp smooths it out nicely ! (LPF)
Regards...

The LDR's response is very slow taking something like 20sec's to go from
say 150 Ohms to 20 Meg so the lamps thermal inertia is really of no
consequence.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...