-1
\$\begingroup\$

I'm trying to make a sound level display, simply to tell the user how loud nearby sounds are. The issue is this data, which I collected in a near silent environment (it's night, and I can't make out any distinct sounds):

521 ... 214 ... 614 ... 79 ... 698 ... 11 ... 636 ... 136 ... 544 ... 291 ... 424 ... 440 ... 301 ... 547 ... 179 ... 636 ... 47 ... 691 ... 21 ... 616 ... 173 ... 511 ... 336 ... 395 ... 474 ... 270 ... 571 ... 144 ... 656 ... 25 ... 683 ... 35 ... 580 ... 227 ... 459 ... 373 ... 358 ... 475 ... 261 ... 541 ... 165 ... 600 ... 83 ... 601 ... 103 ... 640 ... 138 ... 545 ... 291 ... 425 ... 439 ... 304 ... 545

The values range from 11 to 698, which is a pretty large difference (in my admittedly limited experience) and has a load of different values inbetween.

The issue is that creating a sound near it like a finger snap or tapping on it barely affects it. The most I could get it to with what I'd presume to be fairly loud sounds to a piezo (finger clicks, that kind of thing) was 745. You'd assume from the ambient sound range from 11--698 and the loud sound bringing it over to 745, that I was barely making a sound.

Bringing it back to the original question: Why is my piezo so innacurate? Is it just insensitive?

I suspect it may be related to this question but I can't be sure if all piezos are like this, or just when they're powered by USB.

EDIT:

Running on an Arduino Uno R3, connected to a laptop using a USB cable through a 2.0 port. The piezo sensor is the PKM22EPP-40 (I believe this is relevant.) It's the one in the official Arduino starter kit.

Using 5V output* from the Arduino. There's also a 16x2 LCD and a potentiometer running on the same line.


*This could be completely the wrong term.

EDIT:

The piezo: Piezo capsule [PKM17EPP-4001-B0]

\$\endgroup\$
10
  • \$\begingroup\$ We need to know much more about the system you have, how you are interfacing it, what the pizza sensor is etc. \$\endgroup\$ Commented Jul 21, 2015 at 23:09
  • \$\begingroup\$ Sure, I'll look some of the stuff up and edit. Thanks for mentioning it! \$\endgroup\$
    – HarryCBurn
    Commented Jul 21, 2015 at 23:11
  • \$\begingroup\$ Edited, although I'm not sure if it helped at all. Mention if there's anything you'd like to know. \$\endgroup\$
    – HarryCBurn
    Commented Jul 21, 2015 at 23:18
  • \$\begingroup\$ Where's the schematic? \$\endgroup\$
    – Matt Young
    Commented Jul 21, 2015 at 23:33
  • \$\begingroup\$ @Matt Sorry, I didn't realise that a schematic would be needed for a question this general. I'm not necessarily asking about how to fix it, but about the nature of piezos in general. I've never made a schematic though, so that should be a fun thing to do when I can in the morning! \$\endgroup\$
    – HarryCBurn
    Commented Jul 21, 2015 at 23:44

1 Answer 1

1
\$\begingroup\$

Without seeing a schematic, and without knowing your ADC sample rate, I would guess that you have hooked your PZT (I like pizza sensor, though) directly from ground to the R3 input. In this case, I'd very strongly suspect 60 Hz pickup. PZTs are very high-resistance, and their capacitance is not so enormous that I'd count on it acting as a filter, especially when hooked up as I think.

If your sample rate is low (low kHz) it's entirely possible that you're simply missing your impulse noises most of the time.

\$\endgroup\$
5
  • \$\begingroup\$ Thanks! Could you explain what 60Hz pickup is briefly? I couldn't find anything on it after a Google search. I'll try increasing the amount of times I take in data, and see if that helps. \$\endgroup\$
    – HarryCBurn
    Commented Jul 22, 2015 at 0:01
  • 1
    \$\begingroup\$ The electrical system in your house runs on 60 Hz AC. Any current which flows in your wires causes them to act like a radio transmitter (but at 60 Hz). Any wire within range acts like a receiver. The effect is small, but you have a potentially sensitive circuit. See, for instance, en.wikipedia.org/wiki/Mains_hum For your test, try to include a peak detector. \$\endgroup\$ Commented Jul 22, 2015 at 0:27
  • \$\begingroup\$ The data's fluctuating in waves, so yeah, I think it is 60Hz pickup! \$\endgroup\$
    – HarryCBurn
    Commented Jul 22, 2015 at 13:23
  • 1
    \$\begingroup\$ And a simple look at the data says your only sampling at about a 400 Hz rate (~7 samples per cycle) but that may be an aliasing artifact (you can look up "aliasing"). If so, it explains why you usually miss your test noises - they are so brief that you have to be lucky to catch them, \$\endgroup\$ Commented Jul 22, 2015 at 13:30
  • \$\begingroup\$ See if you can increase the sample rate even more. \$\endgroup\$ Commented Jul 22, 2015 at 13:36

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