SparkFun Forums 

Where electronics enthusiasts find answers.

General project discussion / help
Did you make a robotic coffee pot which implements HTCPCP and decafs unauthorized users? Show it off here!
By alangstein
#183943
I am trying to build a project that will have very low power utilization and be turned on with a knock detector. I was planning on using an attiny85 and a piezo disk sensor and have the attiny wake up once a second and check to see if there is a knock. Because the power output from the piezo is so momentary, however, it is likely to miss a single knock. I was thinking of hooking up the piezo to a capacitor which would then hold the voltage for long enough for the attiny to awaken and check the voltage. Any suggestions for whether this is feasable and suggestions for specific wiring and capacitor size?

thanks
By alangstein
#183958
Thanks.
I am not familiar with a shake switch so I am imagining therefore that a shake switch would connect from the power supply to the interrupt pin and when it is shaken the switch closes taking the interrupt pin high. Am I envisioning a shake switch correctly?
By jremington
#183959
That would work. A shake switch could also ground a pin that is pulled high by a resistor.
By alangstein
#183960
Thanks,
Since the main focus of the project is power saving I would probably not want to use it to pull a pin to ground since that would require keeping the pin energized during sleep state. Since I have to order a shake switch I will try it this weekend with a piezo on the interrupt and see if that works as well.
By jremington
#183962
alangstein wrote:I would probably not want to use it to pull a pin to ground since that would require keeping the pin energized during sleep state.
Not sure what you mean by this. Pins are energized in the sleep or power down state.

Either way works fine to wake the part up from sleep, using either INT0 or a pin change interrupt, and in principle there is no difference in power consumption during sleep. The input pin leakage is specified to be typically less than 50 nA when externally held high or low.