![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| 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. | |
| |
| | (permalink) |
| 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. | |
| |
| | (permalink) |
| Ttristate it?
__________________ Agustín Tomás In theory, there is no difference between theory and practice. In practice, however, there is. | |
| |
| | (permalink) |
| I was thinking that you should not tristate the end of the crystals that is not being meaured. | |
| |
| | (permalink) |
| 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? | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| 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 |