# AC Signal Conditioning for ADC (Design Choices)

I have a low frequency (50Hz) signal which can be positive or negative (centered around system ground) depending on the mode selected. The signal has a maximum amplitude of +/- 12V. So, just to be clear, when one mode is selected, the signal is positive from 0 to 12V and when the other mode is selected, the signal is negative from 0 to -12V.

Now, I would like to digitize this signal using a 12bit ADC (MCP3208 - datasheet) and it's fine (preferable perhaps) if the signal is rectified so that it is always positive.

So, I have two main choices: I can rectify and scale my signal, which will give me more digital precision or I can DC bias and scale the signal with the obvious loss of digital precision (converting 0-12V, as opposed to converting 0-24V). Option #1 would seem the obvious choice, but my concern is with the precision rectifier circuit.

The question then is: which option will distort the signal the least and (in essence) how precise are precision rectifier circuits when compared to a simple buffered voltage divider?

I should add that in this application maintaining the shape of the signal is important, more important than resolution, I think.

• Not sure about your terminology here, you say option 1 is to recify the signal (AC to DC) but then you say that the waveform (shape) is important. So do you need to measure the waveform or not? Sorry, just re-read, you have clarified earlier in the post. Oct 28, 2016 at 10:26
• You say the signal is only 50 Hz, but then say that the shape of the signal is important. To what frequency or harmonic? That's the frequency the active rectifier still needs to be good to 12 bits at. How fast do you intend to sample? That implicitly tells us the upper frequency content you care about. It also tells us how feasible using a 14 bit A/D over the whole plus/minus input range is. Oct 28, 2016 at 10:54
• @Olin Lathrop That's a good point. The signal is coming from a curve tracer with a refresh rate of 50Hz. You've got V on one channel and I on the other. The signal shape is important because I intend to match them up XY fashion in software. Oct 28, 2016 at 11:04
• Um, OK, so what is the upper bound of frequency content? How fast do you intend to sample? I'm not going to keep asking the same questions. This is your last chance to answer what I asked. Oct 28, 2016 at 11:09

One choice is to use a 14 bit A/D and have it convert the full ± input range.

If you truly don't care about the sign of the input, only its absolute value, then a active precision rectifier circuit sounds like a reasonable choice.

You say the signal is 50 Hz, but that its wave shape is important. Therefore the bandwidth is higher than 50 Hz. You need to specify how high it needs to be. For example, if up to the 100th harmonic is good enough, then the active rectifier needs to work up to 5 kHz. That should still be doable to 12 bits with good parts.

• Change to 14 bit is an excellent option and you would get twice the resolution for each polarity with (probably) little extra cost. Oct 28, 2016 at 11:08
• I'll breadboard the active rectifier solution for now. I don't have exact figures for sample rate (yet) but I will work through this during prototyping. Oct 28, 2016 at 11:55

Looking at your choice of ADC you have 8 input channels. Why not have 1 input just scaled and a second input inverted and scaled.

Otherwise you need to AC couple but at this (low) frequency you probably need a fairly large quality capacitor, buffer and scaling to your ADC.

I don't think a precision rectifier is what you want; you'll loose all negative signal.

EDIT Just found this article describing an absolute value circuit. At 50Hz I would expect precision to be good. You are always going to get some additional distortion from any diode based op-amp circuit.

• I don't get what you are saying (maybe it's me being stupid!). The signal can be positive or negative, but based on a mode selection. For the digitized signal, I don't need to capture the signals polarity - just it's amplitude and shape. Oct 28, 2016 at 10:50
• By (precision) rectifying the signal, I would expect to flip any negative going signals, which is fine because of what I said above. Does that make sense? Oct 28, 2016 at 10:52
• @Buck8pe Yes, but you can't flip (invert) the signal from both modes otherwise you just end up with your positive becomming negative and visa versa. If you have one ADC input measuring the positive 0-12V signal range and a second measuring your negative 0-12V signal range this solves your issue (maybe, or is it me being stupid!) Oct 28, 2016 at 10:57
• Just got what you were trying to tell me (apologies). Am I right in thinking the active rectifier would leave the positive half-wave as is? In which case you don't need to "discriminate" between the two? Appreciate the effort. Oct 28, 2016 at 12:56
• For the absolute value circuit, yes Oct 28, 2016 at 12:58

With a rectifier, your measurement setup will be blind below the forward voltages of the diodes, which is a nonlinearity and will cause harmonics to show up.

Level shifting the signal is the better choice here, IMO. You should leave a bit of extra headroom (e.g. -14 .. 14 V) so you don't hit the extremes because of manufacturing tolerances.

If you can oversample, you can get some extra precision bits there as well.

• A precision rectifier (using an op-amp) corrects for the forward voltage drop of the diode. As long as the diode and op-amp (slew) are fast enough for the signal (in my experience a typlical limit is around 100kHz signal) precision should be good. Oct 28, 2016 at 10:49
• Does this non-linearity apply to typical precision rectifier circuits (using op amps) also? I thought that's what these precision circuits were trying to avoid? Oct 28, 2016 at 10:55