Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 28th January 2008, 01:49 AM   (permalink)
Default Piezo element as input and output?

Was kind of playing with a hopefully simple idea in my head earlier today, and was kind of wondering if it's do-able. Kind of need some direction.

I won't to use a piezo speaker to detect sound or vibration, to be read into a microcontroller. Then I want to output an audio signal through the same speaker. Don't know a whole lot about the timers, or ADC. I don't think the piezo will produce a strong enough signal to be seen on an input pin, so figure ADC. I don't need any kind of accuracy, just something above normal background noise.

For the sound output, it would be much louder if I can sort of push-pull the speaker across to I/O pins. So wondering if I can hook the speaker across to pins, and get an input for the ADC?

Planning on using a ATtiny13, it's 8 pin, but only 5 usable I/O pins. So hope to have the other three for other uses.
HarveyH42 is online now  
Old 28th January 2008, 01:59 AM   (permalink)
Default

There is nothing wrong with the idea of using a Piezo element as an output and an input. That is what happens inside crystal ocillators.

If you do run it push/pull, make sure that that when you are reading one end, the other end is not left floating.
Diver300 is offline  
Old 28th January 2008, 02:17 PM   (permalink)
Default

Ttristate it?
__________________
Agustín Tomás
In theory, there is no difference between theory and practice. In practice, however, there is.
atferrari is offline  
Old 28th January 2008, 08:40 PM   (permalink)
Default

I was thinking that you should not tristate the end of the crystals that is not being meaured.
Diver300 is offline  
Old 29th January 2008, 12:22 AM   (permalink)
Default

So when inputing from the piezo speaker, one pin should be set for input in the DDR, the other should be left as output. Should the output pin be set to 1 or 0, when I'm using the ADC input?
HarveyH42 is online now  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
Using Oscilloscopes mechie Electronic Theory 9 29th November 2007 10:49 PM
Output = Input - Problems adamthole Micro Controllers 20 24th April 2007 05:09 AM
uuffff how doess this stupid ting work lol cyprio7 General Electronics Chat 7 9th October 2005 07:56 PM
I am not getting ripple voltage at the output dar2525 General Electronics Chat 3 14th July 2005 03:21 PM
Input and Output Resistance Help andy257 General Electronics Chat 1 21st April 2004 02:35 PM



All times are GMT. The time now is 03:10 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker