0
\$\begingroup\$

I'm using Adafruit's Huzzah ESP8266 breakout board (overview & pinouts), and I'd like to take input from a Radioshack piezo on the analog input pin without frying it. (Piezo datasheet, for reference.)

I've found a few people with a similar setup using an Arduino, and it seems like at a minimum I'd need something like a zener diode and 1MΩ resistor, like in the basic circuit from this PDF (page 12). The analog pin on the Huzzah has a 1V max voltage, so my sense is that I've got to make some adjustments to divide down the voltage further, and maybe include a capacitor? Super new to EE, so any advice on including & calculating the proper values for components is appreciated.

The end goal is to take input from the piezo and use it to set hue + brightness of an RGB LED, similar to the Adafruit LED ampli-tie project, but obviously with just a single LED. I can provide more details on that if it's relevant to getting up and running with the piezo input.

\$\endgroup\$
  • \$\begingroup\$ Be careful to distinguish between a piezo buzzer (which makes a continuous noise as long as you apply power to it) and a piezo sensor or element, which it the bare piezo element - it will make a "click" when you apply and remove DC power. The buzzer won't work as a sensor. \$\endgroup\$ – Peter Bennett Sep 1 '19 at 23:33
0
\$\begingroup\$

The 1MOhms resistor will "load" the piezo element and reducing the level of the induced voltage during normal usage. However, a sudden force applied to the element may cause a voltage spike which would kill the analog input, so you should add a series resistor of a few hundred ohms between the analog input and the piezo element.

Edit: the PDF you linked uses a Zener diode to clip the voltage, however the value it chose is a 5V Zener which is for Arduino analog inputs. You should choose a Zener with around a 1.2V breakdown voltage.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.