Voltage limitting

I want to use piezo transducers on digital inputs.
I only need On/Off values, and am aware of the need to protect the digital inputs of the Arduino.

Am I right in thinking that in the circuit below:

  1. the zener diode should protect the digital input from excess voltages (for 1N4730A, Vz =3.9v)
  2. The RC should “debounce” the piezo in the order of 10ms.
  3. I’ve seen suggestion that it might be worth using a schottky diode in paralel with the zener, but I’m not sure whether this is necessary or benficial.

FYI There aren’t enough analog pins available, so Knock doesn’t solve my problem, and I only want an on/off value from the piezo, and despite lots of time searching and reading threads about drum sensors (which are nothing like my project) I still can’t dins an answer.

It’s probably not necessary…

There are small (low current) “protection diodes” inside the chip wired to Vcc and ground. They “short out” the inputs to “hold-down” the voltage if you go over Vcc or negative (far enough to turn-on the diode).

The piezo transducer probably doesn’t have enough current capability to burn-up the diodes so the voltage should be limited and everything should be safe. A ~10K resistor in series with the input would also help to limit the current.

BTW - You need a high-value resistor (usually 1M or 10M with a piezo) to “pull down” the Arduino input and hold it at zero when there is no signal. Or, enabling the internal pull-up resistor might work but I think the resistance is too low and it will probably kill the signal from the piezo.

Many ICs have diode clamps (does not short) to Vcc and to Gnd (to limit above Vcc and below 0V excursions by the Vf of the protection diode). The protection diodes are limited to a few mA of current. If the current is exceeded, they could fail - if they fail open, the internal IC circuit is exposed to the input voltage. If they fail shorted, Vcc or ground is "connected" input pin. When Vin exceeds 5V(VCC) + Vf of the internal protection diode (0.5V to 0.7V), the diode conducts and clamps the voltage to 5V + Vf. The Vf of this diode is normally on the data sheet where they state the input is VCC +.6 or something close to that. Same thing on the negative excursion. At that point current rises rapidly and is limited by the external resistance. I use 10mA as a general rule although I know most are rated for more. If proper care is taken these diodes can be used as part of your input protection but be sure to limit the current available to them to no more than about 50% of their rating.

I'm sarting to get out of my depth, but have I got this right?

It sounds as though it's worth using a schottky as well as the zener to deal with the possibility of the input voltage going -ve. Perhaps a 1N5817 (Vf = 0.32v)?

And I shold increase R1 form 1kΩ to 1MΩ (and decrease C1 to 0.1μF)

It's not necessary for the resistor to have such a low value, 1k. Also I don't see any load resistor to ground. That will leave the input pin floating, so it would be subject to random fluctuations. Better would be a 1M resistor between the input and ground, and approximately 10k-50k between the input and the piezo.

You can use a dual BAT51 Schottky to clamp both positive and negative excursions, in one package.

Zeners aren't regarded as very good for input protection - for that you want a TVS or "Transorb". The TVS also have high capacitance, so it saves you one component sometimes. But for this circuit, I don't think you need either a TVS or a Zener, because input current is limited by the resistor and will be clamped at the input by either the intrinsic diodes, or preferably a dual Schottky.

fenghuang: the zener diode should protect the digital input from excess voltages (for 1N4730A, Vz =3.9v)

You have got that wrong.

Max pin input voltage is [u]VCC + 0.3volt/u.

Let's assume the processor is OFF (VCC = 0volt).

That makes any zener useless, unless it's a 0.3volt zener.

Schottky clamping diodes (to VCC and GND) are the ONLY way to protect a pin.

What kind of piezo transducer, and how is it used. The built-in ESD protection of the pin is likely good enough for a small transducer. Knock sensor sketches don't use protection.

Do add a bleed resistor across the piezo. The pin will be 'floating' without it, at least for DC. Leo..

Thanks for all the input.
My head hurts from all the other reading I’ve done, but this is what I’m hoping happens in the new circuit:

R1 limits the current from the piezo. I’ve read piezos can generate upto 100v, although in the circumstance (the piezo won’t be compressed directly) I don’t think this will occur. Choosing R1=100k means that for 100v the maximum transient current from the piezo will be 10mA (which I think is what gilshultz was suggesting above).

I’ve removed the capacitor across the piezo. It was there to act as low pass filter (in conjunction with R1) but on reflection I don’t think there is any point.

R2 will both pull the input low and and act as a bleed resistor for the piezo. So if the the piezo gets knocked when the circuit isn’t powered, any current is lost through R2. But being a large resistance it won’t have much other effect on the circuit.

Being a Zener diode, D1 (1N4730A) acts to protect the arduino’s digital input from voltages above Vz = 3.9v and below -Vf = -1.2v
But the digital input needs protecting from negative voltages, so the Schottky diode limits that to Vf of the Zener.

If I have any of this right, I’m still struggling to choose a Schottky diode. I’ve read that most have a Vf of around 0.3v, but the datasheets I’ve looked at either don’t list Vf or it’s around 0.7v which I don’t think is better than a lot of standard diodes.

fenghuang: Being a Zener diode, D1 (1N4730A) acts to protect the arduino's digital input from voltages above Vz = 3.9v and below -Vf = -1.2v

As said, an input needs protecting to -0.3volt and +0.3volt (assuming the Arduino can be un-powered). So forget about a zener diode. Tits on a bull.

You should replace the zener diode for a Schottky diode, connected between pin and VCC (5volt). Assuming you need protection.

fenghuang: R1 limits the current from the piezo. I've read piezos can generate upto 100v

A hair comb can generate 100000volt, and you're still alive. Current matters too. I asked you which piezo and what are you doing with it for a reason.

The 10k resistor should go between pin and the rest of the circuit. It's doing nothing where it is now. The 1Meg resistor should go directly across the piezo. Leo..

fenghuang: I've removed the capacitor across the piezo. It was there to act as low pass filter (in conjunction with R1) but on reflection I don't think there is any point.

Maybe there was a point. With the capacitor that is. Maybe handy to check out the behaviour of that particular piezo system and consider the expected voltage (or something) profile (eg. actual voltage values versus time).

Considerations like --- is this device meant to output some relatively constant DC type voltage for a fair amount of time? Or the output is going to be noisy and erratic - with relatively large changes in voltage?

Basically - what does the voltage profile look like over a fair amount of time - including actual output voltages and voltage ranges?

Hi, What is the application? Is there a specific reason you are using piezo pickups?

Can you please post a picture of your project so we can see your component layout?

Thanks.. Tom... :)