2
\$\begingroup\$

I am trying to design a fast, simple circuit that will send a short (~2ms) logic-level pulse (either high or low, don't care) to a micro controller, every time a Piezo Transducer detects a knock. The circuit needs to have as few components (especially as few ICs) as possible, because I need to build a lot of them. They should all be through-hole components, and all ICs operating off a single positive rail. I don't want to use a micro controller for the knock detection.

The knocks often come in very rapid succession (up to 20 per second), and vary widely in magnitude, giving anywhere from 100mv to 4 volt peaks.

The piezo gives a diminishing AC sine wave, when knocked, which is offset positively, staying above ground 90% of the time, but does stray slightly below zero sometimes. The piezo signal tends to ring, so the decay is sometimes upward of 200ms for the bigger knocks.

After some research, it seems like I need :

piezo -> Op Amp buffer -> envelope detector -> slope detector -> rising edge detector -> output.

Can anyone think of a simpler way to achieve these same results?

If this is indeed the best way to proceed, what is the simplest circuit design (ie. with the lowest parts count) that could achieve these results?

edit: here are some screen caps of typical piezo knocks in an oscilloscope, these examples are piezo -> 10 kΩ load, there would be a shorter or longer decay if the load was higher or lower.

enter image description here

\$\endgroup\$
15
  • 2
    \$\begingroup\$ Do you have a scope plot of the signal, or a URL to a similar signal plot? Hard to visualize for someone who's never dealt with a engine knock sensor. \$\endgroup\$ – Vince Patron Jan 31 '17 at 4:45
  • \$\begingroup\$ "piezo gives a diminishing AC sine wave" - at what frequency? \$\endgroup\$ – Bruce Abbott Jan 31 '17 at 5:43
  • 1
    \$\begingroup\$ so, yes, I'd say this is possible in discrete components easily, but it will be way more complicated than with a single component being an MCU. Why are you ruling out microcontrollers? \$\endgroup\$ – Marcus Müller Jan 31 '17 at 10:46
  • \$\begingroup\$ According to the plots, I think an amplifier with a input theresold of 500 mV triggering a 555 monostable about 8 mS will provide a clean pulse. \$\endgroup\$ – Ayhan Jan 31 '17 at 11:54
  • \$\begingroup\$ ... or you could just not use a 555 to generate a pulse and instead discharge a capacitor through a resistor and a transistor base. works just as well \$\endgroup\$ – Marcus Müller Jan 31 '17 at 15:11
3
\$\begingroup\$

So, this sounds like a job that multi-Opamp packages were invented for.

Take any modern opamp (please, stay away from 1970's opamps...). I've clicked together a TI.com search that gives you candidates. Since you seem to be planning on ordering a lot of them if your design works out, don't hesitate to order free samples from TI.

So, I'm not going into detail on the individual OpAmp circuits, they're easy to google everywhere, but to map your signal flow to OpAmp configurations:

  • Op Amp buffer
  • envelope detector
  • slope detector
  • rising edge detector

Google the terms in italics

Opamp Buffer

simply a voltage follower. Might be superfluous, if you properly design the next stage. You might want to AC couple (capacitor in series with) the Piezo into a high-ohmic Voltage divider, so to bring your signal around a virtual ground (most often used: Vcc/2).

Envelope Detector

An opamp in what is commonly called a precision rectifier, followed by a low-pass filter. Go for something that let's you easily define a ground level without loading that ground, so that, again, things are centered around virtual ground (Vcc/2).

Slope Detector

High-Pass filter. You can implement that as active filter (e.g., Sallen Key), but a simple RC high pass might totally do here.

You'll notice that this is a high-pass after a low pass. Simply substitute both by a band-pass if easier.

Rising Edge Detector

Rising Edge in Envelope -> positive voltage in derivate. The Slope Detector should act roughly like the derivate of your envelope signal, so just make a sign decision against a virtual ground voltage. That'd be a comparator.

You might want to not only compare to virtual ground, but also add some hysteresis. Go for a Schmitt trigger.

Seriously, though.

That's one quad opamp, two diodes, three or four capacitors, and something between 7 and 10 resistors.

You could have the same functionality with a single capacitor + two resistors for AC coupling the Piezo (and low-passing it "by accident"), which has plenty signal amplitude (wouldn't have thought it'd be that much as in your plots), directly into the ADC of a cheap microcontroller (I don't personally like the ATTinies overly much, but this might be a good application for one).

You could also just see how far you can get by simply using a cap to couple the Piezo signal into the resistor-biased base of a NPN transistor in common emitter configuration, filter the collector voltage with a passive bandpass and then generate your output pulse with another NPN. That'd probably do, too, but I don't know how resilient you can get that without a lot of tweaking and testing.

In the end, I'm also personally not much of a Through-Hole person. I see the ease in soldering in wired resistors compared to 0603 SMD resistors, certainly, but maybe you'd want, for cost reasons, just use a SMD IC and the discretes in through-hole.

because I need to build a lot of them

if "a lot" is greater than, let's say, 100, consider building a prototype, then convert that to SMD completely, and order the thing being manufactured.

\$\endgroup\$
2
  • \$\begingroup\$ Thank you so much for your detailed thoughts here, and for the link to a list of appropriate parts. I agree that a quad op amp would do a great job, but where I have to make 100's of these on a budget, I am drawn to your passive solution using transistors. When I tried that approach it did seem daunting, trying to tweak all the values. Would you be able to help me in exploring this approach, either by suggesting in more detail what a good starting point would be, or by linking to a schematic? Thanks again! \$\endgroup\$ – Marchingband Feb 1 '17 at 0:41
  • \$\begingroup\$ Piezo manufacturers tend to suggest using an op amp set up as a charge amplifier, as the ideal buffer, rather then a voltage amplifier ... does this concept have much impact on your approach? I admit I don't fully understand the nuances of the reasoning behind this. \$\endgroup\$ – Marchingband Feb 1 '17 at 0:50

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.