Pages: [1]   Go Down
Author Topic: Grounding problem?  (Read 1042 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://www.arduino.cc/en/Tutorial/KnockSensor

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?

Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Use shorter wires that will not act so antenna-like, and lower the resistance some so that a little more current flo is required.
Logged

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.

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 634
Posts: 34518
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

> 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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Aha! I found his circuit, which looks like its exactly the sort of thing you (Grumpy Mike) described:

http://www.instructables.com/id/A-position-sensitive-midi-drum-pad/step8/Building-the-circuit/

Here's just the circuit:

http://www.instructables.com/files/orig/F4Q/P3Y1/GHFJXCHX/F4QP3Y1GHFJXCHX.png

Here it is as wired into the arduino:

http://www.instructables.com/files/orig/F0V/A3LJ/G68HEHUH/F0VA3LJG68HEHUH.jpg

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

« Last Edit: March 29, 2011, 06:33:12 pm by wrybread » Logged

0
Offline Offline
Shannon Member
****
Karma: 214
Posts: 12434
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The cause of the interference is probably you!  If your near some mains wiring you can pick up dozens of volts or so at very high impedance and this is then inducing a fraction of a volt in your circuit because its relatively high impedance too.  You can reduce sensitivity to this AC pickup by sampling the piezo element at exactly the mains frequency...
Logged

[ I won't respond to messages, use the forum please ]

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 634
Posts: 34518
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well that's not the sort of thing I had in mind. All this does is provide a DC bias to the sensors to allow negative voltages to be measured. It still has the same problem of having a 1M input impedance and that is what is causing you the problem.
Look at this thread and the links off it:-
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1239839000
The sort of thing I was thinking about was a voltage follower:-
http://en.wikipedia.org/wiki/Operational_amplifier_applications

Quote
You can reduce sensitivity to this AC pickup by sampling the piezo element at exactly the mains frequency
That is just twaddle, have you ever tried this? A simple minded look at the theory says it could be static if the interference is mains. But the size will depend on the phase relationship between sample point and mains pickup. The mains pickup phase will change with a persons position so even if you could synchronise it exactly it will not work.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

> The sort of thing I was thinking about was a voltage follower

Does that mean there would be one op-amp per sensor?
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 634
Posts: 34518
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Does that mean there would be one op-amp per sensor?
Yes.
Logged

Pages: [1]   Go Up
Jump to: