| Electronics > Projects, Designs, and Technical Stuff |
| piezoelectric as digital input for arduino |
| (1/2) > >> |
| hussamaldean:
Hi all, I have an awesome project which require to use piezoelectric and I want to use it as digital input rather than analog what type of circuit requires to achieve such thing ? schmitt trigger, op-amp or comparator ? thanks in advance |
| DaJMasta:
What output are you looking for from the piezo sensor? The basics would be an amplifier, you can just take the tiny analog output and amplify it a couple times until it's big enough to trigger a digital input, but you may want to then have a comparator with a set threshold to clean up the reading, or something else depending on what you're trying to use it for. |
| Ian.M:
Take a look at the JFET buffer circuits I suggested for Piezo sensing applications back in 2010 over on the Microchip forums: https://www.microchip.com/forums/m480518.aspx |
| hussamaldean:
--- Quote from: DaJMasta on December 06, 2018, 07:30:08 pm ---What output are you looking for from the piezo sensor? The basics would be an amplifier, you can just take the tiny analog output and amplify it a couple times until it's big enough to trigger a digital input, but you may want to then have a comparator with a set threshold to clean up the reading, or something else depending on what you're trying to use it for. --- End quote --- I want to use it to detect a door knock while maintaining the performance of the interrupt (the requirement requires to use interrupt ) |
| JuanGg:
--- Quote ---I want to use it to detect a door knock while maintaining the performance of the interrupt (the requirement requires to use interrupt ) --- End quote --- You may want to add some filtering before the comparator, so the interrupt doesn't get trigered several times on the same knock, or you could add some software debouncing. Also, it is a good idea to add a rather high value bleeder resistor to discharge the capacitance of the piezo, and some protection diodes as this things can generate high voltages. |
| Navigation |
| Message Index |
| Next page |