Go Down

Topic: Grounding problem? (Read 1 time) previous topic - next topic


I'm trying to build a knock sensor, something like this:


Everything is generally working, but sometimes my threshhold (the knock) is randomly triggered, and it appears to be caused by some sort of electrical interference. I posted a video of the problem here:


The LED should only be lighting when a knock is detected.

As far as the circuit, I'm connecting the piezo's negative to ground, and the positive to analog pin 1, and I have a 1 megohm resistor between ground and analog pin 1. This is the piezo I'm using: http://www.radioshack.com/product/index.jsp?productId=2062397

And to describe the problem a bit more, usually everything works well, but seemingly randomly it stops working and the threshhold (the knock) is detected. It usually remains like this until I touch the ground wire, or even put my hand near the ground wire.

Eventually I'd like to have 6 different piezos detecting different "knocks", if possible.

Any tips on how to get rid of the bad readings?


Use shorter wires that will not act so antenna-like, and lower the resistance some so that a little more current flo is required.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.


The main problem is that with a 1M input impedance the input of the A/D is effectively floating.
While the circuit you have is good for a demo that is about all, it is not a very robust circuit. I would expect it to give the problems you are seeing. I doubt if shielding is going to do anything for you, in fact it will probably make it worse.
You need an op-amp to convert your high input impedance into a lower one.


> You need an op-amp to convert your high input impedance into a lower one.

Thanks for the tip. I was wondering if you had any pointers on which op-amp to use, and how to use it?

I've never used an op-amp before.


Mar 30, 2011, 12:04 am Last Edit: Mar 30, 2011, 01:33 am by wrybread Reason: 1
Aha! I found his circuit, which looks like its exactly the sort of thing you (Grumpy Mike) described:


Here's just the circuit:


Here it is as wired into the arduino:


I'm going to take a stab at it, feel free to chime in if anything strikes you (anyone) about it.

Go Up