Complete newbie Displaying voltage from variable source of current

Hi all,

I've just (very) recently started with Arduino, and need to figure out how to use Arduino for a research project. What I'm aiming to do right now is to display on a color LCD shield the voltage generated by a piezoelectric disc (apply pressure, get a flow of electricity). I have a Duemilanove, and a sparkfun color LCD shield, along with a bunch of assorted Arduino shields/pieces. The amount of electricity generated varies, but can reach 50+ volts. I know I'll need something to reduce the voltage, but what I'm primarily concerned about is how to get the discs hooked up to the board, and how to get the LCD shield to display that voltage. Sorry if I'm asking for a lot, but I'm really lost. I can provide more information about what I want to do/what equipment I have currently if it helps.

-Asteradragon

Divide the problem into bits that you can tackle. I assume you can compile and run your sketches on the Arduino by now. There are plenty of example sketches showing how to display messages on an LCD shield. Pick an example, wire it up as instructed for the example and see if it works. Then play around with the displayed text until you know how to get it to display what you want.

Separately, you need to figure out how to read your Piezo sensor. The Arduino analog inputs aren't terrifically high resistance so you may find your piezo can't supply enough current to get a good reading. I guess the best thing to do is to try it and see whether you can get any readings. You should be able to find plenty of examples showing how to read an analog sensor input, they're used all over the place.

Your biggest challenge will be in how you try and handle reading the pizo's output. The output will be a transient reaction voltage pulse to a sudden pressure change, there is no DC response to just a steady applied pressure. External op-amps set up to track and hold for a 'peak' reading and then scaling the reading for the arduino's A/D range restrictions (0 to +5vdc, no negative voltages allowed). Then a manual or timed reset of the peak reading circuit would be required. This is actually a pretty complex application. Your not likely to be able to detect and capture an accurate peak value just by scanning the A/D channel in your sketch.

Lefty

The simplest way to reduce the voltage is to put a "load" resistor across the piezo terminals. The current-limits of the device will reduce the voltage. You'll have to experiment, but if you don't know Ohm's Law, look it up... It defines the (simple) relationship between voltage, current, and resistance.

In addition to a load resistor, it would be a good idea to add a "protection diode" to the input, so you don't burn-out the electronics if the voltage happens to go higher than expected. The diode goes between the electronics input (Arduino or op-amp, etc) and the power supply (probably 5V), and it's wired so that current flows into the power supply if the input voltage goes higher than the supply (plus the small voltage drop across the diode). Under normal conditions (with the input lower than the power supply) no current flows backwards through the diode.

The op-amp circuit that holds the peak input-voltage is called a peak detector. It's just a an op-amp, diode, and capacitor. An optional resistor across the capacitor will slowly discharge the "hold" voltage.