Tell me more ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I have created an AC sine way using a wien-bridge network.

I would like to measure the peak to peak voltage of this wave using my microcontrollers ADC.

I cannot just use this wave as an input to my Analog Input pin, as of course the electrical specification specifies no negative voltages, and I would only get a snapshot of the wave, and would have to take many measurements and take the max one.

I am looking for some discrete components I can pass this wave through to get a simple DC voltage representing the Peak to Peak (or just the positive) voltage of this wave.

share|improve this question

2 Answers

One way is to use a peak detector, but this has a diode voltage drop, which gives an error in the result.

You don't say anything about frequency, but I'll assume it is much lower than the ADC's sampling frequency.

I would use a resistive voltage adder to bring the full signal within the ADC's range. The resistive adder has the advantage over the capacitively coupled adder that you don't have to take frequency-dependent attenuation from the capacitor into account.

enter image description here

Suppose the ADC has a 0 V to 5 V range, and your signal is maximum 10 V peak-to-peak. Then you want Vout to be 0 V for -5 V input, and as close to +5 V as possible for +5 V input. The latter means that R1||R2 should be much smaller than R3. The former means that R1 should be equal to R2: if the input is zero then there's no current through R3, and R1 and R2 form a resistor divider between -5 V and +5 V. So if we choose R1 = R2 = 1 kΩ and R3 = 47 kΩ then the output signal will swing between 0 V and 4.95 V.

Now take enough samples to find the minimum and maximum values, and multiply the difference by 10 V/ 4.95 V, that will give you the peak-to-peak value.

share|improve this answer

Something like this should do for the buffering and level shift:

opamp level shift

If your Wien bridge output signal is very high impedance you will need a buffer before the capacitor also to prevent the voltage divider loading it.
You could rectify the signal too, but I would do the filtering/peak detection in the micro, since you have more control over it (unless there's a valid reason not to)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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