Pages: [1]   Go Down
 Author Topic: Very basic resistor/piezo question  (Read 485 times) 0 Members and 1 Guest are viewing this topic.
Guelph, ON
Offline
Newbie
Karma: 0
Posts: 10
 « on: January 24, 2013, 01:18:00 pm » Bigger Smaller Reset

Hi,

Sorry if this is too basic, I did some reading on wikipedia and couldn't find an answer that totally answered my question.  I'm making a knock sensor and all the schematic show a 1 mOhm resistor in parallel to reduce the current/voltage coming into the pin.  My question is: would wiring this in series not reduce the voltage?  Is it in parallel in order to reduce the current?

Thanks, and again, sorry for the basic question.  If anyone has a good source for beginners electronics help it would be greatly appreciated.
 Logged

Austin, TX
Offline
Karma: 41
Posts: 5166
CMiYC
 « Reply #1 on: January 24, 2013, 01:56:27 pm » Bigger Smaller Reset

1 milliohm (mOhm) or 1 megaohm (MOhm)?  They're quite different.

The resistor is there to give a path for some of the energy to go, instead of just straight into an input pin.
 Logged

www.cmiyc.com - A guide to being an Enginerd

Guelph, ON
Offline
Newbie
Karma: 0
Posts: 10
 « Reply #2 on: January 24, 2013, 02:00:56 pm » Bigger Smaller Reset

MegaOhm, sorry, should have been clearer.  Will wiring them in parallel not maintain the same voltage in each path while cutting the current (maybe that's the point)?  I may be misunderstanding this...
 Logged

Offline
God Member
Karma: 9
Posts: 770
 « Reply #3 on: January 24, 2013, 02:25:50 pm » Bigger Smaller Reset

With the resistor in parallel, you are creating a voltage divider where one of the "resistors" is the internal resistance of the piezo device.   Yes, that will reduce the voltage.   Since the piezo (unlike most voltage sources) has high source-impedance, a high-value resistor in parallel will reduce the voltage.

A resistor in series with the Arduino input will also create a 3-way voltage divider where the voltage is divided between the piezo, the resistor, and the Arduino.  However, since the Arduino has an input impedance of around 100M, almost all of the voltage will be "dropped" across the Arduino input, and the series resistor will have little effect.

Normally, you'd use two resistors to make a regular voltage divider and you could calculate the voltage drop.  With the piezo as one of the "resistors", we don't know the internal impedance of the piezo, so we can't calculate the voltage drop.  (I believe it's capacitive, rather than resistive.)   But, if you want to experiment, a single parallel-resistor is fine.

BTW - You have an unknown and uncontrolled voltage which will go positive and negative.    I'm not sure what voltage you are getting, but the Arduino is limited to 0-5V.   Any negative signal, or any signal above 5V can damage the Arduino.   So, I recommend that you use a pair of protection diodes.
 « Last Edit: January 24, 2013, 02:27:45 pm by DVDdoug » Logged

Guelph, ON
Offline
Newbie
Karma: 0
Posts: 10
 « Reply #4 on: January 24, 2013, 02:38:38 pm » Bigger Smaller Reset

Thanks very much, that's a really helpful explanation.

One last question: if I have the piezo oriented correctly, my understanding was that the resitor would remove the random variance and negative 'bouncing' voltage from the piezo and protect the arduino.  Is this not the case?
 Logged

0
Offline
Tesla Member
Karma: 71
Posts: 6611
Arduino rocks
 « Reply #5 on: January 24, 2013, 10:05:52 pm » Bigger Smaller Reset

Quote
With the resistor in parallel, you are creating a voltage divider where one of the "resistors" is the internal resistance of the piezo device.   Yes, that will reduce the voltage.   Since the piezo (unlike most voltage sources) has high source-impedance, a high-value resistor in parallel will reduce the voltage.

Piezo elements are perhaps more accurately though of as capacitors with a current source built in -
mechanical strain directly moves charges around in the material.  They have very high DC
resistance (the value of which isn't really useful - their capacitance is more interesting).  Adding
a parallel resistor creates a high-pass filter which eliminates DC offset and drift and creates
a signal that more represents velocity than displacement of the sensor - often more useful.
 Logged

the land of sun+snow
Offline
Edison Member
Karma: 80
Posts: 2120
 « Reply #6 on: January 25, 2013, 12:38:32 am » Bigger Smaller Reset

I have a slightly different take on this. First, 1Mohm is so large that, being in parallel
it's not gonna affect voltage or current very much - ie, almost like nothing there. However,
the purpose of the 1 Mohm is to discharge the piezo after the knock, as the piezo is
essentially a capacitor, and the Arduino pin input impedance is too large for this purpose.

Also, as others mentioned, you should probably add a zener across the piezo to protect
the Arduino pin from overvoltage. A good rap on a piezo can generate quite a few volts.
The 1 Mohm across the piezo isn't gonna protect the pin at all.
 Logged

Kitchen-Sink Arduino-compatible boards

Guelph, ON
Offline
Newbie
Karma: 0
Posts: 10
 « Reply #7 on: January 25, 2013, 09:58:34 am » Bigger Smaller Reset

With the diode, the purpose it to prevent a negative current correct?  How will this act to protect the pin in the case of a strong knock?  Presumably if I am concerned about overloading the pin I would use a smaller resistor in the voltage divider (as you mentioned, with a 1 M resitor I'm effectively keeping the voltage the same)?

Sorry for the incessant questioning...
 Logged

Dubuque, Iowa, USA
Offline
Edison Member
Karma: 13
Posts: 1538
 « Reply #8 on: January 25, 2013, 12:50:18 pm » Bigger Smaller Reset

Quote
With the diode, the purpose it to prevent a negative current correct?  How will this act to protect the pin in the case of a strong knock?

A zener will protect against both positive and negative voltages.

A regular diode only allows current to go in one direction, positive to negative. A zener diode behaves the same way, but also allows current to flow in the opposite direction when the voltage approaches its rated breakdown voltage. In the first diagram on DVDDoug's linked page that means that any positive voltage approaching 5V will start to conduct through the zener diode to GND. I use the word "approaches" because the breakdown voltage is not exactly the breakdown voltage, but rather it starts to conduct a little bit when you start getting close and then fully opens up as the voltage gets higher.

Not explicitly explained on that page is that the zener is a 5V zener. Zeners come in a wide array of breakdown voltages.

In the event of a negative voltage on the "in", the zener, behaving as a typical diode, will conduct from GND which has a relatively higher potential to the input. So for example, if the input is -10V and GND is 0V, you could look at it from the perspective of the input as 0V and GND as +10V. The diode conducts from the higher voltage to the lower voltage and zeroes out the input, protecting your analog pin.

So that protects you from a high voltage knock. If it's a high voltage and high current, well, everything blows up -- it's not a lightning rod . Fortunately the piezo doesn't generate much current so that's not a concern.
 Logged

United Kingdom
Offline
Karma: 131
Posts: 4663
 « Reply #9 on: January 26, 2013, 10:52:19 am » Bigger Smaller Reset

No need for a zener, the pin protection diodes provide adequate protection for the pins against the small current generated by the piezo, unless you plan to drop a 14 ton weight on it.
 Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com

the land of sun+snow
Offline
Edison Member
Karma: 80
Posts: 2120
 « Reply #10 on: January 26, 2013, 02:39:46 pm » Bigger Smaller Reset

No need for a zener, the pin protection diodes provide adequate protection for the pins against the small current generated by the piezo, unless you plan to drop a 14 ton weight on it.

This is definitely something for investigation. You're probably correct, but the voltages
generated by the piezo can be pretty high - 20V or so - even if the currents are low.
Got any idea acutually how low?

 Logged

Kitchen-Sink Arduino-compatible boards

United Kingdom
Offline