1
\$\begingroup\$

I am trying to design a little game where you throw a baseball at a 3x3 grid of 24x18" polycarbonate panels (1/4" thick), and the game detects which of 9 panels is struck. I'm aware there are many piezo and impact questions on this site, and I've read just about all of them, but I'm hoping someone can provide some insight into the specific challenges I'm having.

My design: Piezo on every panel, connected to a 5V zener protection diode circuit, then to an envelope detector circuit (Diode-> R & C in parallel), then to an ADC (ADS1015), then back to my Raspberry Pi 4. Current circuit

In the circuit above, D1 is a 50V Schottky diode and D2 is a 5.1 V Zener, V1 is my piezo. The 1 MOhm resistor at the end was to simulate my scope impedance. R2 doesn't appear in my real circuit, but if I don't include it, the protection circuit doesn't work at all in LTSpice. enter image description here

This is the output from that circuit. The green trace is something I captured by feeding the piezo directly into a scope, and striking the center of a panel pretty hard. I saved the waveform and feed it into my LTSpice sim. From this simulation, it seems like this circuit should work. As I'll get to shortly, it does not. From my tests, a hit on a panel will produce 30V oscillations that last up to 250s, and neighboring panels will have a small (~1 V), short signal. So the circuit needs to be able to discriminate this. I also could have an impact where it strikes right on the seam of 2 panels, ideally this would take the "stronger" hit and register that impact as the real panel hit. I want to be able to register 2 hits a second, and I want it to register a hit from either an adult or a kid throwing the ball (so a wide range of potential impact strengths). The ADCs are connected to the Pi via I2C, and it takes anywhere from 20 to 50 ms to sample all 9 channels. So using my current method I can only sample once every 50 ms.

Questions

  • Is there a better circuit to accomplish my goals?
    • I might replace the 5V Zener with a bridge rectifier (KBP201G?)? If I did this, do I still need a 1 MOhm resistor in parallel?
    • Is there some way to get rid of the ADC completely and use a comparator (MCP6004?) after the envelope detector? Would this be faster? Can I set up the Pi to just "trigger" whenever the output of the comparator goes high? Presumably I could set the threshold level to 4V or something that will not be triggered by hits to neighboring panels, but this might not work well for hits on seams. (My current plan also may not, I haven't tested that yet). This was suggested in another thread here, where someone was doing something similar, but that person was trying to capture frequency, and I'm more interested in peak/duration. I've found many variations of the comparator circuit, and I don't understand which ones might work for my application or how to pick the actual chip to use as the comparator.
  • Should I replace the 10 Ohm resistor with a ~100 Ohm resistor to limit current into the ADC?
    • Should that resistor be placed after the Schottky diode?
  • Is there a reason this circuit would not work when tested on a breadboard with a scope instead of the ADC? I have tested it many times, and it works right up until I put the capacitor in place, then it just never triggers the scope (set for a rising 160 mV trigger). I can use the circuit below (with no cap) and tap the piezo with my finger, and see a 3-5V pulse come out. I've tested the cap and it holds charge. I've also tried using a 100uF cap, and tried a number of values for R1. This seemed to work a few times, and then has never worked again.
  • Once I get a functional circuit, I'll need to make 9 of it, one for each channel. Is there a place online that will just fabricate this circuit for me, or is my best best to just get a perf board and solder all the components myself? I've seen JCLPCB.com suggested, but its not clear to me if they actually will make a complete board for a reasonable price, or if they will just make me a circuit board and I'd have to solder a bunch of SMTs.
  • Is there somewhere in this circuit where I could insert a potentiometer to adjust the sensitivity of the piezo, in case every hit is producing 5V? I think maybe its R3, but I'm not sure.

enter image description here enter image description here

Lastly, it seems that the protection circuits I have also shorten the duration of the oscillations from the piezo. The green trace below was captured using pizeo > 5V zener circuit > scope, and was a hard hit to the center of the panel, just like the 250 ms long one in the first image. I'm not sure why this is. enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ Way over-thinking. Hold back for a moment. Carefully detail your 3x3 for us. What exactly are you using for your plastic panels (thickness, width and height, anything else that may be useful to know?) What's being thrown at them? I know it's a ball. But what ball size, weight, etc? Is it more like a hacky sack ball or a basketball? Put all your time into how all this will be set up and used, along with why you want "peak" and "duration." Less on piezos for now. The better sensor isn't determined yet, in my opinion. \$\endgroup\$ – jonk Mar 6 at 21:31
  • \$\begingroup\$ A very warm welcome to the site and thank you for a well-written and detailed question. You're not over-thinking it at all. Pet projects aren't to be run as stern formal R'n'D exercises. It's all on paper/PC so it costs nothing and this is a terrific way to learn, stretching your mind and exploring. Great to get in there, attack it to understand the underlying technology and experiment. Then you can put it to your application with some understanding and some enjoyment. Or put it down because you've solved the problem without needing to build anything and learnt a lot on the way. Great to see. \$\endgroup\$ – TonyM Mar 6 at 21:50
  • \$\begingroup\$ @jonk The plastic panels are 1/4" polycarbonate, each one is 24x18". The ball is a baseball. I have foam backing the panels, but I haven't done any measurements since installing the foam. It hasn't made it any quieter, and I suspect it won't change the oscillations on the piezos much either. I don't know that I need peak and duration, but at least one of them seems like a necessary measurement to discriminate a direct hit from a hit on a nearby panel. The other complicating factor is that I want it to be able to pick up a hit from either an adult or a kid throwing the ball. \$\endgroup\$ – Entropy Mar 7 at 3:55
  • \$\begingroup\$ @Entropy Have you considered something as simple as aluminum-backing the foam? If you had two sheets of aluminum; one fixed firmly to a mounting board, with a foam layer with lots of large holes cut in it, with a foam sheet with aluminum on the side towards the mounting board... And then the polycarbonate. You could adjust the thickness of the separating foam and the hole arrangements to get the kind of response you want.. perhaps. Also consider mass-loaded vinyl for sound deadening and some heft and sturdiness, if needed, or as that separating layer with holes. \$\endgroup\$ – jonk Mar 7 at 4:42
  • 1
    \$\begingroup\$ I had not considered that, but I think that would be difficult to tune. The plastic panels are very rigid, so they are unlikely to deform enough to make that contact. I also have the entire physical structure built, so it would take a lot to compel me to abandon the piezo-based design. \$\endgroup\$ – Entropy Mar 8 at 18:58

Your Answer

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

Browse other questions tagged or ask your own question.