ADC value always display 2.1v when no load connected, how to resolve

adc

I have an ADC and connect the ADC to a piezo. When the piezo did not generate voltage or no voltage supply between Vin+ and Vin- the ADC always display 2.1v. I tried to put a 10 megaohm resistor between Vin+ and Vin- but it's doesn't resolve my problem. How to resolve this problem ?

enter image description here

enter image description here

Best Answer

You need to bias the input so that it has a DC level. You were on the right track with the 10 megohm resistor, but that resistor is way too high.

I would place a 10K to 500K ohm resistor between Vin+ and Vin-. But I would also put another resistor between Vin- and something that is in the middle of the ADC's input voltage range.

For example, if the range for Vin- is 0 to 5v, then I would put a 10k to 500k resistor between Vin- and a 2.5v rail. If you don't have a 2.5v rail then you can use two resistors as a voltage divider (between the +5v rail and GND).

If the Vin- range is -5v to +5v then you would put a resistor to GND.

The purpose of the first resistor, between Vin+ and Vin- is to put those two signals at the same voltage when the Piezo isn't doing anything. The purpose of the second resistor is to put both Vin+ and Vin- at the center of the ADC's input voltage range.

The reason why there isn't a third resistor between Vin+ and the 1/2 input range voltage (similar to what we'd do with Vin-) is because a mismatch in resistor values could cause a small DC offset. Also, a third resistor isn't really required.

Edit: The following paragraph is all wrong. I'm including it here for amusement sake.

The whole reason for this is that the piezo is basically a capacitor. The output voltage is due to a change in capacitance as a result of mechanical stress. But when there is no stress, the cap has to be charged to some voltage by something. That something is probably the leakage current on the ADC's input. By using a resistor (that is less than 10 Meg) you are overriding that leakage current and forcing it to charge to what you want it to be.

Edit: End of the stupid section.

The whole reason for this is that the piezo doesn't output a voltage when there is no mechanical stress. Essentially, the output of a piezo is high impedance except at it's resonant frequency. When you add in the leakage current on the inputs of the ADC the ADC input pin will tend to "float" to some particular voltage. Murphy's law says it'll be the wrong voltage level. Using some resistors we can force it to float to a more useful voltage, which is near the center of our ADC's range.