# How do I read analog devices that produce relatively high voltage?

I found a sensor recently that emits ±90V (AC) on stimulus. How would I go about reading this from an arduino?

Update

I didn't think there were so many options. :) The kind of thing I'm looking at is a piezo vibration sensor.

The current is small, but 90V sounds like a lot (and I'm kind of new to electronics, so I don't really understand what high voltage/low current means in terms of damaging stuff).

If it were just 90V DC then I'd get the voltage divider idea, but reversing polarity sounds like it could be a bad thing. Perhaps voltage divider + a diode or two (or a rectifier) would work?

Piezo vibration sensors produce a high voltage, but very low current. Further, you are generally interested in sensing only a few things - level of vibration, frequency, amplitude, shocks, etc.

So the interface will depend greatly on what you want to sense. Assuming you only want to know one or more of the following, then the interface suggested below will work.

• A vibration event such as a shock or sudden G force
• The vibration level

The general interface is to push the signal through a diode, then a resistor into a capacitor that's attached to ground. In parallel with the capacitor is a clamping diode that limits the voltage spikes to a more reasonable voltage (5V, for instance).

Now each time a spike happens, the capacitor will charge a little bit. If you have continuous vibration it will charge more quickly. It'll eventually reach the level of the clamping diode as long as the vibration exceeds the capacitor's self discharge rate.

Sense the voltage on the capacitor, and you'll learn about the signal coming in.

If you put a resistor in parallel with the capacitor then you can define how quickly the capacitor discharges. A small resistor will discharge quickly, and you can count how often the piezo is hit or dropped. A large resistor will allow the charge to build up so you won't see individual events, but instead get a higher voltage with more vigorous vibration, a lower voltage with less vibration, and no voltage with no vibration.

If you need more information than this simple technique, then you'll want to use a signal transformer to bring the signal down into the 5V range, and a precision op-amp and ADC.

If this sensor is connected to line voltage I would not connect it to the Arduino with any circuit that does not provide isolation.

One safe way to measure the voltage is to use a step-down transformer. This provides isolation and lowers the voltage. You could use a rectifier to convert the AC to DC. You would need to check the transformer loading on the sensor.

A resistor divided followed by an isolation amplifier would work too.

There was an article in the April 2002 of Poptronics called "Build this Home Appliance Watt Meter/Watt-Hour Meter". The article documented how to safely measure line voltage (with a step-down transformer) and how to safely measure line current with a current transformer.

• Do you happen to have a copy of this article? I found a copy here[1], but it doesn't have the diagrams. The inspiration for that project is AN-265[2], which is probably sufficient... [1] accessmylibrary.com/coms2/summary_0286-9127919_ITM [2] national.com/an/AN/AN-265.pdf Commented Jan 5, 2010 at 15:32
• It's on my bookshelf. The article is based on the AN-265 but the AN-265 circuit is discrete and the Poptronics design uses ICs. The Poptronics design uses an AD633 multiplier to get V*I, an LTC1062 filter (on the AD633 output) and an opamp preamp for the current transformer. Commented Jan 5, 2010 at 16:46
• Would a transformer be necessary for low current situations like this (expanded the question some)? Commented Jan 5, 2010 at 17:21
• I missed the sentence where you mentioned the piezo and when I saw 90V and AC I was thinking line voltage :( Since the voltage the sensor outputs is isolated from the line a simple attenuation (or buffer) like davr suggested is fine. On page 41,42 of the technical manual they show low voltage op-amp circuits interfaced directly to the sensor. Where does the 90V come from? Sorry about the confusion. Commented Jan 5, 2010 at 17:53
• That was entirely my fault. I'm still new enough to know what all details are important. Commented Jan 6, 2010 at 8:23

Is it only +90V or -90V? Or is it a range from -90V to +90V? If it's a binary +/-, you could use a voltage comparator (aka an op-amp), otherwise you could use a voltage divider (aka two resistors).

• I'm not sure. For this vibration sensor, I think it'd probably be fine to know "vibrating" vs. "not vibrating". There's specifically some kind of op-amp thing in the related products on sparkfun, so that may be right. Commented Jan 5, 2010 at 17:24

Check out the MID400 8-Pin DIP AC Line Monitor Logic Output Optocoupler. There's a very good application note for this device. I use it for monitoring my furnace, which operates (in part) at 24VAC. You'd need a 22.5k 0.5W resistor in series with the input to give a high output when voltage is present. That'll give you a binary output if you just need to sense whether there's voltage or not.

If you need to actually measure the voltage, however, the MID400 won't really work (or, at least, I'm not sure if the output will be linear with the voltage; it may just pulse if the input current drops too low). For my home power monitor, I'm planning to measure RMS values for voltage and current with an AD737 RMS-to-DC converter. You'd probably need a transformer and/or voltage divider to get the voltage down to the 200mV input required by the AD737.

Or you could go the cheap way: step down the voltage and feed it through a diode into a capacitor and resistor, which will give you a half-rectified somewhat-smoothed DC output correlating to the input...

• With the MID400, does the resistor value vary with the anticipated input voltage range?
– TomG
Commented Nov 1, 2010 at 3:24
• Yes. The AC input is driving an LED, so you want to limit the current on the LED. You can also set the current on the LED to control the saturation of the transistor… Commented Nov 1, 2010 at 12:17

Just use a voltage divider. You can measure thousands of volts that way. http://www.rossengineeringcorp.com/hv_dividers.htm

And yes, dividers work for AC, too. :D They just make the signal smaller. You'll want a capacitor coupling the piezo to your input to block DC and bias it to the Arduino's reference voltage.

I doubt it will do any damage, because the arduino input already has clamping diodes, and the current will be very low (piezos are high impedance sources, plus your divider provides a large impedance), but you can always add an extra clamping diode to protect the input.

Actually, depending on what you're doing, you might want a high-impedance amplifier right at the piezo to prevent it from being loaded down or picking up interference. What specifically are you trying to do?