The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.
Driving a piezo transducer with MSP430F1491 - harinnair - Aug 27 10:45:16 2009
Hi,
I am using an MSP430F1491 with regulated 2.5V Vcc, power source is a LiPoly battery or a
goldcap, Vbat < 5V.
I am driving a piezo transducer with a square wave to generate audio and the problem is
that when the port pin is set to digital output, there isn't enough volume as the voltage
swing 2.5V p-p is rather low. The volume is ok with a drive of about 3.5V - 4V p-p.
I would like to try connecting the piezo to Vbat and just sinking it to ground to generate
the square wave, but am not able to find the equivalent of an open-drain port pin output
mode when I looked at the datasheet.
However, setting the pin to input puts it in tri-state mode, which I assume is high
impedance.
So now I have a couple of questions.
Is there an explicit way to set open-drain output mode?
I thought of connecting my piezo as above (between Vbat and port pin), and generating a
square wave by alternately setting the port pin mode to input tristate, and to output mode
(with 0 written to pin). Before I try this, is there any risk of damage to the port by
connecting a voltage higher than VCC to the tristated pin ?
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Driving a piezo transducer with MSP430F1491 - OneStone - Aug 27 10:51:41 2009
Electronics 101. try a small FET or transistor. The MSP430 hasn't got
the capacity to directly drive the Piezo. use a small resistor (arounf
470R in the base or gate of the transistor).
Al
harinnair wrote:
> Hi,
>
> I am using an MSP430F1491 with regulated 2.5V Vcc, power source is a LiPoly battery or a
goldcap, Vbat < 5V.
>
> I am driving a piezo transducer with a square wave to generate audio and the problem is
that when the port pin is set to digital output, there isn't enough volume as the voltage
swing 2.5V p-p is rather low. The volume is ok with a drive of about 3.5V - 4V p-p.
>
> I would like to try connecting the piezo to Vbat and just sinking it to ground to
generate the square wave, but am not able to find the equivalent of an open-drain port pin
output mode when I looked at the datasheet.
>
> However, setting the pin to input puts it in tri-state mode, which I assume is high
impedance.
>
> So now I have a couple of questions.
>
> Is there an explicit way to set open-drain output mode?
>
> I thought of connecting my piezo as above (between Vbat and port pin), and generating a
square wave by alternately setting the port pin mode to input tristate, and to output mode
(with 0 written to pin). Before I try this, is there any risk of damage to the port by
connecting a voltage higher than VCC to the tristated pin ?
>
> ------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Driving a piezo transducer with MSP430F1491 - tintronic - Aug 27 11:27:13 2009
Your tri-state approach will probably not work well, you're forgetting about the
protection diodes which connect all digital inputs to Vcc. thus if placed on tri-state the
piezo will act as a pull-up to 5V. The piezo voltage will be swinging between 2.2V
(5-[2.5+0.3]) and 5V.
The simpliest of NPN transistor should be enought to create an open collector gate to
drive the piezo. It doesn't get more simple than that. The series resistor could be used
to control the volume.
Another simple solution is to use two complementary outputs to drive the piezo with +2.5V
and then -2.5V, resulting in 5Vpp. You could use a timer and two compare modules to
generate this wave by hardware.
Last but not least, a series capacitor of the right value could do a similar trick to
increase the voltage swing.
Analyse this options and decide by yourself. There are probably other options as well. And
don't overlook the current drive capacity (sink and source) of the pins; make sure your
piezo doesn't place too high a demand on the pins. You could use more than one pin of the
same port to increase the current capacity, but make sure to change their state
simultaneously.
Regards,
Michael K.
--- In m...@yahoogroups.com, OneStone
wrote:
>
> Electronics 101. try a small FET or transistor. The MSP430 hasn't got
> the capacity to directly drive the Piezo. use a small resistor (arounf
> 470R in the base or gate of the transistor).
>
> Al
>
> harinnair wrote:
> > Hi,
> >
> > I am using an MSP430F1491 with regulated 2.5V Vcc, power source is a LiPoly battery or
a goldcap, Vbat < 5V.
> >
> > I am driving a piezo transducer with a square wave to generate audio and the problem
is that when the port pin is set to digital output, there isn't enough volume as the
voltage swing 2.5V p-p is rather low. The volume is ok with a drive of about 3.5V - 4V
p-p.
> >
> > I would like to try connecting the piezo to Vbat and just sinking it to ground to
generate the square wave, but am not able to find the equivalent of an open-drain port pin
output mode when I looked at the datasheet.
> >
> > However, setting the pin to input puts it in tri-state mode, which I assume is high
impedance.
> >
> > So now I have a couple of questions.
> >
> > Is there an explicit way to set open-drain output mode?
> >
> > I thought of connecting my piezo as above (between Vbat and port pin), and generating
a square wave by alternately setting the port pin mode to input tristate, and to output
mode (with 0 written to pin). Before I try this, is there any risk of damage to the port
by connecting a voltage higher than VCC to the tristated pin ?
> >
> >
> >
> >
> >
> > ------------------------------------
> >
> >
> >
> >
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Driving a piezo transducer with MSP430F1491 - leon Heller - Aug 27 12:26:32 2009
----- Original Message -----
From: "harinnair"
To:
Sent: Thursday, August 27, 2009 11:41 AM
Subject: [msp430] Driving a piezo transducer with MSP430F1491
> Hi,
>
> I am using an MSP430F1491 with regulated 2.5V Vcc, power source is a
> LiPoly battery or a goldcap, Vbat < 5V.
>
> I am driving a piezo transducer with a square wave to generate audio and
> the problem is that when the port pin is set to digital output, there
> isn't enough volume as the voltage swing 2.5V p-p is rather low. The
> volume is ok with a drive of about 3.5V - 4V p-p.
You can get more output by connecting it to two outputs, driven in
anti-phase.
Leon
------------------------------------
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Driving a piezo transducer with MSP430F1491 - harinnair - Aug 28 6:33:18 2009
I wasn't aware of #1, I have used a BSS138 FET before for #2 but that was driven by 3.3V,
not sure if it will switch cleanly with 2.5V. I guess its better to use a BJT with series
base R.
The other possibilities were new to me ...
Thanks for all the information !
--- In m...@yahoogroups.com, "tintronic"
wrote:
#1 Your tri-state approach will probably not work well, you're forgetting about the
protection diodes which connect all digital inputs to Vcc. thus if placed on tri-state the
piezo will act as a pull-up to 5V. The piezo voltage will be swinging between 2.2V
(5-[2.5+0.3]) and 5V.
#2 The simpliest of NPN transistor should be enought to create an open collector gate to
drive the piezo. It doesn't get more simple than that. The series resistor could be used
to control the volume.
>
> Another simple solution is to use two complementary outputs to drive the piezo with
+2.5V and then -2.5V, resulting in 5Vpp. You could use a timer and two compare modules to
generate this wave by hardware.
>
> Last but not least, a series capacitor of the right value could do a similar trick to
increase the voltage swing.
>
> Analyse this options and decide by yourself. There are probably other options as well.
And don't overlook the current drive capacity (sink and source) of the pins; make sure
your piezo doesn't place too high a demand on the pins. You could use more than one pin of
the same port to increase the current capacity, but make sure to change their state
simultaneously.
>
> Regards,
> Michael K.
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - micr...@virginbroadband.com.au - Aug 28 8:52:04 2009
Hi,
A piezo should be OK direct on the I/O pins, I thought.
If you can connect direct to I/O, the simplest way to get more output is to
connect BOTH sides of the
piezo to 2 I/O lines. Turn I/O #1 on and I/O # 2 off. Then reverse the
on/off, #2 on and #1 off.
If you're outputting 3 V on your 2 I/Os, your piezo is driven with 6 Vpp..
simple !
HTH
Kris
On Fri, 28 Aug 2009 10:32:21 -0000, "harinnair"
wrote:
> I wasn't aware of #1, I have used a BSS138 FET before for #2 but that was
> driven by 3.3V, not sure if it will switch cleanly with 2.5V. I guess its
> better to use a BJT with series base R.
> The other possibilities were new to me ...
> Thanks for all the information !
>
> --- In m...@yahoogroups.com, "tintronic" wrote:
>
> #1 Your tri-state approach will probably not work well, you're
forgetting
> about the protection diodes which connect all digital inputs to Vcc. thus
> if placed on tri-state the piezo will act as a pull-up to 5V. The piezo
> voltage will be swinging between 2.2V (5-[2.5+0.3]) and 5V.
>
> #2 The simpliest of NPN transistor should be enought to create an open
> collector gate to drive the piezo. It doesn't get more simple than that.
> The series resistor could be used to control the volume.
>>
>> Another simple solution is to use two complementary outputs to drive the
>> piezo with +2.5V and then -2.5V, resulting in 5Vpp. You could use a
>> timer and two compare modules to generate this wave by hardware.
>>
>> Last but not least, a series capacitor of the right value could do a
>> similar trick to increase the voltage swing.
>>
>> Analyse this options and decide by yourself. There are probably other
>> options as well. And don't overlook the current drive capacity (sink and
>> source) of the pins; make sure your piezo doesn't place too high a
demand
>> on the pins. You could use more than one pin of the same port to
increase
>> the current capacity, but make sure to change their state
simultaneously.
>>
>> Regards,
>> Michael K.
>>
> ------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - OneStone - Aug 28 11:26:16 2009
I haven't used piezo transducers for a while, but last time I tried with
a 149 it couldn't drive the ones I needed even using two pins, it gave a
pathetic cry like a strangled mouse, hence my suggestion to buffer with
a transistor or FET.
3V reversed isn't really 6V p-p.
Al
m...@virginbroadband.com.au wrote:
> Hi,
>
> A piezo should be OK direct on the I/O pins, I thought.
> If you can connect direct to I/O, the simplest way to get more output is to
> connect BOTH sides of the
> piezo to 2 I/O lines. Turn I/O #1 on and I/O # 2 off. Then reverse the
> on/off, #2 on and #1 off.
> If you're outputting 3 V on your 2 I/Os, your piezo is driven with 6 Vpp..
> simple !
>
> HTH
> Kris
>
> On Fri, 28 Aug 2009 10:32:21 -0000, "harinnair"
> wrote:
>> I wasn't aware of #1, I have used a BSS138 FET before for #2 but that was
>> driven by 3.3V, not sure if it will switch cleanly with 2.5V. I guess its
>> better to use a BJT with series base R.
>> The other possibilities were new to me ...
>> Thanks for all the information !
>>
>> --- In m...@yahoogroups.com, "tintronic" wrote:
>>
>> #1 Your tri-state approach will probably not work well, you're
> forgetting
>> about the protection diodes which connect all digital inputs to Vcc. thus
>> if placed on tri-state the piezo will act as a pull-up to 5V. The piezo
>> voltage will be swinging between 2.2V (5-[2.5+0.3]) and 5V.
>>
>> #2 The simpliest of NPN transistor should be enought to create an open
>> collector gate to drive the piezo. It doesn't get more simple than that.
>> The series resistor could be used to control the volume.
>>> Another simple solution is to use two complementary outputs to drive the
>>> piezo with +2.5V and then -2.5V, resulting in 5Vpp. You could use a
>>> timer and two compare modules to generate this wave by hardware.
>>>
>>> Last but not least, a series capacitor of the right value could do a
>>> similar trick to increase the voltage swing.
>>>
>>> Analyse this options and decide by yourself. There are probably other
>>> options as well. And don't overlook the current drive capacity (sink and
>>> source) of the pins; make sure your piezo doesn't place too high a
> demand
>>> on the pins. You could use more than one pin of the same port to
> increase
>>> the current capacity, but make sure to change their state
> simultaneously.
>>> Regards,
>>> Michael K.
>>> ------------------------------------
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Driving a piezo transducer with MSP430F1491 - tintronic - Aug 28 11:32:24 2009
Al,
> 3V reversed isn't really 6V p-p.
Care to ellaborate?
I don't get what you mean. If he drives the piezo with +3V and then -3V, why isn't that 6V
peak to peak?
Regards,
Michael K.
--- In m...@yahoogroups.com, OneStone
wrote:
>
> I haven't used piezo transducers for a while, but last time I tried with
> a 149 it couldn't drive the ones I needed even using two pins, it gave a
> pathetic cry like a strangled mouse, hence my suggestion to buffer with
> a transistor or FET.
>
> 3V reversed isn't really 6V p-p.
>
> Al
>
> microbit@... wrote:
> > Hi,
> >
> > A piezo should be OK direct on the I/O pins, I thought.
> > If you can connect direct to I/O, the simplest way to get more output is to
> > connect BOTH sides of the
> > piezo to 2 I/O lines. Turn I/O #1 on and I/O # 2 off. Then reverse the
> > on/off, #2 on and #1 off.
> > If you're outputting 3 V on your 2 I/Os, your piezo is driven with 6 Vpp..
> > simple !
> >
> > HTH
> > Kris
> >
> > On Fri, 28 Aug 2009 10:32:21 -0000, "harinnair"
> > wrote:
> >> I wasn't aware of #1, I have used a BSS138 FET before for #2 but that was
> >> driven by 3.3V, not sure if it will switch cleanly with 2.5V. I guess its
> >> better to use a BJT with series base R.
> >> The other possibilities were new to me ...
> >> Thanks for all the information !
> >>
> >> --- In m...@yahoogroups.com, "tintronic" wrote:
> >>
> >> #1 Your tri-state approach will probably not work well, you're
> > forgetting
> >> about the protection diodes which connect all digital inputs to Vcc. thus
> >> if placed on tri-state the piezo will act as a pull-up to 5V. The piezo
> >> voltage will be swinging between 2.2V (5-[2.5+0.3]) and 5V.
> >>
> >> #2 The simpliest of NPN transistor should be enought to create an open
> >> collector gate to drive the piezo. It doesn't get more simple than that.
> >> The series resistor could be used to control the volume.
> >>> Another simple solution is to use two complementary outputs to drive the
> >>> piezo with +2.5V and then -2.5V, resulting in 5Vpp. You could use a
> >>> timer and two compare modules to generate this wave by hardware.
> >>>
> >>> Last but not least, a series capacitor of the right value could do a
> >>> similar trick to increase the voltage swing.
> >>>
> >>> Analyse this options and decide by yourself. There are probably other
> >>> options as well. And don't overlook the current drive capacity (sink and
> >>> source) of the pins; make sure your piezo doesn't place too high a
> > demand
> >>> on the pins. You could use more than one pin of the same port to
> > increase
> >>> the current capacity, but make sure to change their state
> > simultaneously.
> >>> Regards,
> >>> Michael K.
> >>>
> >>
> >>
> >>
> >> ------------------------------------
> >>
> >>
> >>
> >>

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - redbeard4545 - Aug 28 11:44:58 2009
Driving the piezo from an I/O pin is not recommended due the relative high back EMF when
the voltage is removed from the device. The catch diodes in the MC is relied upon to limit
it. Not a good idea. I believe that driving the piezo with reversed polarity might be
near the equivalent of 6Vp-p as far as the piezo is concerned. Think about the piezo
bending in one direction with positive voltage and the other direction with negative
polarity.
------------------------------------
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Re: Driving a piezo transducer with MSP430F1491 - OneStone - Aug 28 12:30:24 2009
because he only has +3V and ground and 2 terminals. When he puts ground
on terminal a and 3V on terminal B then switches them over, so that 3V
is on terminal a and ground on temrinal b he still only has3V across the
piezo, he hasn't suddenly generated an extra 3V from somewhere. If he
had a centre tap this might work, but he doesn't.
Al
tintronic wrote:
> Al,
>> 3V reversed isn't really 6V p-p.
> Care to ellaborate?
> I don't get what you mean. If he drives the piezo with +3V and then -3V, why isn't that
6V peak to peak?
>
> Regards,
> Michael K.
> --- In m...@yahoogroups.com, OneStone
wrote:
>> I haven't used piezo transducers for a while, but last time I tried with
>> a 149 it couldn't drive the ones I needed even using two pins, it gave a
>> pathetic cry like a strangled mouse, hence my suggestion to buffer with
>> a transistor or FET.
>>
>> 3V reversed isn't really 6V p-p.
>>
>> Al
>>
>> microbit@... wrote:
>>> Hi,
>>>
>>> A piezo should be OK direct on the I/O pins, I thought.
>>> If you can connect direct to I/O, the simplest way to get more output is to
>>> connect BOTH sides of the
>>> piezo to 2 I/O lines. Turn I/O #1 on and I/O # 2 off. Then reverse the
>>> on/off, #2 on and #1 off.
>>> If you're outputting 3 V on your 2 I/Os, your piezo is driven with 6 Vpp..
>>> simple !
>>>
>>> HTH
>>> Kris
>>>
>>> On Fri, 28 Aug 2009 10:32:21 -0000, "harinnair"
>>> wrote:
>>>> I wasn't aware of #1, I have used a BSS138 FET before for #2 but that was
>>>> driven by 3.3V, not sure if it will switch cleanly with 2.5V. I guess its
>>>> better to use a BJT with series base R.
>>>> The other possibilities were new to me ...
>>>> Thanks for all the information !
>>>>
>>>> --- In m...@yahoogroups.com, "tintronic" wrote:
>>>>
>>>> #1 Your tri-state approach will probably not work well, you're
>>> forgetting
>>>> about the protection diodes which connect all digital inputs to Vcc. thus
>>>> if placed on tri-state the piezo will act as a pull-up to 5V. The piezo
>>>> voltage will be swinging between 2.2V (5-[2.5+0.3]) and 5V.
>>>>
>>>> #2 The simpliest of NPN transistor should be enought to create an open
>>>> collector gate to drive the piezo. It doesn't get more simple than that.
>>>> The series resistor could be used to control the volume.
>>>>> Another simple solution is to use two complementary outputs to drive the
>>>>> piezo with +2.5V and then -2.5V, resulting in 5Vpp. You could use a
>>>>> timer and two compare modules to generate this wave by hardware.
>>>>>
>>>>> Last but not least, a series capacitor of the right value could do a
>>>>> similar trick to increase the voltage swing.
>>>>>
>>>>> Analyse this options and decide by yourself. There are probably other
>>>>> options as well. And don't overlook the current drive capacity (sink and
>>>>> source) of the pins; make sure your piezo doesn't place too high a
>>> demand
>>>>> on the pins. You could use more than one pin of the same port to
>>> increase
>>>>> the current capacity, but make sure to change their state
>>> simultaneously.
>>>>> Regards,
>>>>> Michael K.
>>>>>
>>>>
>>>>
>>>> ------------------------------------
>>>>
>>>>
>>>>
>>>>
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - OneStone - Aug 28 12:34:43 2009
Try it, and try scoping it.
Al
redbeard4545 wrote:
> Driving the piezo from an I/O pin is not recommended due the relative
> high back EMF when the voltage is removed from the device. The catch
> diodes in the MC is relied upon to limit it. Not a good idea. I
> believe that driving the piezo with reversed polarity might be near
> the equivalent of 6Vp-p as far as the piezo is concerned. Think
> about the piezo bending in one direction with positive voltage and
> the other direction with negative polarity.
>
> ------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Driving a piezo transducer with MSP430F1491 - tintronic - Aug 28 13:41:15 2009
Al,
I've to disagree with you on this one.
+3V to -3V is 6V peak to peak (the OP talked about +2.5V Vcc, but let's stay on 3V for
this discussion). If it produces the same effect on the piezo as 0V to 6V or not is a
different discussion, but it's still 6V peak to peak.
Appying this to the piezo, Sound is vibration, thus the piezo needs to move to produce
sound. How much it moves between 3V and 0V is half of what it moves between 3V and -3V. If
it were to be driven between 27V and 33V, the end result is 6Vpp and that is what will
produce sound, not the mean 30Vdc. Constant voltage doesn't produce any sound and is a
waste of energy as it produces a constant stress on the transducer.
The piezo characteristics will probably make it move somewhat different when polarized
with +3V and -3V than 0v and 6V, but 'technically' both are 6Vpp, It will depend on the
specific piezo model.
I supposed the OP was talking about those piezos that need to be fed with a frequency, not
those self-oscilating piezos that only need a constant positive voltage. Else some of us
have made a mistake and were talking oranges instead of apples.
Michael K.
--- In m...@yahoogroups.com, OneStone
wrote:
>
> because he only has +3V and ground and 2 terminals. When he puts ground
> on terminal a and 3V on terminal B then switches them over, so that 3V
> is on terminal a and ground on temrinal b he still only has3V across the
> piezo, he hasn't suddenly generated an extra 3V from somewhere. If he
> had a centre tap this might work, but he doesn't.
>
> Al
>
> tintronic wrote:
> > Al,
> >> 3V reversed isn't really 6V p-p.
> > Care to ellaborate?
> > I don't get what you mean. If he drives the piezo with +3V and then -3V, why isn't
that 6V peak to peak?
> >
> > Regards,
> > Michael K.
> >
> >
> > --- In m...@yahoogroups.com, OneStone wrote:
> >> I haven't used piezo transducers for a while, but last time I tried with
> >> a 149 it couldn't drive the ones I needed even using two pins, it gave a
> >> pathetic cry like a strangled mouse, hence my suggestion to buffer with
> >> a transistor or FET.
> >>
> >> 3V reversed isn't really 6V p-p.
> >>
> >> Al
> >>
> >> microbit@ wrote:
> >>> Hi,
> >>>
> >>> A piezo should be OK direct on the I/O pins, I thought.
> >>> If you can connect direct to I/O, the simplest way to get more output is to
> >>> connect BOTH sides of the
> >>> piezo to 2 I/O lines. Turn I/O #1 on and I/O # 2 off. Then reverse the
> >>> on/off, #2 on and #1 off.
> >>> If you're outputting 3 V on your 2 I/Os, your piezo is driven with 6 Vpp..
> >>> simple !
> >>>
> >>> HTH
> >>> Kris
> >>>
> >>> On Fri, 28 Aug 2009 10:32:21 -0000, "harinnair"
> >>> wrote:
> >>>> I wasn't aware of #1, I have used a BSS138 FET before for #2 but that was
> >>>> driven by 3.3V, not sure if it will switch cleanly with 2.5V. I guess its
> >>>> better to use a BJT with series base R.
> >>>> The other possibilities were new to me ...
> >>>> Thanks for all the information !
> >>>>
> >>>> --- In m...@yahoogroups.com, "tintronic" wrote:
> >>>>
> >>>> #1 Your tri-state approach will probably not work well, you're
> >>> forgetting
> >>>> about the protection diodes which connect all digital inputs to Vcc. thus
> >>>> if placed on tri-state the piezo will act as a pull-up to 5V. The piezo
> >>>> voltage will be swinging between 2.2V (5-[2.5+0.3]) and 5V.
> >>>>
> >>>> #2 The simpliest of NPN transistor should be enought to create an open
> >>>> collector gate to drive the piezo. It doesn't get more simple than that.
> >>>> The series resistor could be used to control the volume.
> >>>>> Another simple solution is to use two complementary outputs to drive the
> >>>>> piezo with +2.5V and then -2.5V, resulting in 5Vpp. You could use a
> >>>>> timer and two compare modules to generate this wave by hardware.
> >>>>>
> >>>>> Last but not least, a series capacitor of the right value could do a
> >>>>> similar trick to increase the voltage swing.
> >>>>>
> >>>>> Analyse this options and decide by yourself. There are probably other
> >>>>> options as well. And don't overlook the current drive capacity (sink and
> >>>>> source) of the pins; make sure your piezo doesn't place too high a
> >>> demand
> >>>>> on the pins. You could use more than one pin of the same port to
> >>> increase
> >>>>> the current capacity, but make sure to change their state
> >>> simultaneously.
> >>>>> Regards,
> >>>>> Michael K.
> >>>>>
> >>>>
> >>>>
> >>>> ------------------------------------
> >>>>
> >>>>
> >>>>
> >>>>
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - OneStone - Aug 28 15:29:31 2009
wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL b
GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
never A 6V DIFFErENCE. whoops, gumby fingers strike again, its late, and
the CNS is shot. If, how ever he had a 3 terminal device with 0V at the
centre and switched 3V from end to end then yes maybe. But in this case
no. Go scope it. There is nothing in the circuit to produce enough to
give you a voltage doubling effect. If there were then these would be
out there already and we wouldn't need the 7660 anymore.
You obviously have to modulate the piezo, but thats why you switch the
FET/transistor. You don't need to do this by toggling the supply to both
ends. It works very nicely thank you by switching one end on and off, I
had assumed (perhaps stupidly in view of some of the other silly posts
here recently) that the OP understood the need to modulate a Piezo
sounder. Now you may very well find some piezos out there that will make
a noise when driven by two pins directly from the MSP, but I wouldn't do
it. i tried it, and got a pathetic wimpy sound like a strangled cat,
whereas the same sounder terrifies the same cat when driven by a tiny
NPN. I had to stop using Piezos because my cat is now nearly 17 and I
can't stand the mess she makes if I scare her.
Al
tintronic wrote:
> Al, I've to disagree with you on this one.
>
> +3V to -3V is 6V peak to peak (the OP talked about +2.5V Vcc, but
> let's stay on 3V for this discussion). If it produces the same effect
> on the piezo as 0V to 6V or not is a different discussion, but it's
> still 6V peak to peak.
>
> Appying this to the piezo, Sound is vibration, thus the piezo needs
> to move to produce sound. How much it moves between 3V and 0V is half
> of what it moves between 3V and -3V. If it were to be driven between
> 27V and 33V, the end result is 6Vpp and that is what will produce
> sound, not the mean 30Vdc. Constant voltage doesn't produce any sound
> and is a waste of energy as it produces a constant stress on the
> transducer.
>
> The piezo characteristics will probably make it move somewhat
> different when polarized with +3V and -3V than 0v and 6V, but
> 'technically' both are 6Vpp, It will depend on the specific piezo
> model.
>
> I supposed the OP was talking about those piezos that need to be fed
> with a frequency, not those self-oscilating piezos that only need a
> constant positive voltage. Else some of us have made a mistake and
> were talking oranges instead of apples.
>
> Michael K.
>
> --- In m...@yahoogroups.com, OneStone
wrote:
>> because he only has +3V and ground and 2 terminals. When he puts
>> ground on terminal a and 3V on terminal B then switches them over,
>> so that 3V is on terminal a and ground on temrinal b he still only
>> has3V across the piezo, he hasn't suddenly generated an extra 3V
>> from somewhere. If he had a centre tap this might work, but he
>> doesn't.
>>
>> Al
>>
>> tintronic wrote:
>>> Al,
>>>> 3V reversed isn't really 6V p-p.
>>> Care to ellaborate? I don't get what you mean. If he drives the
>>> piezo with +3V and then -3V, why isn't that 6V peak to peak?
>>>
>>> Regards, Michael K.
>>>
>>>
>>> --- In m...@yahoogroups.com, OneStone wrote:
>>>> I haven't used piezo transducers for a while, but last time I
>>>> tried with a 149 it couldn't drive the ones I needed even using
>>>> two pins, it gave a pathetic cry like a strangled mouse, hence
>>>> my suggestion to buffer with a transistor or FET.
>>>>
>>>> 3V reversed isn't really 6V p-p.
>>>>
>>>> Al
>>>>
>>>> microbit@ wrote:
>>>>> Hi,
>>>>>
>>>>> A piezo should be OK direct on the I/O pins, I thought. If
>>>>> you can connect direct to I/O, the simplest way to get more
>>>>> output is to connect BOTH sides of the piezo to 2 I/O lines.
>>>>> Turn I/O #1 on and I/O # 2 off. Then reverse the on/off, #2
>>>>> on and #1 off. If you're outputting 3 V on your 2 I/Os, your
>>>>> piezo is driven with 6 Vpp.. simple !
>>>>>
>>>>> HTH Kris
>>>>>
>>>>> On Fri, 28 Aug 2009 10:32:21 -0000, "harinnair"
>>>>> wrote:
>>>>>> I wasn't aware of #1, I have used a BSS138 FET before for
>>>>>> #2 but that was driven by 3.3V, not sure if it will switch
>>>>>> cleanly with 2.5V. I guess its better to use a BJT with
>>>>>> series base R. The other possibilities were new to me ...
>>>>>> Thanks for all the information !
>>>>>>
>>>>>> --- In m...@yahoogroups.com, "tintronic" wrote:
>>>>>>
>>>>>>
>>>>>> #1 Your tri-state approach will probably not work well,
>>>>>> you're
>>>>> forgetting
>>>>>> about the protection diodes which connect all digital
>>>>>> inputs to Vcc. thus if placed on tri-state the piezo will
>>>>>> act as a pull-up to 5V. The piezo voltage will be swinging
>>>>>> between 2.2V (5-[2.5+0.3]) and 5V.
>>>>>>
>>>>>> #2 The simpliest of NPN transistor should be enought to
>>>>>> create an open collector gate to drive the piezo. It
>>>>>> doesn't get more simple than that. The series resistor
>>>>>> could be used to control the volume.
>>>>>>> Another simple solution is to use two complementary
>>>>>>> outputs to drive the piezo with +2.5V and then -2.5V,
>>>>>>> resulting in 5Vpp. You could use a timer and two compare
>>>>>>> modules to generate this wave by hardware.
>>>>>>>
>>>>>>> Last but not least, a series capacitor of the right value
>>>>>>> could do a similar trick to increase the voltage swing.
>>>>>>>
>>>>>>> Analyse this options and decide by yourself. There are
>>>>>>> probably other options as well. And don't overlook the
>>>>>>> current drive capacity (sink and source) of the pins;
>>>>>>> make sure your piezo doesn't place too high a
>>>>> demand
>>>>>>> on the pins. You could use more than one pin of the same
>>>>>>> port to
>>>>> increase
>>>>>>> the current capacity, but make sure to change their state
>>>>>>>
>>>>> simultaneously.
>>>>>>> Regards, Michael K.
>>>>>>>
>>>>>>
>>>>>> ------------------------------------
>>>>>>
>>>>>>
>>>>>>
>>>>>>

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - Larry Walker - Aug 28 15:36:31 2009
Driving the piezo from an I/O pin is not recommended due the relative high
back EMF when the voltage is removed from the device. The catch diodes in
the MC is relied upon to limit it. Not a good idea. I believe that
driving the piezo with reversed polarity might be near the equivalent of
6Vp-p as far as the piezo is concerned. Think about the piezo bending in
one direction with positive voltage and the other direction with negative
polarity.
Larry Walker | Sr. Electrical Engineer
direct
(801) 264-1001 X288
Moog Medical Devices Group
fax
(801) 664-9241
4314 Zevex Park Ln
e-mail
l...@moog.com
Salt Lake city, UT 84123
www.moog.com/medical
[Non-text portions of this message have been removed]
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Re: Driving a piezo transducer with MSP430F1491 - Dan Bloomquist - Aug 28 16:18:32 2009
OneStone wrote:
> wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL b
> GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
> never A 6V DIFFErENCE. whoops, gumby fingers strike again, its late, and
> the CNS is shot. If, how ever he had a 3 terminal device with 0V at the
> centre and switched 3V from end to end then yes maybe. But in this case
> no. Go scope it. There is nothing in the circuit to produce enough to
> give you a voltage doubling effect. If there were then these would be
> out there already and we wouldn't need the 7660 anymore.
>
Hi Al,
The light will come on. The 7660 is about creating a negative supply
where needed. Driving the piezo is about the effective peak to peak, AC,
entirely different. If you move one pin from +3 to 0 while moving the
other pin from 0 to +3 it creates a 6 volt swing on the pins. This kind
of thing is commonly done to reverse DC motors with a single supply.
As far as driving the piezo directly with the MSP, that's something else.
Best, Dan.
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - Hugh Molesworth - Aug 28 16:24:30 2009
Think current, not voltage. As far as the piezo is concerned, it
makes more noise when driving first with current in one direction and
then driving with current in the opposite direction than it does if
just driven in a single direction. Equivalent to increasing the
voltage. This is how all H-bridge stepper motors and solenoids work,
and reduces the required voltage available for a given output
"force". Thus using 2 pins is better (louder) than using just 1,
though I have to say driving directly from a pin (or 2 pins) without
a buffer makes me a little nervous :-)
Hugh
At 12:28 PM 8/28/2009, you wrote:
>wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL b
>GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
>never A 6V DIFFErENCE. whoops, gumby fingers strike again, its late, and
>the CNS is shot. If, how ever he had a 3 terminal device with 0V at the
>centre and switched 3V from end to end then yes maybe. But in this case
>no. Go scope it. There is nothing in the circuit to produce enough to
>give you a voltage doubling effect. If there were then these would be
>out there already and we wouldn't need the 7660 anymore.
>
>You obviously have to modulate the piezo, but thats why you switch the
>FET/transistor. You don't need to do this by toggling the supply to both
>ends. It works very nicely thank you by switching one end on and off, I
>had assumed (perhaps stupidly in view of some of the other silly posts
>here recently) that the OP understood the need to modulate a Piezo
>sounder. Now you may very well find some piezos out there that will make
>a noise when driven by two pins directly from the MSP, but I wouldn't do
>it. i tried it, and got a pathetic wimpy sound like a strangled cat,
>whereas the same sounder terrifies the same cat when driven by a tiny
>NPN. I had to stop using Piezos because my cat is now nearly 17 and I
>can't stand the mess she makes if I scare her.
>
>Al
>
>tintronic wrote:
> > Al, I've to disagree with you on this one.
> >
> > +3V to -3V is 6V peak to peak (the OP talked about +2.5V Vcc, but
> > let's stay on 3V for this discussion). If it produces the same effect
> > on the piezo as 0V to 6V or not is a different discussion, but it's
> > still 6V peak to peak.
> >
> > Appying this to the piezo, Sound is vibration, thus the piezo needs
> > to move to produce sound. How much it moves between 3V and 0V is half
> > of what it moves between 3V and -3V. If it were to be driven between
> > 27V and 33V, the end result is 6Vpp and that is what will produce
> > sound, not the mean 30Vdc. Constant voltage doesn't produce any sound
> > and is a waste of energy as it produces a constant stress on the
> > transducer.
> >
> > The piezo characteristics will probably make it move somewhat
> > different when polarized with +3V and -3V than 0v and 6V, but
> > 'technically' both are 6Vpp, It will depend on the specific piezo
> > model.
> >
> > I supposed the OP was talking about those piezos that need to be fed
> > with a frequency, not those self-oscilating piezos that only need a
> > constant positive voltage. Else some of us have made a mistake and
> > were talking oranges instead of apples.
> >
> > Michael K.
> >
> > --- In m...@yahoogroups.com, OneStone
wrote:
> >> because he only has +3V and ground and 2 terminals. When he puts
> >> ground on terminal a and 3V on terminal B then switches them over,
> >> so that 3V is on terminal a and ground on temrinal b he still only
> >> has3V across the piezo, he hasn't suddenly generated an extra 3V
> >> from somewhere. If he had a centre tap this might work, but he
> >> doesn't.
> >>
> >> Al
> >>
> >> tintronic wrote:
> >>> Al,
> >>>> 3V reversed isn't really 6V p-p.
> >>> Care to ellaborate? I don't get what you mean. If he drives the
> >>> piezo with +3V and then -3V, why isn't that 6V peak to peak?
> >>>
> >>> Regards, Michael K.
> >>>
> >>>
> >>> --- In m...@yahoogroups.com, OneStone wrote:
> >>>> I haven't used piezo transducers for a while, but last time I
> >>>> tried with a 149 it couldn't drive the ones I needed even using
> >>>> two pins, it gave a pathetic cry like a strangled mouse, hence
> >>>> my suggestion to buffer with a transistor or FET.
> >>>>
> >>>> 3V reversed isn't really 6V p-p.
> >>>>
> >>>> Al
> >>>>
> >>>> microbit@ wrote:
> >>>>> Hi,
> >>>>>
> >>>>> A piezo should be OK direct on the I/O pins, I thought. If
> >>>>> you can connect direct to I/O, the simplest way to get more
> >>>>> output is to connect BOTH sides of the piezo to 2 I/O lines.
> >>>>> Turn I/O #1 on and I/O # 2 off. Then reverse the on/off, #2
> >>>>> on and #1 off. If you're outputting 3 V on your 2 I/Os, your
> >>>>> piezo is driven with 6 Vpp.. simple !
> >>>>>
> >>>>> HTH Kris
> >>>>>
> >>>>> On Fri, 28 Aug 2009 10:32:21 -0000, "harinnair"
> >>>>> wrote:
> >>>>>> I wasn't aware of #1, I have used a BSS138 FET before for
> >>>>>> #2 but that was driven by 3.3V, not sure if it will switch
> >>>>>> cleanly with 2.5V. I guess its better to use a BJT with
> >>>>>> series base R. The other possibilities were new to me ...
> >>>>>> Thanks for all the information !
> >>>>>>
> >>>>>> --- In m...@yahoogroups.com, "tintronic" wrote:
> >>>>>>
> >>>>>>
> >>>>>> #1 Your tri-state approach will probably not work well,
> >>>>>> you're
> >>>>> forgetting
> >>>>>> about the protection diodes which connect all digital
> >>>>>> inputs to Vcc. thus if placed on tri-state the piezo will
> >>>>>> act as a pull-up to 5V. The piezo voltage will be swinging
> >>>>>> between 2.2V (5-[2.5+0.3]) and 5V.
> >>>>>>
> >>>>>> #2 The simpliest of NPN transistor should be enought to
> >>>>>> create an open collector gate to drive the piezo. It
> >>>>>> doesn't get more simple than that. The series resistor
> >>>>>> could be used to control the volume.
> >>>>>>> Another simple solution is to use two complementary
> >>>>>>> outputs to drive the piezo with +2.5V and then -2.5V,
> >>>>>>> resulting in 5Vpp. You could use a timer and two compare
> >>>>>>> modules to generate this wave by hardware.
> >>>>>>>
> >>>>>>> Last but not least, a series capacitor of the right value
> >>>>>>> could do a similar trick to increase the voltage swing.
> >>>>>>>
> >>>>>>> Analyse this options and decide by yourself. There are
> >>>>>>> probably other options as well. And don't overlook the
> >>>>>>> current drive capacity (sink and source) of the pins;
> >>>>>>> make sure your piezo doesn't place too high a
> >>>>> demand
> >>>>>>> on the pins. You could use more than one pin of the same
> >>>>>>> port to
> >>>>> increase
> >>>>>>> the current capacity, but make sure to change their state
> >>>>>>>
> >>>>> simultaneously.
> >>>>>>> Regards, Michael K.
> >>>>>>>
> >>>>>>
> >>>>>> ------------------------------------
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Driving a piezo transducer with MSP430F1491 - tintronic - Aug 28 16:43:42 2009
Al,
--- In m...@yahoogroups.com, OneStone
wrote:
>
> wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v.
> TERMINAL b GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY
> GIVEN TIME.
No it's not. That is 3V across and then -3V across if measured the same way.
> never A 6V DIFFErENCE.
No one said that. We said Vpp is 6V, not Vp.
> whoops, gumby fingers strike again, its
> late, and the CNS is shot. If, how ever he had a 3 terminal device
> with 0V at the centre and switched 3V from end to end then yes
> maybe. But in this case no. Go scope it. There is nothing in the
> circuit to produce enough to give you a voltage doubling effect.
Not with respect to the MSP ground, but the Piezo coudn't care less. It needs a bigger
voltage swing between its terminals.
> If there were then these would be out there already and we wouldn't
> need the 7660 anymore.
Maybe you don't. If you feed the 7660 in parallel to the MSP, it will generate a negative
voltage with respect to the MSP ground. This is not what we're proposing. We propose to
feed the piezo with -3V across its terminals, not with -3V between one terminal conected
to ground and the other. If you use the 7660 and connect one terminal of the piezo to
ground and swithc the other between +3V rail and -3V rail, you will be feeding it with
6Vpp, but there will be no instant on which 6V are applied between terminals.
You're not getting the concet of AC versus DC voltages. The difference lays in the
amplitude of the AC componente of the square wave. If you ony switch ground on and off,
the piezo is fed with about 1.5Vdc + 3Vpp. If you invert the polarity (essentialy
implementing an H-bridge) you will be feeding it with about 0Vdc + 6Vpp. Surely you get
that the AC component of the voltage is what produces the sound. I still don't understand
what part of Vpp you don't get, or don't you get the difference between Vpp and Vp?. Vpp
is Voltage PEAK TO PEAK. that's the difference between the negative peak and the positive
peak. 0V to 3V is 3Vpp. -3V to +3V is 6Vpp, so is 0V to 6V. What would happen to the MSP
if you invert the terminals feeding it with Vcc? Exactly! Pssst boom. You would
effectively be applying -3V to it, no matter that you are using a single 3V power supply.
You can't tell me inverting the polarity to the piezo insted of just disconnecting it will
have no effect. You don't need a center tap, inverting polarity to it is the same as
connecting the center tap to gnd and appying half the voltage to one terminal an then the
other. Have you never used a transformer with only a single 12Vac secondary to make a
+12Vdc 0V -12Vdc power supply? You don't need the center tap, you even spare 2 diodes.
Voltage is an electrical potential difference. "difference" being the operative word.
Given nodes A and B, Vpp is the voltage difference between the most positive voltage point
A has with respect to B and the most negative value A has with respect to B, not to
ground.
I'm actually using this inverting of both terminals of an audio transformer with 1:1 ratio
and the output Vpp is almost double the power supply of 3.3V. The trafo even has a center
tap which I'm not using. I'm also doing this with latching relays with and without center
tap. Using an H-bridge you don't need the third terminal, 2 terminals suffice. And the
same goes for stepper motors, which can be driven using 4, 6 or 8 terminals,
simultaneously or not.
I challenge you to put a scope between both piezo terminals and find out that in fact it
will read +3V and -3V. Obviously, the probe of the scope has to be connected to one of the
piezo terminals and the ground of the scope to the other piezo terminal, not to the MSP
ground, since the piezo doesn't care about the MSP ground, all it 'knows' si what voltage
is being applied between it's two terminals.
Or measure the Vpp of mains to your lab. If it's 220Vac, that's 311Vp and 622Vpp.
Hope you understand this when you read it in the morning.
Best Regards,
Michael K.
--- In m...@yahoogroups.com, OneStone wrote:
>
> wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL b
> GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
> never A 6V DIFFErENCE. whoops, gumby fingers strike again, its late, and
> the CNS is shot. If, how ever he had a 3 terminal device with 0V at the
> centre and switched 3V from end to end then yes maybe. But in this case
> no. Go scope it. There is nothing in the circuit to produce enough to
> give you a voltage doubling effect. If there were then these would be
> out there already and we wouldn't need the 7660 anymore.
>
> You obviously have to modulate the piezo, but thats why you switch the
> FET/transistor. You don't need to do this by toggling the supply to both
> ends. It works very nicely thank you by switching one end on and off, I
> had assumed (perhaps stupidly in view of some of the other silly posts
> here recently) that the OP understood the need to modulate a Piezo
> sounder. Now you may very well find some piezos out there that will make
> a noise when driven by two pins directly from the MSP, but I wouldn't do
> it. i tried it, and got a pathetic wimpy sound like a strangled cat,
> whereas the same sounder terrifies the same cat when driven by a tiny
> NPN. I had to stop using Piezos because my cat is now nearly 17 and I
> can't stand the mess she makes if I scare her.
>
> Al
>
> tintronic wrote:
> > Al, I've to disagree with you on this one.
> >
> > +3V to -3V is 6V peak to peak (the OP talked about +2.5V Vcc, but
> > let's stay on 3V for this discussion). If it produces the same effect
> > on the piezo as 0V to 6V or not is a different discussion, but it's
> > still 6V peak to peak.
> >
> > Appying this to the piezo, Sound is vibration, thus the piezo needs
> > to move to produce sound. How much it moves between 3V and 0V is half
> > of what it moves between 3V and -3V. If it were to be driven between
> > 27V and 33V, the end result is 6Vpp and that is what will produce
> > sound, not the mean 30Vdc. Constant voltage doesn't produce any sound
> > and is a waste of energy as it produces a constant stress on the
> > transducer.
> >
> > The piezo characteristics will probably make it move somewhat
> > different when polarized with +3V and -3V than 0v and 6V, but
> > 'technically' both are 6Vpp, It will depend on the specific piezo
> > model.
> >
> > I supposed the OP was talking about those piezos that need to be fed
> > with a frequency, not those self-oscilating piezos that only need a
> > constant positive voltage. Else some of us have made a mistake and
> > were talking oranges instead of apples.
> >
> > Michael K.
> >
> > --- In m...@yahoogroups.com, OneStone wrote:
> >> because he only has +3V and ground and 2 terminals. When he puts
> >> ground on terminal a and 3V on terminal B then switches them over,
> >> so that 3V is on terminal a and ground on temrinal b he still only
> >> has3V across the piezo, he hasn't suddenly generated an extra 3V
> >> from somewhere. If he had a centre tap this might work, but he
> >> doesn't.
> >>
> >> Al
> >>
> >> tintronic wrote:
> >>> Al,
> >>>> 3V reversed isn't really 6V p-p.
> >>> Care to ellaborate? I don't get what you mean. If he drives the
> >>> piezo with +3V and then -3V, why isn't that 6V peak to peak?
> >>>
> >>> Regards, Michael K.
> >>>
> >>>
> >>> --- In m...@yahoogroups.com, OneStone wrote:
> >>>> I haven't used piezo transducers for a while, but last time I
> >>>> tried with a 149 it couldn't drive the ones I needed even using
> >>>> two pins, it gave a pathetic cry like a strangled mouse, hence
> >>>> my suggestion to buffer with a transistor or FET.
> >>>>
> >>>> 3V reversed isn't really 6V p-p.
> >>>>
> >>>> Al
> >>>>
> >>>> microbit@ wrote:
> >>>>> Hi,
> >>>>>
> >>>>> A piezo should be OK direct on the I/O pins, I thought. If
> >>>>> you can connect direct to I/O, the simplest way to get more
> >>>>> output is to connect BOTH sides of the piezo to 2 I/O lines.
> >>>>> Turn I/O #1 on and I/O # 2 off. Then reverse the on/off, #2
> >>>>> on and #1 off. If you're outputting 3 V on your 2 I/Os, your
> >>>>> piezo is driven with 6 Vpp.. simple !
> >>>>>
> >>>>> HTH Kris
> >>>>>
> >>>>> On Fri, 28 Aug 2009 10:32:21 -0000, "harinnair"
> >>>>> wrote:
> >>>>>> I wasn't aware of #1, I have used a BSS138 FET before for
> >>>>>> #2 but that was driven by 3.3V, not sure if it will switch
> >>>>>> cleanly with 2.5V. I guess its better to use a BJT with
> >>>>>> series base R. The other possibilities were new to me ...
> >>>>>> Thanks for all the information !
> >>>>>>
> >>>>>> --- In m...@yahoogroups.com, "tintronic" wrote:
> >>>>>>
> >>>>>>
> >>>>>> #1 Your tri-state approach will probably not work well,
> >>>>>> you're
> >>>>> forgetting
> >>>>>> about the protection diodes which connect all digital
> >>>>>> inputs to Vcc. thus if placed on tri-state the piezo will
> >>>>>> act as a pull-up to 5V. The piezo voltage will be swinging
> >>>>>> between 2.2V (5-[2.5+0.3]) and 5V.
> >>>>>>
> >>>>>> #2 The simpliest of NPN transistor should be enought to
> >>>>>> create an open collector gate to drive the piezo. It
> >>>>>> doesn't get more simple than that. The series resistor
> >>>>>> could be used to control the volume.
> >>>>>>> Another simple solution is to use two complementary
> >>>>>>> outputs to drive the piezo with +2.5V and then -2.5V,
> >>>>>>> resulting in 5Vpp. You could use a timer and two compare
> >>>>>>> modules to generate this wave by hardware.
> >>>>>>>
> >>>>>>> Last but not least, a series capacitor of the right value
> >>>>>>> could do a similar trick to increase the voltage swing.
> >>>>>>>
> >>>>>>> Analyse this options and decide by yourself. There are
> >>>>>>> probably other options as well. And don't overlook the
> >>>>>>> current drive capacity (sink and source) of the pins;
> >>>>>>> make sure your piezo doesn't place too high a
> >>>>> demand
> >>>>>>> on the pins. You could use more than one pin of the same
> >>>>>>> port to
> >>>>> increase
> >>>>>>> the current capacity, but make sure to change their state
> >>>>>>>
> >>>>> simultaneously.
> >>>>>>> Regards, Michael K.
> >>>>>>>
> >>>>>>
> >>>>>> ------------------------------------
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - Bart Oegema - Aug 28 16:55:57 2009
>> wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v.
>> TERMINAL b GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY
>> GIVEN TIME.
> No it's not. That is 3V across and then -3V across if measured the same way.
I was having difficulty understanding this as well, and that's what
finally turned the light on for me. Thanks, Michael. And thanks, Al.
- Bart
On Fri, Aug 28, 2009 at 1:43 PM, tintronic
wrote:
> Al,
>
> --- In m...@yahoogroups.com, OneStone wrote:
>>
>> wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v.
>> TERMINAL b GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY
>> GIVEN TIME.
> No it's not. That is 3V across and then -3V across if measured the same way.
>
>> never A 6V DIFFErENCE.
> No one said that. We said Vpp is 6V, not Vp.
>
>> whoops, gumby fingers strike again, its
>> late, and the CNS is shot. If, how ever he had a 3 terminal device
>> with 0V at the centre and switched 3V from end to end then yes
>> maybe. But in this case no. Go scope it. There is nothing in the
>> circuit to produce enough to give you a voltage doubling effect.
> Not with respect to the MSP ground, but the Piezo coudn't care less. It
> needs a bigger voltage swing between its terminals.
>
>> If there were then these would be out there already and we wouldn't
>> need the 7660 anymore.
> Maybe you don't. If you feed the 7660 in parallel to the MSP, it will
> generate a negative voltage with respect to the MSP ground. This is not what
> we're proposing. We propose to feed the piezo with -3V across its terminals,
> not with -3V between one terminal conected to ground and the other. If you
> use the 7660 and connect one terminal of the piezo to ground and swithc the
> other between +3V rail and -3V rail, you will be feeding it with 6Vpp, but
> there will be no instant on which 6V are applied between terminals.
>
> You're not getting the concet of AC versus DC voltages. The difference lays
> in the amplitude of the AC componente of the square wave. If you ony switch
> ground on and off, the piezo is fed with about 1.5Vdc + 3Vpp. If you invert
> the polarity (essentialy implementing an H-bridge) you will be feeding it
> with about 0Vdc + 6Vpp. Surely you get that the AC component of the voltage
> is what produces the sound. I still don't understand what part of Vpp you
> don't get, or don't you get the difference between Vpp and Vp?. Vpp is
> Voltage PEAK TO PEAK. that's the difference between the negative peak and
> the positive peak. 0V to 3V is 3Vpp. -3V to +3V is 6Vpp, so is 0V to 6V.
> What would happen to the MSP if you invert the terminals feeding it with
> Vcc? Exactly! Pssst boom. You would effectively be applying -3V to it, no
> matter that you are using a single 3V power supply. You can't tell me
> inverting the polarity to the piezo insted of just disconnecting it will
> have no effect. You don't need a center tap, inverting polarity to it is the
> same as connecting the center tap to gnd and appying half the voltage to one
> terminal an then the other. Have you never used a transformer with only a
> single 12Vac secondary to make a +12Vdc 0V -12Vdc power supply? You don't
> need the center tap, you even spare 2 diodes.
> Voltage is an electrical potential difference. "difference" being the
> operative word. Given nodes A and B, Vpp is the voltage difference between
> the most positive voltage point A has with respect to B and the most
> negative value A has with respect to B, not to ground.
>
> I'm actually using this inverting of both terminals of an audio transformer
> with 1:1 ratio and the output Vpp is almost double the power supply of 3.3V.
> The trafo even has a center tap which I'm not using. I'm also doing this
> with latching relays with and without center tap. Using an H-bridge you
> don't need the third terminal, 2 terminals suffice. And the same goes for
> stepper motors, which can be driven using 4, 6 or 8 terminals,
> simultaneously or not.
> I challenge you to put a scope between both piezo terminals and find out
> that in fact it will read +3V and -3V. Obviously, the probe of the scope has
> to be connected to one of the piezo terminals and the ground of the scope to
> the other piezo terminal, not to the MSP ground, since the piezo doesn't
> care about the MSP ground, all it 'knows' si what voltage is being applied
> between it's two terminals.
>
> Or measure the Vpp of mains to your lab. If it's 220Vac, that's 311Vp and
> 622Vpp.
>
> Hope you understand this when you read it in the morning.
>
> Best Regards,
> Michael K.
>
> --- In m...@yahoogroups.com, OneStone wrote:
>>
>> wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL b
>> GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
>> never A 6V DIFFErENCE. whoops, gumby fingers strike again, its late, and
>> the CNS is shot. If, how ever he had a 3 terminal device with 0V at the
>> centre and switched 3V from end to end then yes maybe. But in this case
>> no. Go scope it. There is nothing in the circuit to produce enough to
>> give you a voltage doubling effect. If there were then these would be
>> out there already and we wouldn't need the 7660 anymore.
>>
>> You obviously have to modulate the piezo, but thats why you switch the
>> FET/transistor. You don't need to do this by toggling the supply to both
>> ends. It works very nicely thank you by switching one end on and off, I
>> had assumed (perhaps stupidly in view of some of the other silly posts
>> here recently) that the OP understood the need to modulate a Piezo
>> sounder. Now you may very well find some piezos out there that will make
>> a noise when driven by two pins directly from the MSP, but I wouldn't do
>> it. i tried it, and got a pathetic wimpy sound like a strangled cat,
>> whereas the same sounder terrifies the same cat when driven by a tiny
>> NPN. I had to stop using Piezos because my cat is now nearly 17 and I
>> can't stand the mess she makes if I scare her.
>>
>> Al
>>
>> tintronic wrote:
>> > Al, I've to disagree with you on this one.
>> >
>> > +3V to -3V is 6V peak to peak (the OP talked about +2.5V Vcc, but
>> > let's stay on 3V for this discussion). If it produces the same effect
>> > on the piezo as 0V to 6V or not is a different discussion, but it's
>> > still 6V peak to peak.
>> >
>> > Appying this to the piezo, Sound is vibration, thus the piezo needs
>> > to move to produce sound. How much it moves between 3V and 0V is half
>> > of what it moves between 3V and -3V. If it were to be driven between
>> > 27V and 33V, the end result is 6Vpp and that is what will produce
>> > sound, not the mean 30Vdc. Constant voltage doesn't produce any sound
>> > and is a waste of energy as it produces a constant stress on the
>> > transducer.
>> >
>> > The piezo characteristics will probably make it move somewhat
>> > different when polarized with +3V and -3V than 0v and 6V, but
>> > 'technically' both are 6Vpp, It will depend on the specific piezo
>> > model.
>> >
>> > I supposed the OP was talking about those piezos that need to be fed
>> > with a frequency, not those self-oscilating piezos that only need a
>> > constant positive voltage. Else some of us have made a mistake and
>> > were talking oranges instead of apples.
>> >
>> > Michael K.
>> >
>> > --- In m...@yahoogroups.com, OneStone wrote:
>> >> because he only has +3V and ground and 2 terminals. When he puts
>> >> ground on terminal a and 3V on terminal B then switches them over,
>> >> so that 3V is on terminal a and ground on temrinal b he still only
>> >> has3V across the piezo, he hasn't suddenly generated an extra 3V
>> >> from somewhere. If he had a centre tap this might work, but he
>> >> doesn't.
>> >>
>> >> Al
>> >>
>> >> tintronic wrote:
>> >>> Al,
>> >>>> 3V reversed isn't really 6V p-p.
>> >>> Care to ellaborate? I don't get what you mean. If he drives the
>> >>> piezo with +3V and then -3V, why isn't that 6V peak to peak?
>> >>>
>> >>> Regards, Michael K.
>> >>>
>> >>>
>> >>> --- In m...@yahoogroups.com, OneStone wrote:
>> >>>> I haven't used piezo transducers for a while, but last time I
>> >>>> tried with a 149 it couldn't drive the ones I needed even using
>> >>>> two pins, it gave a pathetic cry like a strangled mouse, hence
>> >>>> my suggestion to buffer with a transistor or FET.
>> >>>>
>> >>>> 3V reversed isn't really 6V p-p.
>> >>>>
>> >>>> Al
>> >>>>
>> >>>> microbit@ wrote:
>> >>>>> Hi,
>> >>>>>
>> >>>>> A piezo should be OK direct on the I/O pins, I thought. If
>> >>>>> you can connect direct to I/O, the simplest way to get more
>> >>>>> output is to connect BOTH sides of the piezo to 2 I/O lines.
>> >>>>> Turn I/O #1 on and I/O # 2 off. Then reverse the on/off, #2
>> >>>>> on and #1 off. If you're outputting 3 V on your 2 I/Os, your
>> >>>>> piezo is driven with 6 Vpp.. simple !
>> >>>>>
>> >>>>> HTH Kris
>> >>>>>
>> >>>>> On Fri, 28 Aug 2009 10:32:21 -0000, "harinnair"
>> >>>>> wrote:
>> >>>>>> I wasn't aware of #1, I have used a BSS138 FET before for
>> >>>>>> #2 but that was driven by 3.3V, not sure if it will switch
>> >>>>>> cleanly with 2.5V. I guess its better to use a BJT with
>> >>>>>> series base R. The other possibilities were new to me ...
>> >>>>>> Thanks for all the information !
>> >>>>>>
>> >>>>>> --- In m...@yahoogroups.com, "tintronic" wrote:
>> >>>>>>
>> >>>>>>
>> >>>>>> #1 Your tri-state approach will probably not work well,
>> >>>>>> you're
>> >>>>> forgetting
>> >>>>>> about the protection diodes which connect all digital
>> >>>>>> inputs to Vcc. thus if placed on tri-state the piezo will
>> >>>>>> act as a pull-up to 5V. The piezo voltage will be swinging
>> >>>>>> between 2.2V (5-[2.5+0.3]) and 5V.
>> >>>>>>
>> >>>>>> #2 The simpliest of NPN transistor should be enought to
>> >>>>>> create an open collector gate to drive the piezo. It
>> >>>>>> doesn't get more simple than that. The series resistor
>> >>>>>> could be used to control the volume.
>> >>>>>>> Another simple solution is to use two complementary
>> >>>>>>> outputs to drive the piezo with +2.5V and then -2.5V,
>> >>>>>>> resulting in 5Vpp. You could use a timer and two compare
>> >>>>>>> modules to generate this wave by hardware.
>> >>>>>>>
>> >>>>>>> Last but not least, a series capacitor of the right value
>> >>>>>>> could do a similar trick to increase the voltage swing.
>> >>>>>>>
>> >>>>>>> Analyse this options and decide by yourself. There are
>> >>>>>>> probably other options as well. And don't overlook the
>> >>>>>>> current drive capacity (sink and source) of the pins;
>> >>>>>>> make sure your piezo doesn't place too high a
>> >>>>> demand
>> >>>>>>> on the pins. You could use more than one pin of the same
>> >>>>>>> port to
>> >>>>> increase
>> >>>>>>> the current capacity, but make sure to change their state
>> >>>>>>>
>> >>>>> simultaneously.
>> >>>>>>> Regards, Michael K.
>> >>>>>>>
>> >>>>>>
>> >>>>>> ------------------------------------
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - Jon Kirwan - Aug 28 17:54:35 2009
On Sat, 29 Aug 2009 04:58:57 +0930, you wrote:
>wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL b
>GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
>
Hi, Al. Call the two piezo nodes A and B. Imagine placing your scope
ground lead on node A and the tip on node B. What would the scope
"see?" That's what the piezo sees. From the microcontroller point of
view, A:B is either 0:+3 or +3:0. But from the scope perspective
(piezo, too), where only one fixed reference is available (A, in this
case), A:B instead looks like 0:+3 or 0:-3. A (the first node listed)
is always 'seen' as zero, by definition. In other words, the scope
will show a nice square wave centered on zero volts and going from +3
to -3 and back again.
Jon
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Driving a piezo transducer with MSP430F1491 - old_cow_yellow - Aug 28 20:07:42 2009
--- In m...@yahoogroups.com, Jon Kirwan
wrote:
>
> On Sat, 29 Aug 2009 04:58:57 +0930, you wrote:
>
> >wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL b
> >GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
> > Hi, Al. Call the two piezo nodes A and B. Imagine placing your scope
> ground lead on node A and the tip on node B. What would the scope
> "see?" That's what the piezo sees. From the microcontroller point of
> view, A:B is either 0:+3 or +3:0. But from the scope perspective
> (piezo, too), where only one fixed reference is available (A, in this
> case), A:B instead looks like 0:+3 or 0:-3. A (the first node listed)
> is always 'seen' as zero, by definition. In other words, the scope
> will show a nice square wave centered on zero volts and going from +3
> to -3 and back again.
>
> Jon
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Driving a piezo transducer with MSP430F1491 - old_cow_yellow - Aug 28 20:10:44 2009
United States Defense Advanced Research Projects Agency has an Energy Harvesting Project,
which includes piezoelectric generators embedded in soldiers' boots.
They could have generated far more energy by starting a discussion of Piezo Transducers in
this group.
--- In m...@yahoogroups.com, Jon Kirwan
wrote:
>
> On Sat, 29 Aug 2009 04:58:57 +0930, you wrote:
>
> >wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL b
> >GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
> > Hi, Al. Call the two piezo nodes A and B. Imagine placing your scope
> ground lead on node A and the tip on node B. What would the scope
> "see?" That's what the piezo sees. From the microcontroller point of
> view, A:B is either 0:+3 or +3:0. But from the scope perspective
> (piezo, too), where only one fixed reference is available (A, in this
> case), A:B instead looks like 0:+3 or 0:-3. A (the first node listed)
> is always 'seen' as zero, by definition. In other words, the scope
> will show a nice square wave centered on zero volts and going from +3
> to -3 and back again.
>
> Jon
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - micr...@virginbroadband.com.au - Aug 28 21:02:01 2009
Goodie..
Nevertheless, I'm glad ya'all up to speed now on the concept of getting 6
Vpp on the piezo from a 3 Vcc supplied
MCU :-)
Still, I don't see the problem with loading the MCU. The piezo is purely
electrostatic. At a couple of kHz the load is next to nix.
I once used this in a commercial product with ultra sonically welded piezos
(with a small PIC).
Client sold over 250K pcs, never once had a problem with MCU or piezo...
B rgds
Kris
On Sat, 29 Aug 2009 00:10:36 -0000, "old_cow_yellow"
wrote:
> United States Defense Advanced Research Projects Agency has an Energy
> Harvesting Project, which includes piezoelectric generators embedded in
> soldiers' boots.
>
> They could have generated far more energy by starting a discussion of
Piezo
> Transducers in this group.
>
> --- In m...@yahoogroups.com, Jon Kirwan wrote:
>>
>> On Sat, 29 Aug 2009 04:58:57 +0930, you wrote:
>>
>> >wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL
b
>> >
>> >GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
>> >
>>
>> Hi, Al. Call the two piezo nodes A and B. Imagine placing your scope
>> ground lead on node A and the tip on node B. What would the scope
>> "see?" That's what the piezo sees. From the microcontroller point of
>> view, A:B is either 0:+3 or +3:0. But from the scope perspective
>> (piezo, too), where only one fixed reference is available (A, in this
>> case), A:B instead looks like 0:+3 or 0:-3. A (the first node listed)
>> is always 'seen' as zero, by definition. In other words, the scope
>> will show a nice square wave centered on zero volts and going from +3
>> to -3 and back again.
>>
>> Jon
>>
> ------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Driving a piezo transducer with MSP430F1491 - tintronic - Aug 28 22:06:32 2009
Oh the good old PIC16s (and PIC12s). They started me on microcontrollers. Robust yet I
managed to fry a few. A pain to debug, full of LEDs untill I started using alfanumeric
2x16 LCD.
But as I remember they were capable of sourcing and sinking 25mA/pin, 160mA/port. The
MSP430F1491 is specified at a much lower 6mA/pin, 24mA/port for dorp of less than 0.6V.
Worst case scenario, at 6mA and Vcc=2.5V (original post) you could feed the piezo from the
MSP with 2x(2.5-0.6)=3.8Vpp.
Regards.
Michael K.
--- In m...@yahoogroups.com,
wrote:
>
> Goodie..
> Nevertheless, I'm glad ya'all up to speed now on the concept of getting 6
> Vpp on the piezo from a 3 Vcc supplied
> MCU :-)
> Still, I don't see the problem with loading the MCU. The piezo is purely
> electrostatic. At a couple of kHz the load is next to nix.
> I once used this in a commercial product with ultra sonically welded piezos
> (with a small PIC).
> Client sold over 250K pcs, never once had a problem with MCU or piezo...
>
> B rgds
> Kris
>
> On Sat, 29 Aug 2009 00:10:36 -0000, "old_cow_yellow"
> wrote:
> > United States Defense Advanced Research Projects Agency has an Energy
> > Harvesting Project, which includes piezoelectric generators embedded in
> > soldiers' boots.
> >
> > They could have generated far more energy by starting a discussion of
> Piezo
> > Transducers in this group.
> >
> > --- In m...@yahoogroups.com, Jon Kirwan wrote:
> >>
> >> On Sat, 29 Aug 2009 04:58:57 +0930, you wrote:
> >>
> >> >wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL
> b
> >> >
> >> >GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
> >> >
> >>
> >> Hi, Al. Call the two piezo nodes A and B. Imagine placing your scope
> >> ground lead on node A and the tip on node B. What would the scope
> >> "see?" That's what the piezo sees. From the microcontroller point of
> >> view, A:B is either 0:+3 or +3:0. But from the scope perspective
> >> (piezo, too), where only one fixed reference is available (A, in this
> >> case), A:B instead looks like 0:+3 or 0:-3. A (the first node listed)
> >> is always 'seen' as zero, by definition. In other words, the scope
> >> will show a nice square wave centered on zero volts and going from +3
> >> to -3 and back again.
> >>
> >> Jon
> >>
> >
> >
> >
> >
> > ------------------------------------
> >
> >
> >
> >

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - OneStone - Aug 28 22:11:05 2009
Dan what I am saying is that at the time I tried this I physically
observed the pins across the piezo to see what was happening to the
micro, and there was nary a 6V signal in sight, just a strange noisy
looking waveform. Dc motors are a large inductance, piezos are a
smallish capacitance. If I had a scope that worked I'd try it again.
Al
Dan Bloomquist wrote:
> OneStone wrote:
>> wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL b
>> GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
>> never A 6V DIFFErENCE. whoops, gumby fingers strike again, its late, and
>> the CNS is shot. If, how ever he had a 3 terminal device with 0V at the
>> centre and switched 3V from end to end then yes maybe. But in this case
>> no. Go scope it. There is nothing in the circuit to produce enough to
>> give you a voltage doubling effect. If there were then these would be
>> out there already and we wouldn't need the 7660 anymore.
>>
>
> Hi Al,
> The light will come on. The 7660 is about creating a negative supply
> where needed. Driving the piezo is about the effective peak to peak, AC,
> entirely different. If you move one pin from +3 to 0 while moving the
> other pin from 0 to +3 it creates a 6 volt swing on the pins. This kind
> of thing is commonly done to reverse DC motors with a single supply.
>
> As far as driving the piezo directly with the MSP, that's something else.
>
>
Best, Dan.
> ------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - OneStone - Aug 28 22:15:15 2009
Ah but PICs can drive 25mA on a pin, unlike the wimpy MSP.
Al
m...@virginbroadband.com.au wrote:
> Goodie..
> Nevertheless, I'm glad ya'all up to speed now on the concept of getting 6
> Vpp on the piezo from a 3 Vcc supplied
> MCU :-)
> Still, I don't see the problem with loading the MCU. The piezo is purely
> electrostatic. At a couple of kHz the load is next to nix.
> I once used this in a commercial product with ultra sonically welded piezos
> (with a small PIC).
> Client sold over 250K pcs, never once had a problem with MCU or piezo...
>
> B rgds
> Kris
>
> On Sat, 29 Aug 2009 00:10:36 -0000, "old_cow_yellow"
>
wrote:
>> United States Defense Advanced Research Projects Agency has an Energy
>> Harvesting Project, which includes piezoelectric generators embedded in
>> soldiers' boots.
>>
>> They could have generated far more energy by starting a discussion of
> Piezo
>> Transducers in this group.
>>
>> --- In m...@yahoogroups.com, Jon Kirwan wrote:
>>> On Sat, 29 Aug 2009 04:58:57 +0930, you wrote:
>>>
>>>> wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL
> b
>>>> GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
>>>>
>>> Hi, Al. Call the two piezo nodes A and B. Imagine placing your scope
>>> ground lead on node A and the tip on node B. What would the scope
>>> "see?" That's what the piezo sees. From the microcontroller point of
>>> view, A:B is either 0:+3 or +3:0. But from the scope perspective
>>> (piezo, too), where only one fixed reference is available (A, in this
>>> case), A:B instead looks like 0:+3 or 0:-3. A (the first node listed)
>>> is always 'seen' as zero, by definition. In other words, the scope
>>> will show a nice square wave centered on zero volts and going from +3
>>> to -3 and back again.
>>>
>>> Jon
>>> ------------------------------------
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - Hugh Molesworth - Aug 28 22:15:41 2009
Ah, but just where is the piezo located? If it happens to be on the
case and attached by wires then ESD issues could become a concern.
And we all know the PIC ports are indestructible (about the best
thing I can say about the PIC ... :-) Nice to know about your
successful project though; did they communicate with each other or
just make a noise?
Hugh
At 06:01 PM 8/28/2009, you wrote:
>Goodie..
>Nevertheless, I'm glad ya'all up to speed now on the concept of getting 6
>Vpp on the piezo from a 3 Vcc supplied
>MCU :-)
>Still, I don't see the problem with loading the MCU. The piezo is purely
>electrostatic. At a couple of kHz the load is next to nix.
>I once used this in a commercial product with ultra sonically welded piezos
>(with a small PIC).
>Client sold over 250K pcs, never once had a problem with MCU or piezo...
>
>B rgds
>Kris
>
>On Sat, 29 Aug 2009 00:10:36 -0000, "old_cow_yellow"
>
wrote:
> > United States Defense Advanced Research Projects Agency has an Energy
> > Harvesting Project, which includes piezoelectric generators embedded in
> > soldiers' boots.
> >
> > They could have generated far more energy by starting a discussion of
>Piezo
> > Transducers in this group.
> >
> > --- In m...@yahoogroups.com, Jon Kirwan wrote:
> >>
> >> On Sat, 29 Aug 2009 04:58:57 +0930, you wrote:
> >>
> >> >wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v. TERMINAL
>b
> >> >
> >> >GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN TIME.
> >> >
> >>
> >> Hi, Al. Call the two piezo nodes A and B. Imagine placing your scope
> >> ground lead on node A and the tip on node B. What would the scope
> >> "see?" That's what the piezo sees. From the microcontroller point of
> >> view, A:B is either 0:+3 or +3:0. But from the scope perspective
> >> (piezo, too), where only one fixed reference is available (A, in this
> >> case), A:B instead looks like 0:+3 or 0:-3. A (the first node listed)
> >> is always 'seen' as zero, by definition. In other words, the scope
> >> will show a nice square wave centered on zero volts and going from +3
> >> to -3 and back again.
> >>
> >> Jon
> >>
> >
> >
> >
> >
> > ------------------------------------
> >
> >
> >
> >
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - Augusto Einsfeldt - Aug 28 22:49:14 2009
Just as a reply to some OP who thought he made 6V into the piezo:
This 6V is just a relative measurement. The reference has changed and the osciloscope - a
voltage X
time recorder - just show this relative measurement. It is like measure a 1.5V battery
with a
voltimeter swaping the probes between two measurements.
Of course, it is possible to use this to build a voltage doubler. Then the electrons can
be trapped
in a capacitor and stored there using a diode. Then in the next time moment, when the pins
are
logically reversed, the reference will be the same but the circuit will have twice the
charge
available to pump the voltage...
-Augusto
On Sex 28/08/09 23:10 , OneStone o...@bigpond.net.au sent:
> Dan what I am saying is that at the time I tried this I physically
> observed the pins across the piezo to see what was happening to the
> micro, and there was nary a 6V signal in sight, just a strange noisy
>
> looking waveform. Dc motors are a large inductance, piezos are a
> smallish capacitance. If I had a scope that worked I'd try it again.
> Al
> Dan Bloomquist wrote:
> > OneStone wrote:
> >> wHERE DOES THE -3v COME FROM? TERMINAL a GOES FROM +3v TO 0v.
> TERMINAL b
> >> GOES FROM 0v TO +3v. tHAT IS 3v ACROSS THE PIEZO AT ANY GIVEN
> TIME.
> >> never A 6V DIFFErENCE. whoops, gumby fingers strike again, its
> late, and
> >> the CNS is shot. If, how ever he had a 3 terminal device with 0V
> at the
> >> centre and switched 3V from end to end then yes maybe. But in
> this case
> >> no. Go scope it. There is nothing in the circuit to produce
> enough to
> >> give you a voltage doubling effect. If there were then these
> would be
> >> out there already and we wouldn't need the 7660 anymore.
> >>
> >
> > Hi Al,
> > The light will come on. The 7660 is about creating a negative
> supply
> > where needed. Driving the piezo is about the effective peak to
> peak, AC,
> > entirely different. If you move one pin from +3 to 0 while
> moving the
> > other pin from 0 to +3 it creates a 6 volt swing on the pins.
> This kind
> > of thing is commonly done to reverse DC motors with a single
> supply.
> >
> > As far as driving the piezo directly with the MSP, that's
> something else.
> >
> >
> >
> > Best, Dan.
> >
> >
> >
> >
> > ------------------------------------
> >
> >
> >
> >
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Driving a piezo transducer with MSP430F1491 - harinnair - Aug 29 0:25:47 2009
OK, I understand this in terms of the mechanical action - one polarity pushes the wafer in
one direction, reversing the polarity pushes the wafer in the opposite direction. That
doubles the volume of air pushed per cycle, which increases the sound pressure.
I guess you have to remember to bring both port pins back to the same voltage after
generating the tone (I found that piezos do not like a
DC voltage across them for any length of time - degrades the material).
BTW, (flame shield on) I have also used a MAX3226 to get the datasheet spec'ed 10Vp-p on a
piezo transducer from a 3V supply - it works perfectly, 0-3V swing on TTL input produces a
-5V to 5V swing on the RS232 output! I powered the MAX3226 from a separate i/o pin to
ensure
0VDC across the piezo when the audio was off. No problem with current sourcing, it was a
PIC mcu. (flame shield off)
--- In m...@yahoogroups.com,
wrote:
>
> Hi,
>
> A piezo should be OK direct on the I/O pins, I thought.
> If you can connect direct to I/O, the simplest way to get more output is to
> connect BOTH sides of the
> piezo to 2 I/O lines. Turn I/O #1 on and I/O # 2 off. Then reverse the
> on/off, #2 on and #1 off.
> If you're outputting 3 V on your 2 I/Os, your piezo is driven with 6 Vpp..
> simple !
>
> HTH
> Kris
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Driving a piezo transducer with MSP430F1491 - old_cow_yellow - Aug 29 0:39:18 2009
You are a cool guy!
--- In m...@yahoogroups.com, "harinnair"
wrote:
>
> OK, I understand this in terms of the mechanical action - one polarity pushes the wafer
in one direction, reversing the polarity pushes the wafer in the opposite direction. That
doubles the volume of air pushed per cycle, which increases the sound pressure.
>
> I guess you have to remember to bring both port pins back to the same voltage after
generating the tone (I found that piezos do not like a
> DC voltage across them for any length of time - degrades the material).
>
> BTW, (flame shield on) I have also used a MAX3226 to get the datasheet spec'ed 10Vp-p on
a piezo transducer from a 3V supply - it works perfectly, 0-3V swing on TTL input produces
a -5V to 5V swing on the RS232 output! I powered the MAX3226 from a separate i/o pin to
ensure
> 0VDC across the piezo when the audio was off. No problem with current sourcing, it was a
PIC mcu. (flame shield off)
>
> --- In m...@yahoogroups.com, wrote:
> >
> > Hi,
> >
> > A piezo should be OK direct on the I/O pins, I thought.
> > If you can connect direct to I/O, the simplest way to get more output is to
> > connect BOTH sides of the
> > piezo to 2 I/O lines. Turn I/O #1 on and I/O # 2 off. Then reverse the
> > on/off, #2 on and #1 off.
> > If you're outputting 3 V on your 2 I/Os, your piezo is driven with 6 Vpp..
> > simple !
> >
> > HTH
> > Kris
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Driving a piezo transducer with MSP430F1491 - harinnair - Aug 29 2:20:36 2009
Confirming that this works very well, using TimerA PWM 50% duty cycle with piezo outputs
on P1.2 and P1.3. I use mspgcc, code extracts follow :
...
P1SEL = 0x0C; // P1.2 = TA1, P1.3 = TA2
P1DIR = 0x0C; // P1.2, P1.3 are outputs
CCTL1 = OUTMOD_7; // pwm reset/set mode
CCTL2 = OUTMOD_3; // pwm set/reset mode (CCTL1 inverted polarity)
... generate tone
TACTL = TASSEL_2 + MC_0; // SMClk, stop timer A
CCR0 = (u16)(FOSC_HZ/nFreqHz);
CCR1 = (CCR0 >> 1); // square wave
CCR2 = CCR1;
TACTL = TASSEL_2 + MC_1; // start timer A in up mode
...
Again, thanks to everyone for their input ...
--- In m...@yahoogroups.com,
wrote:
>
> Hi,
>
> A piezo should be OK direct on the I/O pins, I thought.
> If you can connect direct to I/O, the simplest way to get more output is to
> connect BOTH sides of the
> piezo to 2 I/O lines. Turn I/O #1 on and I/O # 2 off. Then reverse the
> on/off, #2 on and #1 off.
> If you're outputting 3 V on your 2 I/Os, your piezo is driven with 6 Vpp..
> simple !
>
> HTH
> Kris
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Re: Driving a piezo transducer with MSP430F1491 - Dan Bloomquist - Aug 29 3:46:54 2009
OneStone wrote:
> Dan what I am saying is that at the time I tried this I physically
> observed the pins across the piezo to see what was happening to the
> micro, and there was nary a 6V signal in sight, just a strange noisy
> looking waveform. Dc motors are a large inductance, piezos are a
> smallish capacitance. If I had a scope that worked I'd try it again.
>
> Al
>
Hi Al,
I'm not sure what you saw, I've never been there. But I must say if I
get the chance...
From what I see on specs, the piezo is some 30kpf. dv/dt for the output
of the MSP looks to be well achievable at 6vp-p at some 4khz. It is late
and I have not double checked and run it through. But 60-70db should be
doable. What amazes me is that they get some 90db with 25ma @ 5volts!
Or, so I read...
Must say, this is an interesting thread, and if I ever do a piezo...
Best, Dan.
------------------------------------
______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.
(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Re: Driving a piezo transducer with MSP430F1491 - OneStone - Aug 29 4:09:19 2009
Dan it depends I have come across a range of different piezo sounders
with a wide range of properties, and investigated a few several years
ago but was never happy with the quality of the sound so I tend to avoid
them, not a nice sound, and not as cheap as a nice little speaker. Much
easier to use a nice little speaker if you want sound and far gentler.
After the first attempts with the piezo I didn't like the strangled cat
noises and since then on the few things I've built that have needed
audio output I've used either a DAC -> LM386 arrangement or PWM ->
filter ->LM386 arrangement, occasionally adding a digital pot. I am
currently using piezos for other, far more interesting, things, but
that's another story.
Actually I'd probably have to remove the piezo sounder from a multimeter
to try it again anyway, as I don't have any laying around.
Al
Dan Bloomquist wrote:
> OneStone wrote:
>> Dan what I am saying is that at the time I tried this I physically
>> observed the pins across the piezo to see what was happening to the
>> micro, and there was nary a 6V signal in sight, just a strange noisy
>> looking waveform. Dc motors are a large inductance, piezos are a
>> smallish capacitance. If I had a scope that worked I'd try it again.
>>
>> Al
>>
>
> Hi Al,
> I'm not sure what you saw, I've never been there. But I must say if I
> get the chance...
>
> From what I see on specs, the piezo is some 30kpf. dv/dt for the output
> of the MSP looks to be well achievable at 6vp-p at some 4khz. It is late
> and I have not double checked and run it through. But 60-70db should be
> doable. What amazes me is that they get some 90db with 25ma @ 5volts!
> Or, so I read...
>
> Must say, this is an interesting thread, and if I ever do a piezo...
>
> Best, Dan.
>
> ------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )
Re: Driving a piezo transducer with MSP430F1491 - old_cow_yellow - Aug 29 12:03:01 2009
A good "sounding board" (where and how you mount the transducer) can make a big difference
too.
--- In m...@yahoogroups.com, "harinnair"
wrote:
>
> Confirming that this works very well, using TimerA PWM 50% duty cycle with piezo outputs
on P1.2 and P1.3. I use mspgcc, code extracts follow :
>
> ...
> P1SEL = 0x0C; // P1.2 = TA1, P1.3 = TA2
> P1DIR = 0x0C; // P1.2, P1.3 are outputs
> CCTL1 = OUTMOD_7; // pwm reset/set mode
> CCTL2 = OUTMOD_3; // pwm set/reset mode (CCTL1 inverted polarity)
>
> ... generate tone
> TACTL = TASSEL_2 + MC_0; // SMClk, stop timer A
> CCR0 = (u16)(FOSC_HZ/nFreqHz);
> CCR1 = (CCR0 >> 1); // square wave
> CCR2 = CCR1;
> TACTL = TASSEL_2 + MC_1; // start timer A in up mode
> ...
>
> Again, thanks to everyone for their input ...
> --- In m...@yahoogroups.com, wrote:
> >
> > Hi,
> >
> > A piezo should be OK direct on the I/O pins, I thought.
> > If you can connect direct to I/O, the simplest way to get more output is to
> > connect BOTH sides of the
> > piezo to 2 I/O lines. Turn I/O #1 on and I/O # 2 off. Then reverse the
> > on/off, #2 on and #1 off.
> > If you're outputting 3 V on your 2 I/Os, your piezo is driven with 6 Vpp..
> > simple !
> >
> > HTH
> > Kris
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )Re: Driving a piezo transducer with MSP430F1491 - tintronic - Aug 31 11:16:16 2009
> I guess you have to remember to bring both port pins back to the
> same voltage after generating the tone (I found that piezos do not
> like a DC voltage across them for any length of time - degrades the
> material).
Yes, like other speaker types, they don't like DC voltages, as it causes a constant dc
currert to flow thus at the very least it causes the speaker to heat without producing
sound. This is anohter reason of using polarity reversal instead of Vcc and 0V.
Vcc / Zero => VAC=Vcc[peak to peak] VDC=Vcc/2
Vcc reversal => VAC=2*Vcc[peak to peak] VDC=0V
> BTW, (flame shield on) I have also used a MAX3226 to get the
> datasheet spec'ed 10Vp-p on a piezo transducer from a 3V supply -
> it works perfectly, 0-3V swing on TTL input produces a -5V to 5V
> swing on the RS232 output! I powered the MAX3226 from a separate
> i/o pin to ensure 0VDC across the piezo when the audio was off. No
> problem with current sourcing, it was a PIC mcu. (flame shield off)
This is a smart but not uncommon trick. I've seen ultrasonic transmitters powered by a
MAX3232 (or ST3232) output (and a small PIC). It works nice and instead of driving the
piezo with GND and one RS-232 voltage, you can use both MAX3232 outputs to invert polarity
to the piezo, achieving a theoric voltage swing of 20Vpp. In that case you don't need to
turn off the power to the MAX (you can leave both ends of the piezo at +5V, effectively
having 0V between them). However, in the ultrasonic circuit, power was indeed turned off
on the receiving cycle for the MAX not to induce noise on the Vcc rail and mess up the
ultrasonic receiving circuitry.
Regards,
Michael K.
--- In m...@yahoogroups.com, "harinnair"
wrote:
>
> OK, I understand this in terms of the mechanical action - one polarity pushes the wafer
in one direction, reversing the polarity pushes the wafer in the opposite direction. That
doubles the volume of air pushed per cycle, which increases the sound pressure.
>
> I guess you have to remember to bring both port pins back to the same voltage after
generating the tone (I found that piezos do not like a
> DC voltage across them for any length of time - degrades the material).
>
> BTW, (flame shield on) I have also used a MAX3226 to get the datasheet spec'ed 10Vp-p on
a piezo transducer from a 3V supply - it works perfectly, 0-3V swing on TTL input produces
a -5V to 5V swing on the RS232 output! I powered the MAX3226 from a separate i/o pin to
ensure
> 0VDC across the piezo when the audio was off. No problem with current sourcing, it was a
PIC mcu. (flame shield off)
>
> --- In m...@yahoogroups.com, wrote:
> >
> > Hi,
> >
> > A piezo should be OK direct on the I/O pins, I thought.
> > If you can connect direct to I/O, the simplest way to get more output is to
> > connect BOTH sides of the
> > piezo to 2 I/O lines. Turn I/O #1 on and I/O # 2 off. Then reverse the
> > on/off, #2 on and #1 off.
> > If you're outputting 3 V on your 2 I/Os, your piezo is driven with 6 Vpp..
> > simple !
> >
> > HTH
> > Kris
>
------------------------------------

(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )