0
\$\begingroup\$

I'm an electronics noob trying to understand this Arduino circuit below.

Having very cursory knowledge of electronics, I'm extremely confused by this statement I took from the Arduino Knock example:

Additionally, connect a 1-megohm resistor in parallel to the Piezo element to limit the voltage and current produced by the piezo and to protect the analog input.

You can see the diagram they provide below.

Arduino diagram

My question is this: How does a resitor in parallel to the piezo limit the current it outputs? I thought that in order to limit the current from a power source (like a battery) you connect the resistors in series?

Some of my confusion also stems from playing around with a circuit simulator, which seems to support my (apparently incorrect) hypothesis i.e. resistors in parallel don't limit the current. See below a screenshot I took from the simulation in question:

Circuit simulation

Any help would be hugely appreciated. Thank you!

\$\endgroup\$
1
  • 2
    \$\begingroup\$ You are right. It limits the voltage, but not the current put out by the piezo. They just spoke a bit carelessly. \$\endgroup\$
    – user57037
    Commented Oct 8, 2019 at 21:42

1 Answer 1

2
\$\begingroup\$

The only way a parallel resistor limits voltage is by loading down the source. It makes the power supply need to provide so much extra current that it can no longer maintain its output voltage. It's like reducing the speed of your car by filling it with steel plates so it is weighed down.

The mechanism by which this occurs is due to the internal resistance in series with the output of the source. If it is too high then too much voltage drops across this internal resistance at higher output currents and therefore less voltage appears at the output of the source.

schematic

simulate this circuit – Schematic created using CircuitLab

In other words, don't expect or try to use a parallel resistor to limit output voltage of a power supply.

BUT, we are not talking about a power supply here. We are talking about a piezo element which is not acting as a power supply so much as a signal source (much lower power than a power supply so efficiency and heat are not real concerns). So the megohm resistor is probably there to load down the piezo element in a similar way to protect the ADC.

In your case, the piezo would the V1 and R1, while the load would be your ADC (and the 1 megohm resistor if you include one).

Personally, I would use a TVS diode or something similar to clamp the voltage instead of a resistor, but a resistor is much cheaper. It's also possible that the piezo provides way more signal than is actually required so loading it down is a cheap and dirty way to reduce it.

EDIT: As per Elliot's comment if it is indeed true that a piezo is best modelled as a current source rather than a voltage source, then another way that you can look at it is that the 1Mohm resistor is used to convert the current produced into a voltage that the ADC can measure. Without the 1Megaohm resistor, the lone input impedance of the ADC is so high that if the piezo was acting as a current source, the requires voltage to develop the desired current across said impedance would be too high which would damage the ADC.

\$\endgroup\$
7
  • \$\begingroup\$ Do you believe that's what's happening here? It just seems weird for Arduino themselves to give advice that appears to wrong, even to me who knows next to nothing about electronics... \$\endgroup\$
    – jonny
    Commented Oct 8, 2019 at 19:54
  • \$\begingroup\$ @jonny I am not done my explanation yet \$\endgroup\$
    – DKNguyen
    Commented Oct 8, 2019 at 19:54
  • \$\begingroup\$ @jonny See my completed explanation. \$\endgroup\$
    – DKNguyen
    Commented Oct 8, 2019 at 19:56
  • \$\begingroup\$ Thanks for the detailed information! \$\endgroup\$
    – jonny
    Commented Oct 8, 2019 at 20:38
  • 1
    \$\begingroup\$ Aren't piezo elements better modelled as a current source than a voltage source? That would probably be a good way to explain the use of a parallel resistor. \$\endgroup\$
    – Hearth
    Commented Oct 8, 2019 at 20:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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