I was searching the web on stamp circuits and found the following circuit to interface a piezo sensor. I have interface switches to BS2 , but which command do I used to interface to this circuit?
I'm interested to a answer too since I use the a modified cybot kit which contains two pairs of piezo emitters and receiver...
Good question : [noparse];)[/noparse]
In my case the piezo will be struck (for a drum/percussion) controller. I guest the signal will be the voltage (??) generate by the piezo when hit.·Which command (BS2) do I used to read the voltage generated? Is this circuit (as is) suitable for this application?
Bean is correct, depending on the voltage levels output by the device you may need a Zener Diode, however, if there is an existing application using this, then I assume it's okay to work the way it's listed.· In any event, you should probably be just looking for a 1 on the input, according to the schematic you provided.
IF IN0 = 1 THEN ...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Chris Savage Parallax Tech Support csavage@parallax.com
Thanks a lot for the information. You all answer my question on the BS2 command to used (this is what makes this forum that great)....but as usual it raise another-> How do I know (without damaging the BS2) that the first circuit (the one I originally post) its OK ? (my guest is that I can add the zener diode to the original circuit and if nothing happens it indicate that the voltage is not enough for the BS2 to detect... on the other hand the zener diode will limit the voltage to no more than ~5 volts [noparse][[/noparse]is this statement correct?].
If you look through our old app notes (see the downloads section on www.parallax.com) you'll find a BS1-based project that uses sensors like that -- it should give you some ideas.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Jon Williams Applications Engineer, Parallax
Is the piezo sensor a thin piece of film that has a couple of wires or electrodes coming out at one end? If so, the voltage pulse output will be fast. I was suprised by the 4.7k and 1.5 kohm resistors shown in your schematic. If it is one of the film type sensors, the amount of charge produced by the film is quite small for each event. If that is the case you can connect the film directly to the Stamp pin via the 4.7k ohm resistor, and I would replace the 1.5kohm resistor with a much much higher value like 1 megaohm or 10 megaohm to drain off charge for the next event.
The piezo is one those discs generally used for generating buzzing sounds. it also can be used for generating voltages when hit. What I don't get is that on some sources (web pages) the piezo output is amplified ..but on other they recommend that since it can generate a high voltage it must be attenuated. (???). I guest the circuit I posted (piezocircuit.gif) reduce the signal. In previous prototype circuits I had found very difficult to handle the signal/event generate by the piezo disc. I read the voltage with an ADC ->Stamp and sometimes the voltage reading does not relate to the "hit event" . I will experiement with your recomendation about the 1meg resistor. Thanks.
In another life, for fun I was an "electronics rodie" for a local band/friend that I new.·
As indicated in an earlier post, the pulses generated from a piezo are very quick and can be missed easily.
Here is a circuit that I have used that uses a current mirror to grab and store the signal very quickly.
A quick and dirty "sample and hold" if you will.· The Idea is for the Stamp to monitor the "Discharge" signal
as an INPUT.· When the "Discharge" signal goes HIGH, then the "Piezo hit value"·is ready and can be read
with an ADC off of the "ADC Signal".· Once the "ADC Signal" has been read,·make the "Discharge" signal
an OUTPUT and LOW, to discharge the .047uF capacitor.· Next, make the·"Discharge" signal an INPUT and
wait for the next·"Piezo hit value".
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Comments
Good question : [noparse];)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Thanks
Check out the docs for the Parallax piezo element.
http://www.parallax.com/detail.asp?product_id=605-00004
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
Available now... SX-Video OSD module $59.95 www.sxvm.com
"Save your money. Pay with cash."
·
IF IN0 = 1 THEN ...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I got 1 pair of emitters and 1 of receivers but I've no idea of how to use them wiht the BS2...and since they come from a hacked robot kit : cybot
Thank for your help !
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
++
The piezo is one those discs generally used for generating buzzing sounds. it also can be used for generating voltages when hit. What I don't get is that on some sources (web pages) the piezo output is amplified ..but on other they recommend that since it can generate a high voltage it must be attenuated. (???). I guest the circuit I posted (piezocircuit.gif) reduce the signal. In previous prototype circuits I had found very difficult to handle the signal/event generate by the piezo disc. I read the voltage with an ADC ->Stamp and sometimes the voltage reading does not relate to the "hit event" . I will experiement with your recomendation about the 1meg resistor. Thanks.
In another life, for fun I was an "electronics rodie" for a local band/friend that I new.·
As indicated in an earlier post, the pulses generated from a piezo are very quick and can be missed easily.
Here is a circuit that I have used that uses a current mirror to grab and store the signal very quickly.
A quick and dirty "sample and hold" if you will.· The Idea is for the Stamp to monitor the "Discharge" signal
as an INPUT.· When the "Discharge" signal goes HIGH, then the "Piezo hit value"·is ready and can be read
with an ADC off of the "ADC Signal".· Once the "ADC Signal" has been read,·make the "Discharge" signal
an OUTPUT and LOW, to discharge the .047uF capacitor.· Next, make the·"Discharge" signal an INPUT and
wait for the next·"Piezo hit value".
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.