Searching \ for 'Loudspeaker driving from PIC pin' 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/microchip/ios.htm?key=speaker
Search entire site for: 'Loudspeaker driving from PIC pin'.

Truncated match.
PICList Thread
'Loudspeaker driving from PIC pin'
1996\05\21@040134 by Mungo Henning

flavicon
picon face
I'm still in the 'prototype' stage of building a PIC based alarm system
(nothing too grand, using the 16C84) and I toggle one output pin to create
the sound tones which (for now) feed a piezo buzzer (I guess standard stuff
so far).
The volume isn't great (and I don't want to drive it in 'bridge' mode), hence
I need some amplification which will feed a reasonable-sized speaker
(not quite mega-loud, but an 8ohm 8watt speaker which is kicking around in
my workshop). I've had a quick trawl through old Electronics magazines and
it looks like using a TDA2030 device might be my best bet.
Can I solicit any ideas/opinions on my plan please?

Whilst this solution will do for now (like, bigger problems to tackle
first), ultimately I would like to investigate producing 'gentle' (for lack
of a better word!) 'chime' sounds rather than pushing a square wave through
an amp. Anyone done this already?

Thanks in Advance

Mungo Henning

1996\05\21@055336 by paul

flavicon
picon face
In message <PICLIST%spam_OUT96052104013521TakeThisOuTspamMITVMA.MIT.EDU> you recently said:

> I'm still in the 'prototype' stage of building a PIC based alarm system
> (nothing too grand, using the 16C84) and I toggle one output pin to create
> the sound tones which (for now) feed a piezo buzzer (I guess standard stuff
> so far).
> The volume isn't great (and I don't want to drive it in 'bridge' mode), hence
> I need some amplification which will feed a reasonable-sized speaker
> (not quite mega-loud, but an 8ohm 8watt speaker which is kicking around in
> my workshop). I've had a quick trawl through old Electronics magazines and
> it looks like using a TDA2030 device might be my best bet.
> Can I solicit any ideas/opinions on my plan please?
>
> Whilst this solution will do for now (like, bigger problems to tackle
> first), ultimately I would like to investigate producing 'gentle' (for lack
> of a better word!) 'chime' sounds rather than pushing a square wave through
> an amp. Anyone done this already?
>
> Thanks in Advance
>
> Mungo Henning
>
AN543 in the microchip embedded control handbook shows how to
generate tones, unfortunately it is for the 17c42 but it may
be some help.



--
Paul Waterfield
TECHNIQUEST Exhibit Developer
.....paulKILLspamspam@spam@tquest.demon.co.uk

1996\05\21@082116 by Clyde Smith-Stubbs

flavicon
face
Mungo Henning <mungohspamKILLspamitacs.strath.ac.uk> wrote:

> The volume isn't great (and I don't want to drive it in 'bridge' mode), hence
> I need some amplification which will feed a reasonable-sized speaker

Why not use an LM386 - it will deliver 300mW or so into 8ohms with a 6V
supply. There is also the LM4880 - a dual audio amp in an 8 pin package
with a shutdown input (<1uA in shutdown mode). It will deliver over 300mW
per channel on a 5V supply.

You can get data on these from National Semiconductor's Web site -
http://www.national.com.

To generate sounds other than square waves, the easiest way is to do
a pulse-width-modulation technique, but this requires producing a
pulse train at a rate several times your desired maximum output frequency.


--
Clyde Smith-Stubbs       | HI-TECH Software,       | Voice: +61 7 3300 5011
.....clydeKILLspamspam.....hitech.com.au      | P.O. Box 103, Alderley, | Fax:   +61 7 3300 5246
http://www.hitech.com.au | QLD, 4051, AUSTRALIA.   | BBS:   +61 7 3300 5235
----------------------------------------------------------------------------
For info on the World's best C cross compilers for embedded systems, point
your WWW browser at http://www.hitech.com.au, or email EraseMEinfospam_OUTspamTakeThisOuThitech.com.au

1996\05\21@132404 by Russell Politzky

flavicon
face
Mungo Henning wrote:
>
> I'm still in the 'prototype' stage of building a PIC based alarm system
> (nothing too grand, using the 16C84) and I toggle one output pin to create
> the sound tones which (for now) feed a piezo buzzer (I guess standard stuff
> so far).
> The volume isn't great (and I don't want to drive it in 'bridge' mode), hence
> I need some amplification which will feed a reasonable-sized speaker
> (not quite mega-loud, but an 8ohm 8watt speaker which is kicking around in
> my workshop). I've had a quick trawl through old Electronics magazines and
> it looks like using a TDA2030 device might be my best bet.
> Can I solicit any ideas/opinions on my plan please?

I would  not bother with a dedicated amp IC just to produce a square wave.  A
simple class B push-pull output stage hooked up to the 5V supply and capacitivly
coupled to the speaker will do the job if you just want to generate square
waves.
You will need the amp IC to generate the chimes.

>
> Whilst this solution will do for now (like, bigger problems to tackle
> first), ultimately I would like to investigate producing 'gentle' (for lack
> of a better word!) 'chime' sounds rather than pushing a square wave through
> an amp. Anyone done this already?
>
> Thanks in Advance
>
> Mungo Henning

--
-------------------------------------
E-mail: politzkyspamspam_OUTicon.co.za

Its better not to know than to know what aint so
-------------------------------------

1996\05\21@182942 by Scott Dattalo
face
flavicon
face
Mungo Henning wrote:
>
> Whilst this solution will do for now (like, bigger problems to tackle
> first), ultimately I would like to investigate producing 'gentle' (for lack
> of a better word!) 'chime' sounds rather than pushing a square wave through
> an amp. Anyone done this already?
>

I've never done it. However, I know that there are sound drivers that produce
fairly decent sound out of the PC's cheap speaker. I presume they use some sort
of pulse width modulation scheme and let the speaker's relatively low frequency
response smooth things out. There are two things that you would need to control
to get the 'gentle' waveforms: amplitude and frequency. The pulse width
variation
can control the perceived amplitude, while the pulse frequency controls the
perceived
frequency. It's theoretically possible...


Scott

1996\05\21@215149 by John Payson

flavicon
face
> I've never done it. However, I know that there are sound drivers that produce
> fairly decent sound out of the PC's cheap speaker. I presume they use some
sort
> of pulse width modulation scheme and let the speaker's relatively low
frequency
> response smooth things out. There are two things that you would need to
control
> to get the 'gentle' waveforms: amplitude and frequency. The pulse width
>  variation
> can control the perceived amplitude, while the pulse frequency controls the
>  perceived
> frequency. It's theoretically possible...

PWM is a good way to get nice sounds out of a speaker, BUT your PWM frequency
should be higher than your output wave frequency: a pulse-modulated wave will
be harmonically very rich and if the harmonics are audible things will sound
tinny or worse.

Just to illustrate, if your wave goes through the stages:

________--------________--------________--------

________------__________------__________------__

________----____________----____________----____

________--______________--______________--______

the resulting sound will be somewhat wierd at the end (try it--you might
always like it).  If you want a more bell-like sound, you should do your
modulation more like this:

________--------________--------________--------

________---_---_________---_---_________---_---_

________-_-_-_-_________-_-_-_-_________-_-_-_-_

________-___-___________-___-___________-___-___

[preferably with the waves being chopped more finely].  Alternatively, if
your only need for PWM'ing is to produce "dings" and if you can conveniently
alter the tris'age of your output port pin, you could wire your piezo speaker
to the port pin along in parallel with a series RC to ground.

PORT PIN------+-------+
             R       |
             |       Peizo
             C       |
             |       |
             gnd     gnd

When your tone is hard-off, set the port pin active high.  This will leave
the cap charged; most piezos are capacitive and don't pass DC current.  When
it's necessary to produce a tone, alternate the port between active-low and
tristate.  As long as the cap has charge, the voltage to the speaker will be
set by the cap voltage.  As that voltage decreases [which it will probably
do more or less exponentially] the piezo will get quieter.

The biggest problem with the circuit--remediable with another port pin--is
that it's necessary to let the cap charge between tones.  If another port
pin were wired "directly" to the cap, the cap could be charged quickly bet-
ween tones; otherwise charging the cap will take some time. [adding a diode
across the resistor might improve this].

1996\05\21@230717 by Dave

picon face
>
> Mungo Henning wrote:
>
> I've never done it. However, I know that there are sound drivers that produce
> fairly decent sound out of the PC's cheap speaker. I presume they use some
sort
> of pulse width modulation scheme and let the speaker's relatively low
frequency
> response smooth things out. There are two things that you would need to
control
> to get the 'gentle' waveforms: amplitude and frequency. The pulse width
>  variation
> can control the perceived amplitude, while the pulse frequency controls the
>  perceived
> frequency. It's theoretically possible...

I was thinking it would be possible to have two tones on a single pin,
but am not sure how.  Gee is this related to DTMF?  It'd be kind of a
rainy day project to have chimes coming from a 16C84.  I don't have any
code related to telephone stuff so if someone would point me to a
resorce, I'd be posting some code soon!

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